summaryrefslogtreecommitdiff
path: root/dos
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'syslinux-5.10-pre2' into for-hpa/elflink/firmwareMatt Fleming2013-03-221-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux-5.10-pre2 Conflicts: NEWS com32/include/netinet/in.h com32/include/sys/cpu.h com32/lib/Makefile core/Makefile core/fs/diskio.c core/fs/pxe/pxe.h core/init.c core/mem/free.c core/mem/malloc.c mk/devel.mk version
| * mem: Add magic field to detect memory corruptionMatt Fleming2013-02-211-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Very little checking is performed on the validity of freelist metadata. Add a magic field to struct arena_header which can be used to detect memory corruption or whether a user tries to free something that isn't a malloc pointer. This feature can be enabled with -DDEBUG_MALLOC. Turn it on for development in mk/devel.mk. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-296-58/+175
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * dos: obtain the executable pathname, cleanupsH. Peter Anvin2013-01-176-58/+175
| | | | | | | | | | | | | | | | | | | | | | DOS actually does provide the fully qualified pathname to the executable, which would be useful to make ldlinux.c32 data rather than live inside the executable itself -- it has gotten too large. Also, move some DOS internals -- inline functions only used inside the dos directory -- out of libinstaller. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | mk/embedded.mk: Don't use -mregparm in coreMatt Fleming2013-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately commit 4eb06d95d882 ("mk: Add -fPIC for x86_64 to embedded.mk") left -mregparm enabled when compiling objects in core/, which means that when compiling for i386 those objects are compiled with a different ABI compared with everything else, leading to hangs when booting under 32-bit EFI. We should only enable -mregparm for code that absolutely requires it, such as dos/crt0.S which would need to be re-written to use another ABI. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-053-47/+73
|\ \ | |/ | | | | | | | | | | | | | | | | | | This merge also includes the Syslinux-4.06 release. Conflicts: Makefile com32/hdt/Makefile com32/modules/Makefile com32/samples/hello.c mtools/Makefile
| * installers: Install ldlinux.c32 automaticallysyslinux-5.00-pre8Matt Fleming2012-09-193-47/+73
| | | | | | | | | | | | | | Because ldlinux.c32 is required for Syslinux to function correctly, we should be installing it automatically much like ldlinux.sys. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Add per-firmware object directory supportMatt Fleming2012-10-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07-302-3/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Add NTFS filesystem support to Linux and Windows installersPaulo Alcantara2011-09-072-3/+4
| | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
* | Patches here support 32bit and 64bit environment.chandramouli narayanan2012-06-251-0/+7
|/ | | | | | | | | | | | | | | | | Move the standard definitions of constants, variously-sized ints,limits into respective architecture specific files. com32/include/bitsize holds the standard header files that in turn include bitsize32 or bitsize64 based on the architecture. The makefiles should build pick the right ones based on architecture. Files com32/include/sys/cpu.h, com32/include/sys/bitops.h now have architecture specific files underneath to define relevant macros definitions. com32/include/setjmp.h has architecture specific counterparts underneath. ssize_t in dos/stdlib.h is appropriately defined based on architecture to be able to support building for 32bit and 64bit environments. Remanants of the unused old i386-only files, if any, need to be pruned.
* 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>
* ld: Use ABSOLUTE() when taking differences between relative symbolsH. Peter Anvin2011-04-011-3/+3
| | | | | | | | | | binutils 2.21.51.0.6, and possibly other versions, generate the wrong result when subtracting two section-relative symbols (the final result ends up having the base of the section incorrectly added to it.) Work around this by using ABSOLUTE() on the symbols to force the result to become absolute. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos/dosexe.ld: Work around linker issue in binutils 2.21.51H. Peter Anvin2011-03-161-5/+6
| | | | | | | binutils 2.21.51 seems to have problem subtracting two section-relative symbols, so make them global. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* dos: Use libinstaller option parserShao Miller2010-07-191-61/+19
| | | | | | | We will produce an error message if a user attempts to use an option we don't implement. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* dos: add .size directives to int2526.SH. Peter Anvin2010-07-191-0/+2
| | | | | | Add .size directives to int2526.S. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: add .size attribute for syslinux_ldlinux_lenH. Peter Anvin2010-07-191-0/+1
| | | | | | | Just for the sake of good order, a .size attribute for syslinux_ldlinux_len. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: add missing file ldlinux.SH. Peter Anvin2010-07-192-0/+20
| | | | | | Add missing assembly wrapper for ldlinux.sys. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos, win32: use our own getopt_long() for bothH. Peter Anvin2010-07-193-179/+3
| | | | | | | | Use our own version of getopt_long() for both the DOS and Win32 installers. Currently, on MinGW, getopt_long() is a static library, but that could change in some installations. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: fix non-executable files which were +xH. Peter Anvin2010-07-196-0/+0
| | | | | | Don't make non-executable files +x... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: advance the pointer correctlyH. Peter Anvin2010-07-191-4/+5
| | | | | | Advance the pointer into the payload segment correctly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: add memcpy_from_sl() and use it where appropriateH. Peter Anvin2010-07-192-36/+49
| | | | | | | Add memcpy_from_sl() and use it to handle pointers into the payload section. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: change the link procedure to use negative pointers below DGROUPH. Peter Anvin2010-07-193-7/+9
| | | | | | | | | Use negative pointer values below DGROUP, i.e. for the .payload segment. This makes it a lot easier to figure out if we are dealing with pointers that shouldn't come from where they do, since the DGROUP and .payload segments no longer overlap, and in fact are congruent. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: Work-in-progress 2Shao Miller2010-07-102-0/+2
|
* dos: Work-in-progressShao Miller2010-07-0312-14/+305
|
* dos: include the ADV in the file size to be sector mappedsyslinux-4.00-pre62H. Peter Anvin2010-06-251-1/+2
| | | | | | | We need to include the ADV in the size of the file that must be sector mapped. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: vacuous ADV supportH. Peter Anvin2010-06-225-1/+81
| | | | | | Vacuous ADV support: install an empty ADV. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge syslinux/extlinux patch code and core codeH. Peter Anvin2010-06-202-1/+2
| | | | | | | | Merge the SYSLINUX and EXTLINUX patching code and core code, removing EXTLINUX as a separate derivative. All the disk-based systems now use the same code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Reduce sector 1 space pressure; further merge installer codesyslinux-4.00-pre52H. Peter Anvin2010-06-202-1/+101
| | | | | | | | | | Reduce sector 1 space pressure by moving objects that aren't needed by Sector 1 proper into an "extended patch area". While we're mucking with the installer code, make the syslxint and extlinux installer code even more similar. It should now be pretty straightforward to outright merge the code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Make syslinux installer real "pathbased"Alek Du2010-06-091-1/+1
| | | | | | | | | | | | | The previous merging extlinux/syslinux patch is not sufficient, the syslinux is not real "patchbased", hence: * fill currentdir in patcharea * search "extlinux.conf" and "syslinux.cfg" for generic_load_config * define boot_image and boot_sector macro for ldsyslinux this could make further merging extlinux and syslinux possible Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* dos: make sure we don't look like a Windows imageH. Peter Anvin2010-02-261-0/+8
| | | | | | | Some tools might assume that the reloc offset being 64 automatically means it's really a Windows file. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge remote branch 'origin/master' into pathbasedH. Peter Anvin2010-02-202-272/+1
|\
| * dosutil: move copybs here, update MakefileH. Peter Anvin2010-02-152-272/+1
| | | | | | | | | | | | | | Move copybs to dosutil, change the Makefile to deal with UPX being able to compress (e.g. very small files.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into fscH. Peter Anvin2009-12-224-61/+245
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/Makefile com32/lib/sys/open.c com32/modules/Makefile dos/Makefile dos/com16.ld dos/syslinux.c version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: int 25/26 may be register-dirty; wrap them in assemblyH. Peter Anvin2009-11-134-31/+102
| | | | | | | | | | | | | | | | int 25h and int 26h are known to be register-dirty for some versions of DOS -- unlike int 21h, which is usually clean. As such, wrap those in assembly functions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: don't add the linker script twice on the ld command lineH. Peter Anvin2009-11-111-1/+1
| | | | | | | | | | | | | | My version of the linker can deal with it, but others might not be so smart. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: drop unneeded .eh_frame sectionH. Peter Anvin2009-11-112-2/+5
| | | | | | | | | | | | gcc will produce an .eh_frame section, which we have no use for. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: always try the FAT32-aware direct I/O calls firstH. Peter Anvin2009-11-111-13/+17
| | | | | | | | | | | | | | | | Always try the FAT32-aware direct I/O calls before trying the legacy raw I/O calls. The reason for doing this is that the FAT32 stuff may be implemented as an add-on. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: DOS version 7.10 is 0x070a, not 0x0710...H. Peter Anvin2009-11-111-4/+4
| | | | | | | | | | | | | | | | | | Fix DOS version 7.10 (first FAT32-capable version) check. Perhaps we should just call the FAT32 calls blindly and fall back to the old calls if they fail? Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: fix the soft-locking loopH. Peter Anvin2009-11-101-1/+1
| | | | | | | | | | | | Code the soft-locking loop correctly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: try to handle both raw DOS mode and Windows modeH. Peter Anvin2009-11-101-31/+83
| | | | | | | | | | | | | | | | The locking API works very different in raw DOS mode and in Windows mode. The hierarchial locking is only available in the latter mode; in the former mode we can only use levels 0 and 4. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * dos: make DOS installer work under WinMEH. Peter Anvin2009-11-102-28/+85
| | | | | | | | | | | | | | At least under WinME, the DOS installer did not work as advertised. With these modifications, it seems to work okay. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | dos: add pointer to PE header in binaryH. Peter Anvin2009-07-101-0/+15
| | | | | | | | | | | | | | Explicitly add the pointer to the PE header in the binary. That way we might be eventually able to create a merged DOS/Win32 binary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | dos: assume NASM 2.03, so use -MP -MD for dependenciesH. Peter Anvin2009-06-241-2/+1
| | | | | | | | | | | | Assume NASM 2.03 or later, so use -MP -MD to generate dependencies. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into core32H. Peter Anvin2009-05-2917-997/+990
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/include/netinet/in.h com32/include/sys/cpu.h dos/argv.c dos/malloc.c dos/syslinux.c extlinux/main.c libinstaller/setadv.c libinstaller/syslinux.h libinstaller/syslxint.h libinstaller/syslxmod.c linux/syslinux.c mtools/syslinux.c win32/syslinux.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on dos/syslinux.cH. Peter Anvin2009-05-291-460/+446
| | | | | | | | | | | | | | | | | | Automatically reformat dos/syslinux.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 dos/string.hH. Peter Anvin2009-05-291-4/+4
| | | | | | | | | | | | | | | | | | Automatically reformat dos/string.h 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 dos/stdlib.hH. Peter Anvin2009-05-291-1/+1
| | | | | | | | | | | | | | | | | | Automatically reformat dos/stdlib.h 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 dos/stdio.hH. Peter Anvin2009-05-291-1/+1
| | | | | | | | | | | | | | | | | | Automatically reformat dos/stdio.h 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 dos/stdint.hH. Peter Anvin2009-05-291-28/+28
| | | | | | | | | | | | | | | | | | Automatically reformat dos/stdint.h 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>