summaryrefslogtreecommitdiffstats
path: root/extlinux
Commit message (Collapse)AuthorAgeFilesLines
* installers: handle asprintf() correctlyH. Peter Anvin2010-07-021-5/+6
| | | | | | | | | | | | | It appears that the glibc version of asprintf() is braindamaged, and doesn't set the target pointer to NULL in the event of an error (only returns -1). Therefore we need to check the return value. Just in case someone else made the *opposite* error, also check the pointer. Bleh. The glibc documentation states that *BSD sets the pointer to NULL, but instead of following that, the glibc people put warn_unused_result on asprintf. Sigh. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: set bsHidden for loop devicesH. Peter Anvin2010-06-261-5/+8
| | | | | | | If we are on a loop device, set bsHidden based on the loopback device offset. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: modify the layout for btrfsH. Peter Anvin2010-06-251-9/+13
| | | | | | | | | Put the btrfs boot code right after the boot sector (they are really one image anyway). Align the ADV with the end of the boot region, so we can locate it for modification as necessary, and the offset don't end up shifting with different boot image sizes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'master' of ssh://terminus.zytor.com/pub/git/syslinux/syslinuxH. Peter Anvin2010-06-241-15/+46
|\
| * extlinux: fix ADV handling, so extlinux.sys -> ldlinux.sys actually worksH. Peter Anvin2010-06-241-9/+16
| | | | | | | | | | | | | | Do the appropriate thing for various error cases, so that the migration code actually does the right thing. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * extlinux: add code to automate extlinux.sys -> ldlinux.sys migrationH. Peter Anvin2010-06-241-16/+40
| | | | | | | | | | | | | | | | - Be able to modify the ADV either in extlinux.sys or ldlinux.sys - Be able to preserve the ADV from extlinux.sys - Remove extlinux.sys when installing ldlinux.sys Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Move modify_adv() into common codeH. Peter Anvin2010-06-231-25/+0
|/ | | | | | | modify_adv() should be used by any installer which uses the common CLI, so it should go into syslxopt.c. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* win32: vacuous ADV supportH. Peter Anvin2010-06-221-0/+1
| | | | | | | | Install an empty ADV in the Windows installer to keep it from being broken. In order to do that, separate the Unix-specific ADV I/O functions from the generic data structure manipulation. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge syslinux/extlinux patch code and core codeH. Peter Anvin2010-06-203-240/+32
| | | | | | | | 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 codeH. Peter Anvin2010-06-201-57/+70
| | | | | | | | | | 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>
* Move Linux ioctl header magic into a single fileH. Peter Anvin2010-06-162-500/+1
| | | | | | | Put all the Linux ioctl header magic into a single shared file, and try to make it as generally useful as possible. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: don't compile with -O0H. Peter Anvin2010-06-151-1/+1
| | | | | | -O0 is good for debugging, but sucks for production. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Fix prototype for generate_extentsH. Peter Anvin2010-06-151-1/+1
| | | | | | Add missing const Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: remove debugging printf'sH. Peter Anvin2010-06-151-2/+0
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Switch to 64-bit sector pointers everywhereH. Peter Anvin2010-06-152-9/+71
| | | | | | | | | | | | Switch to consistent use of 64-bit sector pointers; this should enable booting even for individual *partitions* larger than 2 TB. In order to not slow down the boot too much, switch the initial load from an enumeration to an extent map. This means the table gets larger (since we have to assume the worst case), but it simplifies the Sector 1 code (since we can push all the hard stuff into the installer), and will speed up booting in the general case. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Implement !GPT protocol in Syslinux core; handle offset > 2 TBH. Peter Anvin2010-06-141-3/+4
| | | | | | | | | | | | | | | Implement the !GPT handover protocol in the Syslinux core, and handle partition offsets above 2 TB. We do not yet handle filesystem sizes above 2 TB, but that should be a reasonably straightforward extension at this time (need to switch to 8-byte block pointers). This finally meant moving getlinsec out of the boot sector, since it no longer fits. Instead have a very simple getonesec implementation in the boot sector. getlinsec still fits in Sector 1, although it doesn't leave space for very many block pointers. That's still better than adding yet another boot loader stage, however. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* syslinux: don't break -o just yet; print warning and resumeH. Peter Anvin2010-06-091-2/+2
| | | | | | | -o has been supported for a very long time; recommend using -t instead, but for now proceed with an error message. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Clean up warnings in previous checkinH. Peter Anvin2010-06-091-0/+5
| | | | | | | Clean up warnings in checkin 146c34a2 Make syslinux installer real "pathbased" Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: add a --menu-save optionThomas Bächler2010-06-071-1/+8
| | | | | | | | Add the --menu-save option to set the MENU SAVE value from the running system using extlinux. From: Thomas Bächler <thomas@archlinux.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* unify common parts of extlinux and syslinux installerAlek Du2010-05-203-463/+45
| | | | | | | | | | | Thus we can share same command line options and reduce a lot of dup code... Seems like a big patch, but the changes are quite safe, no much logical change. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* syslinux: fix sector arraysAlek Du2010-05-201-1/+1
| | | | | | | | | The first sector ptr is in bs->NextSector not in the array in the patch_area. And actually the ADV sectors counting is wrong for a while ... Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* installers: fix warningsH. Peter Anvin2010-05-121-0/+2
| | | | | | CLean up warnings in the installers. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: handle cases of a single level of directoriesH. Peter Anvin2010-04-281-4/+16
| | | | | | | We had a boundary condition error where a single-level directory from the global root (e.g. /boot) would be incorrectly truncated; fix that. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: centralize file flags setting; add FAT supportH. Peter Anvin2010-03-041-37/+79
| | | | | | | Centralize the poking at file flags. Add FAT support to file flags setting (S bit). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: don't report failure after writing a FAT superblockH. Peter Anvin2010-03-041-6/+9
| | | | | | | Missing parens made us return failure after successfully writing a FAT superblock. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pathbased: Add FAT support to extlinux and let FAT be "true" pathbasedAlek Du2010-02-102-12/+103
| | | | | | | | Now extlinux can install FAT partition now, and FAT honors patched path area. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pathbased: fix relative path in the extlinux installerAlek Du2010-02-101-1/+1
| | | | | | | | Fix a bug in the extlinux installer where the relative path is not found correctly. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'fsc' into pathbasedH. Peter Anvin2010-02-101-1/+1
|\ | | | | | | | | | | | | Resolved Conflicts: core/fs/ext2/ext2.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'master' into fscH. Peter Anvin2010-01-241-1/+1
| |\ | | | | | | | | | | | | | | | Conflicts: com32/lib/MCONFIG com32/lib/readdir.c
| | * Makefile: replace -W -Wall with centralized $(GCCWARN)H. Peter Anvin2010-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace -W -Wall hardcoded into a bunch of Makefiles with $(GCCWARN), a centralized variable defined in the root MCONFIG. Add -Wstrict-prototypes to the list of global warnings: we should never have non-prototyped declarations. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | extlinux: make installer rewrite the whole fileH. Peter Anvin2010-01-221-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | With the additional patchable areas outside the main patch area, it is now much more complicated to keep track of a high water mark of what needs to be modified. It's easier to just rewrite the whole thing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | pathbased: clean up diskstart address numbers, 256 byte subvolsH. Peter Anvin2010-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Clean up the uses of hard-coded addresses in diskstart.inc. Furthermore, the btrfs spec allows 255 characters for a subvolume, so we might as well allocate that much. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | pathbased:btrfs: initial subvol supportAlek Du2010-01-131-6/+46
| | | | | | | | | | | | | | | | | | Added "Subvol" name in the extlinux.sys, and then btrfs fs code will handle the subvol correctly. Also fixed the bug where CurrentDirName and SubvolName should not exist in the first sector.
* | | core: initial work on path-based cwd selectionH. Peter Anvin2010-01-061-10/+44
|/ / | | | | | | | | | | | | | | | | | | | | Work on picking the initial cwd by storing a path instead of by storing an inode number. This should be both more general (in the sense of supporting filesystems in a generic way) as well as conceptually cleaner. The code doesn't work yet, but this at least provides support for the extlinux installer to store its subpath into the installed image. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | btrfs: add btrfs file system support to extlinuxAlek Du2009-12-222-56/+230
| | | | | | | | | | | | | | | | the extlinux.sys will be installed in btrfs first 64K blank area, and the extlinux.conf must be in root dir... Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | extlinux: add ext4 support to the installerH. Peter Anvin2009-08-071-4/+5
| | | | | | | | | | | | | | The filesystem code now supports ext4, so support it in the installer as well. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | extlinux: handle more than one sector of sector pointersH. Peter Anvin2009-07-161-5/+12
| | | | | | | | | | | | | | | | Fix the extlinux installer so we can handle more than one sector of sector pointers. This code should be merged with the equivalent code in the syslinux installer. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into core32H. Peter Anvin2009-06-261-2/+0
|\|
| * extlinux: remove duplicate "const char *program;"Gilles Espinasse2009-06-191-2/+0
| | | | | | | | Remove redundant declaration.
* | Merge branch 'master' into core32H. Peter Anvin2009-05-292-863/+838
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 extlinux/main.cH. Peter Anvin2009-05-291-702/+688
| | | | | | | | | | | | | | | | | | Automatically reformat extlinux/main.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 extlinux/ext2_fs.hH. Peter Anvin2009-05-291-176/+165
| | | | | | | | | | | | | | | | | | Automatically reformat extlinux/ext2_fs.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>
* | Standardize the names SECTOR_SIZE and SECTOR_SHIFTH. Peter Anvin2009-05-191-4/+4
| | | | | | | | | | | | | | Use the names SECTOR_SIZE and SECTOR_SHIFT everywhere, instead of an odd mix of symbols and hard-coded constants. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | FAT: change DOS installer to EXE; additional 32K limit fixesH. Peter Anvin2009-05-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional fixes for the 32K limits in the installers. In the case of the DOS installer, that means changing it from COM format to EXE format (since COM format has a 63K hard limit); retain the name syslinux.com for user compatibility, though (DOS doesn't care what the extension except for pathname search; if it finds an MZ EXE header it will use it.) With the change to EXE means having to handle more than one segment. Since we don't have a real DOS compiler we have to wing it a bit. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: handle more than 32K of code for disk-based derivativesH. Peter Anvin2009-05-141-81/+44
|/ | | | | | | | | | | | Handle more than 32K worth of code for disk-based derivatives. We do this by allowing the sector pointers to overflow past sector 1; this is OK because we limit a run to be based on only the pointers that we have read so far. XXX: This is implemented for EXTLINUX, but breaks SYSLINUX. Need to update (and unify!) the SYSLINUX installers to cope. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Unify dependency generationH. Peter Anvin2009-04-271-3/+3
| | | | | | | | | | | | Make the dependency generation more common; have a general pattern in MCONFIG, and use it in rules (not in CFLAGS). For NASM source, in order to stay compatible with old versions of NASM, run NASM twice; newer versions of NASM is capable of generating dependencies simultaneously like gcc can, but that would break compatibility with older distros. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Major Makefile cleanups; gcc 4.3.0 compatiblityH. Peter Anvin2008-08-201-12/+23
| | | | | Cleanup and centralize the Makefile system even more. Fix a gcc 4.3 incompatibility in memdisk (definition of strlen).
* Centralize more of the version number machineryH. Peter Anvin2008-07-071-2/+3
| | | | Centralize more (most) of the version number machinery to version.pl.
* extlinux: fix handling of /etc/mtabH. Peter Anvin2008-07-021-27/+30
| | | | | | When we didn't find the filesystem in /proc/mounts, we would go through /etc/mtab, but then completely botch the parsing thereof. Move the parsing to a common function to avoid this problem.
* Build _bin.c files in libinstaller; clean up B/I separationH. Peter Anvin2008-06-271-3/+5
| | | | | | | Clean up the BSUBDIR/ISUBDIR separation further. Build _bin.c files, which are an intermediate stage toward building the installers, in the libinstaller directory, since that directory is used by all the installers anyway. That also lets us get bin2c.pl out of the root.