summaryrefslogtreecommitdiff
path: root/libinstaller
Commit message (Collapse)AuthorAgeFilesLines
...
| * dos: Work-in-progressShao Miller2010-07-031-3/+5
| |
| * win32: Use libinstaller option parserShao Miller2010-07-032-1/+15
| | | | | | | | | | | | | | 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>
| * libinstaller: Add --mbr, --active, and --force optionsShao Miller2010-07-032-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to consolidate the installer option-parsing system, we add the --mbr (-m), --active (-a), and --force (-f) options from the DOS, Win32, and mtools installers to libinstaller. Since the -m and -a options are not currently valid for the Linux 'syslinux' and 'extlinux' installers, we add error messages to both of these. The -f option is allowed but does nothing for them. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* | elflink: merge with master branchFeng Tang2010-08-121-0/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | ELF modules basically work Conflicts: com32/Makefile com32/lib/Makefile com32/lua/etc/luavs.bat core/fs/getcwd.c core/include/fs.h core/pmapi.c libinstaller/syslxmod.c Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * elflink: comment off the size check in syslxmod.cFeng Tang2010-07-201-0/+2
| |
| * elflink: add new filesFeng Tang2010-07-203-0/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new file: com32/include/getopt.h new file: com32/include/ilog2.h new file: com32/lib/getopt_long.c new file: com32/lib/sys/sleep.c new file: com32/sysdump/acpi.c new file: com32/sysdump/be_srec.c new file: com32/sysdump/rbtree.c new file: com32/sysdump/rbtree.h new file: dos/getsetsl.c new file: dos/memmove.S new file: libinstaller/advio.c new file: libinstaller/fat.c new file: libinstaller/linuxioctl.h new file: memdisk/compiler.h new file: memdisk/mstructs.h new file: utils/memdiskfind.c
| * elflink: merge these filesFeng Tang2010-07-209-423/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/include/sys/times.h com32/include/syslinux/config.h com32/include/syslinux/pmapi.h com32/include/unistd.h com32/include/zconf.h com32/include/zlib.h dos/Makefile dos/errno.h dos/string.h dos/syslinux.c dosutil/eltorito.asm dosutil/mdiskchk.c dosutil/mdiskchk.com extlinux/Makefile extlinux/fat.h extlinux/main.c libfat/libfat.h libfat/open.c libinstaller/Makefile libinstaller/setadv.c libinstaller/syslinux.h libinstaller/syslxcom.c libinstaller/syslxcom.h libinstaller/syslxint.h libinstaller/syslxmod.c libinstaller/syslxopt.c libinstaller/syslxopt.h linux/Makefile linux/syslinux.c
* | installers: handle asprintf() correctlyH. Peter Anvin2010-07-021-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | <linux/loop.h>: deal with really ancient Linux kernel headersH. Peter Anvin2010-06-271-0/+6
| | | | | | | | | | | | | | RHEL4 had a 2.6.9 kernel, but 2.4.20 Linux kernel headers, so put in a workaround for 2.4 kernel headers. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | libinstaller: include <linux/loop.h>H. Peter Anvin2010-06-271-0/+90
| | | | | | | | | | | | | | Some versions of glibc have broken versions of <linux/loop.h>, so include our own canned version. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | extlinux: set bsHidden for loop devicesH. Peter Anvin2010-06-261-0/+7
| | | | | | | | | | | | | | If we are on a loop device, set bsHidden based on the loopback device offset. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' of ssh://terminus.zytor.com/pub/git/syslinux/syslinuxsyslinux-4.00-pre59H. Peter Anvin2010-06-241-2/+3
|\ \
| * | advio: make read_adv() distinguish ENOENT from other errorsH. Peter Anvin2010-06-241-2/+3
| | | | | | | | | | | | | | | | | | | | | Make it possible to distinguish ENOENT from other "non-fatal" errors in read_adv(), so we can try more than one filename. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | | Move modify_adv() into common codeH. Peter Anvin2010-06-232-0/+30
|/ / | | | | | | | | | | | | 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>
* | setadv: remove unused, nonportable header fileH. Peter Anvin2010-06-221-1/+0
| | | | | | | | | | | | This file does not need <sys/types.h>. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | win32: vacuous ADV supportH. Peter Anvin2010-06-222-129/+160
| | | | | | | | | | | | | | | | 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-205-111/+144
| | | | | | | | | | | | | | | | 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-140/+99
| | | | | | | | | | | | | | | | | | | | 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>
* | fat: fix off-by-one error in the FAT installersyslinux-4.00-pre51H. Peter Anvin2010-06-201-3/+4
| | | | | | | | | | | | | | Fix off-by-one error in the FAT installer, which caused the install to incorrectly abort without the patched version of the data. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Move Linux ioctl header magic into a single fileH. Peter Anvin2010-06-163-14/+109
| | | | | | | | | | | | | | 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>
* | installer: fix use of FIEMAPH. Peter Anvin2010-06-151-2/+2
| | | | | | | | | | | | | | Correct the implementation of block mapping using FIEMAP (as opposed to FIBMAP). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | dos: fix get_64_sl() and set_64_sl()H. Peter Anvin2010-06-151-5/+2
| | | | | | | | | | | | | | We must make sure we actually use the modified pointer returned from set_fs(), otherwise bad things happen... 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>
* | syslinux: synchronize generate_extents() with extlinuxH. Peter Anvin2010-06-151-16/+15
| | | | | | | | | | | | Synchronize the code for generate_extents() from extlinux to syslinux. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Switch to 64-bit sector pointers everywhereH. Peter Anvin2010-06-155-63/+266
| | | | | | | | | | | | | | | | | | | | | | | | 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-142-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | setadv: asprintf() doesn't return an error codeH. Peter Anvin2010-06-091-4/+4
| | | | | | | | | | | | | | asprintf() doesn't return an error number, but a count of characters (which we don't need.) Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | syslxopt: add missing break;H. Peter Anvin2010-06-091-0/+1
| | | | | | | | | | | | Add missing break; in the command-line parser. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | syslinux: provide for backwards compatibilityH. Peter Anvin2010-06-091-11/+22
| | | | | | | | | | | | | | Provide for backwards command-line compatibility, together with warning messages where appropriate. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | syslinux: don't break -o just yet; print warning and resumeH. Peter Anvin2010-06-092-14/+39
| | | | | | | | | | | | | | -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-2/+3
| | | | | | | | | | | | | | Clean up warnings in checkin 146c34a2 Make syslinux installer real "pathbased" Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Make syslinux installer real "pathbased"Alek Du2010-06-092-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | extlinux: add a --menu-save optionThomas Bächler2010-06-072-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-209-11/+595
| | | | | | | | | | | 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-2/+3
| | | | | | CLean up warnings in the installers. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge branch 'fsc' into pathbasedH. Peter Anvin2010-02-102-14/+22
|\ | | | | | | | | | | | | Resolved Conflicts: core/fs/ext2/ext2.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * FAT: be more explicit why we think a filesystem is badH. Peter Anvin2010-01-241-14/+21
| | | | | | | | | | | | | | | | Give readable error messages as to why we think a filesystem is bad. Given the current sizes of the installer, these extra strings are worth it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * FAT: fix installer on FAT32 filesystemsH. Peter Anvin2010-01-241-0/+1
| | | | | | | | | | | | | | | | | | The FAT32 superblock has a 12-byte reserved field which wasn't accounted for in the structure. As a result, the installer refused to run on a FAT32 filesystem. Fix the structure. Reported-by: Kim Mik <kimmik999999@yahoo.co.uk> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pathbased:btrfs: initial subvol supportAlek Du2010-01-131-0/+2
| | | | | | | | | | | | 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-062-2/+2
|/ | | | | | | | | | | 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>
* Merge branch 'master' into core32H. Peter Anvin2009-05-294-358/+359
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 libinstaller/syslxmod.cH. Peter Anvin2009-05-291-188/+187
| | | | | | | | | | | | | | | | | | Automatically reformat libinstaller/syslxmod.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 libinstaller/syslxint.hH. Peter Anvin2009-05-291-18/+18
| | | | | | | | | | | | | | | | | | Automatically reformat libinstaller/syslxint.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 libinstaller/syslinux.hH. Peter Anvin2009-05-291-10/+10
| | | | | | | | | | | | | | | | | | Automatically reformat libinstaller/syslinux.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 libinstaller/setadv.cH. Peter Anvin2009-05-291-89/+89
| | | | | | | | | | | | | | | | | | Automatically reformat libinstaller/setadv.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>
* | dos: uninline far data accessor functionsH. Peter Anvin2009-05-251-6/+12
| | | | | | | | | | | | | | Forcibly uninline the far data accessor functions. This significantly reduces the size of the code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | dos installer: reuse ldlinux_segH. Peter Anvin2009-05-251-3/+2
| | | | | | | | | | | | | | Make ldlinux_seg a global variable, and use it in syslxmod.c. This reduces the size of syslxmod.o fairly significantly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Standardize the names SECTOR_SIZE and SECTOR_SHIFTH. Peter Anvin2009-05-192-5/+6
| | | | | | | | | | | | | | 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-194-42/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>