aboutsummaryrefslogtreecommitdiffstats
path: root/com32/samples
Commit message (Collapse)AuthorAgeFilesLines
* Fix all warnings, and better separate code that should not be mixedsyslinux-6.04-pre3H. Peter Anvin (Intel)2019-02-071-1/+2
| | | | | | | | | Clean up a number of warnings in the tree. Refactor especially the core code so we don't end up building a bunch of BIOS-specific code for EFI, and general build cleanups. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* pxe_dns: remove obsolete pxe_dns.c wrapperH. Peter Anvin2016-04-061-1/+1
| | | | | | | | | We used to need a wrapper around the core function dns_resolv() to implement pxe_dns(), because the former function required its argument to live in low memory. This is no longer the case and hasn't been for a while, so remove this unnecessary level of indirection. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-291-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile NEWS com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/gfxboot/Makefile com32/gpllib/Makefile com32/include/sys/module.h com32/lib/Makefile com32/lib/sys/module/elf_module.c com32/menu/Makefile com32/rosh/Makefile com32/samples/Makefile core/init.c mk/elf.mk Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * Rename libutil_com.c32 to libutil.c32H. Peter Anvin2013-01-171-1/+1
| | | | | | | | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-051-29/+14
|\| | | | | | | | | | | | | | | | | | | | | This merge also includes the Syslinux-4.06 release. Conflicts: Makefile com32/hdt/Makefile com32/modules/Makefile com32/samples/hello.c mtools/Makefile
| * Merge branch 'elflink' of git://github.com/aericson/syslinux into elflinkMatt Fleming2012-10-231-23/+14
| |\ | | | | | | | | | | | | Conflicts: com32/modules/Makefile
| | * com32: remove duplicate modulesAndre Ericson2012-05-221-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | There was a hello.c32 module at com32/modules directory to test 32-bit ELF space, so this patch replaces the old hello.c32 module with the new hello.c32. Signed-off-by: Andre Ericson <de.ericson@gmail.com>
* | | Add per-firmware object directory supportMatt Fleming2012-10-161-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have multiple firmware backends it no longer makes sense to write object files to the same directory as their source. A better solution is to write the object files to a per-firmware directory under a top-level object directory. The top-level object directory can be specified on the command-line with the O= variable, e.g. make O=/tmp/obj. If no top-level object directory is specified an 'obj' directory is created in the top-level of the Syslinux source repository. All the existing make targets continue to work as before, however now they apply to all firmware backends, e.g. 'make installer' will build the BIOS, 32-bit EFI and 64-bit EFI installers and place them under $(OBJ)/bios, $(OBJ)/efi32 and $(OBJ)/efi64 respectively. Note unlike every other bit of Syslinux, the gpxe objects are still kept in the src directory, e.g. gpxe/src, since gpxe is only required by the BIOS backend. It is possible to specify a make target for a specific firmware or list of firmware with the following syntax, make [firmware[,firmware]] [target[,target]] To clean the object directory for just the BIOS firmware type, 'make bios clean' To build both the 32-bit and 64-bit EFI installers type, 'make efi32 efi64 installer' Since the Syslinux make infrastructure is now more complex a new file doc/building.txt has been created to explain how to build Syslinux. The top-level Makefile now exports some make variables for use in module Makefiles, - topdir - the top-level source directory of the Syslinux repository, e.g. /usr/src/syslinux - objdir - the top-level object directory for the firmware backend currently being built, e.g. /obj/syslinux/bios - SRC - the source directory in the Syslinux repository for the module currently being built, e.g. /usr/src/syslinux/com32/libupload - OBJ - the object directory for the module currently being built, e.g. /obj/syslinux/bios/com32/libupload Since we're rewriting the Makefile infrastructure anyway it seemed like a good idea to add parallel support. By writing subdirectories as prequisites for make targets the objects in those subdirectories can be built in parallel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmwareMatt Fleming2012-08-131-3/+2
|\| | | | | | | | | | | | | | Conflicts: com32/lib/sys/module/common.c
| * | com32: Use --as-needed for LDFLAGSMatt Fleming2012-07-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends commit 4678fd92a21e ("elflink: fix dependency problem in cmenu/Makefile") and basically reverts commit fb543aa635ff ("com32: Per-object file LDFLAGS"). By using the --as-needed ld argument we can specify all the required shared libraries for a directory, even if not all of the libraries are needed by every .c32 file. --as-needed takes care of only creating DT_NEEDED entries for the shared libraries that are actually required to resolve undefined symbols in a given module. Furthermore, by using $(LIBS) we create a dependency between .c32 files and their shared libraries, which allows multiple make jobs to run in parallel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmwareMatt Fleming2012-07-302-15/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/adv.c com32/elflink/ldlinux/kernel.c com32/elflink/ldlinux/ldlinux.c com32/include/bitsize/stddef.h com32/include/bitsize/stdint.h com32/include/stdint.h com32/include/sys/module.h com32/include/sys/x86_64/bitops.h com32/include/syslinux/linux.h com32/lib/Makefile com32/lib/sys/ansicon_write.c com32/lib/sys/module/elfutils.h com32/lib/sys/vesa/efi/fill.h com32/lib/syslinux/load_linux.c com32/lib/syslinux/serial.c com32/lib/syslinux/shuffle.c core/conio.c core/elflink/config.c core/elflink/load_env32.c core/graphics.c core/include/graphics.h core/init.c core/pxelinux.asm mk/elf.mk mk/lib.mk
| * | Use pxe_call() instead of COMBOOT APIMatt Fleming2012-07-201-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involved some other changes, such as passing flags to unload_pxe() now that we only call it from C code, and hence don't need to update KeepPXE. We also needed to move some of the pxe function prototypes to com32/include/syslinux/pxe_api.h because they are now referenced outside of the core. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | Revert "pxe: resolve names via DNS from protected-mode code"Matt Fleming2012-06-201-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6aba981cd9310bae94587d3e51106261bf0e27b9. dns_resolv() is only implemented for PXELINUX, meaning that if we try to execute any module that references it under SYSLINUX, EXTLINUX or ISOLINUX it fails to run because it cannot resolve the symbol. We need a way to implement DNS resolution so that it works for PXELINUX but returns an error for SYSLINUX/EXTLINUX or ISOLINUX, without introducing undefined symbols. The old COMBOOT API method worked splendidly for this, so revert until someone provides a better solution. Conflicts: com32/lib/Makefile com32/modules/host.c mk/elf.mk Cc: Paulo Alcantara <pcacjr@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | com32: Per-object file LDFLAGSMatt Fleming2012-06-201-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Some object files need to link against the ELF libraries. Allow them to be specified with the following syntax in the Makefiles, LDFLAGS_$(object_file) = $(LIBS) By adding libraries in this way DT_NEEDED entries are created in the ELF modules and the required library dependencies are automatically loaded before running the module. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * pxe: resolve names via DNS from protected-mode codePaulo Alcantara2012-05-121-17/+4
| | | | | | | | | | | | | | | | | | | | | | Syslinux used to call __intcall() for calling routines of the old COMBOOT API to resolve names via DNS (INT 22h, AX=0x0010) that seemed pointless, since INT 22h, AX=0x0010 does call the protected-mode function pm_pxe_resolv_dns() when calling INT 22h, AX=0x0010. So, for resolving names via DNS we must call pxe_dns_resolv() (a protected-mode function) instead for now. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | Archicture-dependent get_cpuid in sysdump/cpuid is fixed.chandramouli narayanan2012-06-255-0/+30
|/ | | | | | | | | | | In the following sample programs zzjson.c, advdump.c, entrydump.c, hello.c, resolv.c, serialinfo.c in com32/samples, the following code call hangs the program: openconsole(&dev_null_r, &dev_stdcon_w); The following fix works: openconsole(&dev_rawcon_r, &dev_ansiserial_w); Remanants of the unused old i386-only files, if any, need to be pruned.
* elflink: Make ELF the default object formatMatt Fleming2011-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/elflink/modules was originally created to house ELF modules and keep them separate from the COM32 modules as the elflink branch was being developed. However, this has inadvertently created a maintenance nightmare because code was copied from elsewhere in the tree into com32/elflink/modules, resulting in duplication. Bug fixes have been going into the original code but have not been merged onto the elflink branch, leaving the duplicate code in com32/elflink/modules buggy. So let's delete this directory. There really is no reason to keep ELF and COM32 modules separate because there's no reason to need both COM32 and ELF modules to coexist. ELF is a far superior object file format and all modules are not emitted as ELF objects. Now that we're outputting ELF modules we can use dynamic memory instead of the cs_bounce bounce buffer. This commit requires a certain amount of shuffling for some files. quicksort.c isn't a module and belongs as part of the util library. cli.h belongs in com32/include so that other modules can make use of the cli code in ldlinux.c32. All libraries are now ELF shared libraries which are only loaded to fixup unresolved symbols for executable modules and renamed from *.a to *.c32. This reduces the runtime memory footprint because libraries are only loaded when needed and because every executable no longer gets its own copy of code/data (as it would if linking with a static library). Also, remove MINLIBOBJS from libcom32.c32 because it is already part of libcom32min.a and we don't want to have any duplicate symbols between the core (which links with libcom32min.a) and libcom32.c32. Welcome to the New World Order of ELF modules! Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'H. Peter Anvin2011-04-261-1/+2
|\ | | | | | | | | | | | | | | Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the MCONFIG files into a mk/ directory and give them more descriptive names. This is purely a cosmetic change to make the 'include' directives a bit more coherent by making it obvious exactly which MCONFIG file we're including. For example, in com32/lua/src/Makefile we exchange the line, include ../../MCONFIG for the much more comprehensible, include $(MAKEDIR)/com32.mk Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | keytest: make somewhat more comprehensibleH. Peter Anvin2011-04-111-3/+4
| | | | | | | | | | | | | | Someone may very well need to use keytest to figure out their keymappings. Make it a bit more user friendly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | keytest: show the human name together with the keycodeH. Peter Anvin2011-04-111-1/+1
|/ | | | | | | Since we now have library support for showing the keycode name, make keytest print that as well. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* cat.c32: move from samples to modules; remove debug codeH. Peter Anvin2010-05-112-37/+1
| | | | | | | Move cat.c32 from samples to modules, and remove debugging messages. Real users may want to use this. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* cat.c32: check if filename existsGert Hulselmans2010-05-111-2/+7
| | | | | | | Don't crash if the file doesn't exist. Signed-off-by: Gert Hulselmans <gerth@zytor.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/serialinfo.cH. Peter Anvin2009-05-291-10/+9
| | | | | | | | | Automatically reformat com32/samples/serialinfo.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/resolv.cH. Peter Anvin2009-05-291-26/+26
| | | | | | | | | Automatically reformat com32/samples/resolv.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/localboot.cH. Peter Anvin2009-05-291-2/+2
| | | | | | | | | Automatically reformat com32/samples/localboot.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/keytest.cH. Peter Anvin2009-05-291-32/+32
| | | | | | | | | Automatically reformat com32/samples/keytest.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/hello.cH. Peter Anvin2009-05-291-6/+6
| | | | | | | | | Automatically reformat com32/samples/hello.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/fancyhello.cH. Peter Anvin2009-05-291-11/+11
| | | | | | | | | Automatically reformat com32/samples/fancyhello.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/entrydump.cH. Peter Anvin2009-05-291-24/+24
| | | | | | | | | Automatically reformat com32/samples/entrydump.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/cat.cH. Peter Anvin2009-05-291-17/+17
| | | | | | | | | Automatically reformat com32/samples/cat.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/samples/advdump.cH. Peter Anvin2009-05-291-18/+18
| | | | | | | | | Automatically reformat com32/samples/advdump.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: remove unused variablesSebastian Herbszt2009-04-171-2/+0
| | | | | | Silence compiler warnings by removing unused variables. - Sebastian
* entrydump: trivial program to probe PXE entry conditionsH. Peter Anvin2009-02-182-1/+63
| | | | | | | Small debugging hack program to probe the PXE stack entry conditions. This is mostly useful when developing a PXE stack, but might possibly be handy for finding workarounds for a stack, too.
* Move vesainfo.c32 from "samples" to "modules"H. Peter Anvin2008-10-132-84/+1
| | | | | | | vesainfo.c32 is turning into an invaluable debugging tool. Put it in "modules" instead of "samples", to encourage distros to package it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Fix "make clean" confusionsyslinux-3.72H. Peter Anvin2008-09-251-1/+2
| | | | | | | | "make clean" must NOT remove stuff that "make installer" should not rebuild. This is a somewhat unfortunate choice of naming, but that's the way it is. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Major Makefile cleanups; gcc 4.3.0 compatiblityH. Peter Anvin2008-08-201-59/+3
| | | | | Cleanup and centralize the Makefile system even more. Fix a gcc 4.3 incompatibility in memdisk (definition of strlen).
* com32: compile with -std=gnu99H. Peter Anvin2008-08-121-2/+4
| | | | | | | Compile with -std=gnu99, this allows us to define initializers inside for() loops, which makes certain kinds of ugly macros easier to write. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Centralize configurables; better "make install" etcH. Peter Anvin2008-05-291-1/+0
| | | | | | | Begin the process of centralizing configurables. Improve "make install" and "make netinstall"; add "make extbootinstall".
* Move files out of root into core, dos, and utilsH. Peter Anvin2008-05-291-1/+1
| | | | | | | | Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.
* Fixed the various Makefiles so that SYSLINUX compiles on platforms with GCC ↵Stefan Bucur2008-05-121-1/+1
| | | | -fstack-protector flag enabled by default.
* Remove reference to readpit.c32, an experimental moduleH. Peter Anvin2008-03-081-1/+1
| | | | | Remove reference to readpit.c32, an experimental module never intended for release.
* Use $(CC) in gcc_ok macro, not plain gccH. Peter Anvin2008-03-051-2/+2
| | | | | Use $(CC) in gcc_ok macro, not plain gcc. This seems to work, iff the gcc_ok macro is declared with =, not :=
* Prevent inclusion of system include files when inappropriateH. Peter Anvin2008-03-031-2/+3
| | | | | Use "-nostdinc -iwithprefix include" to prevent the inclusion of system header files, but still permitting *compiler* header files.
* com32: remove dependency files for "make tidy"H. Peter Anvin2008-02-191-2/+2
|
* Add dependency generation for com32 samples.H. Peter Anvin2008-02-191-2/+7
|
* hello.c: print arguments, no input sectionH. Peter Anvin2008-02-151-9/+4
| | | | | Make "Hello, World!" a little bit more plain, but do print out its arguments, if any. Useful for testing.
* Merge commit 'origin/master' into advH. Peter Anvin2008-01-107-7/+7
|\ | | | | | | | | | | Conflicts: extlinux/extlinux.c
| * Update copyright yearH. Peter Anvin2008-01-106-6/+6
| |
* | Initial support for auxilliary data vectorH. Peter Anvin2007-12-132-0/+54
|/ | | | | Initial support for the auxillary data vector, a storage mechanism intended to support boot-once and similar features.