summaryrefslogtreecommitdiff
path: root/libinstaller
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-291-17/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-17/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3Matt Fleming2012-12-071-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/Makefile com32/lib/sys/module/elf_module.c core/cleanup.c core/comboot.inc core/conio.c core/fs/fs.c core/init.c core/mem/free.c core/mem/malloc.c core/timer.inc diag/geodsp/Makefile extlinux/main.c mk/embedded.mk modules/Makefile Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * Merge branch 'xfs-for-hpa' of git://zytor.com/users/pcacjr/syslinux into ↵Matt Fleming2012-11-271-2/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/elflink/xfs Pull XFS filesystem driver from Paulo Alcantara, * 'xfs-for-hpa' of git://zytor.com/users/pcacjr/syslinux: (60 commits) xfs: Fix the way we check di_mode of an inode xfs: Cleanup previous commit xfs: Add xfs_readlink() xfs: Cleanup and remove some trailing whitespaces xfs: Add XFS_DINODE_FMT_BTREE support in xfs_next_extent() xfs: Cleanup and remove some trailing whitespaces xfs: Rework xfs_dir2_get_right_blk() xfs: cleanup unused structure xfs: Remove some trailing whitespaces xfs: Add full B+tree search support in xfs_dir2_node_find_entry() xfs: Add xfs_fmt_btree_find_entry() xfs: Fix memory leak in xfs_dir2_node_find_entry() function xfs: Cleanup xfs_readdir_dir2_leaf() function xfs: Implement xfs_readdir_dir2_node() function EXTLINUX: Add sanity check for XFS filesystems xfs: Add xfs_fmt_local_readdir() function xfs: Add xfs_fmt_local_find_entry() function xfs: Move readdir functions to another source file xfs: Remove trailing whitespace in xfs_dir2_isleaf() function xfs: Move dir2 functions to another source file ... Conflicts: extlinux/main.c
| | * EXTLINUX: Initial XFS filesystem supportPaulo Alcantara2012-07-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XFS filesystems are divided into a number of equally sized chunks called Allocation Groups (AGs). Each AG can almost be thought of as an individual filesystem that maintains its own's space usage. Each AG has the following structure: - A super block describing the overall filesystem info - Free space management - Inode allocation and tracking So, due to historical reasons (SGI IRIX's design of disk layouts), the first sector in the primary AG on XFS filesystems contains the superblock, which is a problem with bootloaders that rely on BIOSes (that load VBRs which are located in the first sector of the partition). This patch adds support to the EXTLINUX installer to be able to install Syslinux in an XFS partition, but with a limitation (temporarily) of relying on the filesystem block size being 4+ KiB, otherwise there won't be enough space to store the Syslinux boot sector in the blank area around the 2048 to 4096 bytes of the primary AG/superblock. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | | libinstaller: Fixup merge botchMatt Fleming2012-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The merge commit 0b26e59c8f5d didn't cause any conflicts in libinstaller/ so this bug went unnoticed, but we need to sync the merged libinstaller/Makefile with the changes in 1408e6ca7b38 ("Add per-firmware object directory support"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-054-9/+24
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'master' into elflinkMatt Fleming2012-10-242-8/+17
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following conflict is a result of the fact comapi_chainboot was only stubbed out on the 'elflink' branch but was properly marked as obsolete in 'master'. Conflicts: core/comboot.inc
| | * | Packed definition: workaround for mingw + gcc 4.7H. Peter Anvin2012-10-221-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __attribute__((packed)) does the wrong thing when in ms-struct mode; this breaks compiling on mingw-w64. Therefore force gcc struct mode when we use packed. This obsoletes checkin 7d9ee65 win: Add -mno-ms-bitfields Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| | * | make some functions static remove unused NADV defineFrediano Ziglio2012-10-091-2/+0
| | |/ | | | | | | | | | | | | | | | | | | Just some minor cleanup Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | installers: Install ldlinux.c32 automaticallysyslinux-5.00-pre8Matt Fleming2012-09-192-1/+7
| | | | | | | | | | | | | | | | | | | | | 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-162-10/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'origin/master' into elflinksyslinux-5.00-pre4H. Peter Anvin2012-06-222-1/+9
|\ \ | |/
| * syslxopt: fix syntax errorssyslinux-4.06-pre7H. Peter Anvin2012-06-201-2/+2
| | | | | | | | | | | | Oops :) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * extlinux: add --device option to override device detectH. Peter Anvin2012-06-202-1/+9
| | | | | | | | | | | | | | Add a --device option for scripts and expert users to override the device detection. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge remote-tracking branch 'zytor/master' into merge/elflink/masterMatt Fleming2012-05-3110-55/+193
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of development has gone on in the 'master' branch since the last time we merged; new features, bug fixes, etc, etc. Conflicts: Makefile com32/Makefile com32/lib/Makefile com32/lib/syslinux/load_linux.c com32/modules/Makefile com32/modules/chain.c core/bootsect.inc core/init.inc version
| * libinstaller: Avoid using <linux/ext2_fs.h>syslinux-4.06-pre3H. Peter Anvin2012-03-263-11/+886
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't use <linux/ext2_fs.h> if we can avoid it. The ioctl constants have been globalized and moved to <linux/fs.h>. Use a private copy of ext2_fs.h from e2fsprogs with the ioctl constants removed for the data structures. Do at least attempt backward compatibility for old kernel headers, but no real hope of proper operation there... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Add NTFS filesystem support to Linux and Windows installersPaulo Alcantara2011-09-0710-60/+184
| | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
| * implement fat_check_sb_fields()Paulo Alcantara2011-07-051-0/+9
| | | | | | | | | | | | Sanity check for FAT volumes Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
| * Add "make strip" targetH. Peter Anvin2011-05-091-0/+2
| | | | | | | | | | | | | | | | Add a "make strip" target, to make doing the official build easier. We want the official build to have stripped binaries for size reasons, so do it right and make it an actual build target. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | libinstaller: Avoid using <linux/ext2_fs.h>H. Peter Anvin2012-04-033-11/+883
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use <linux/ext2_fs.h> if we can avoid it. The ioctl constants have been globalized and moved to <linux/fs.h>. Use a private copy of ext2_fs.h from e2fsprogs with the ioctl constants removed for the data structures. Do at least attempt backward compatibility for old kernel headers, but no real hope of proper operation there... [ Doing this as a cherry-pick to unblock this branch ] Signed-off-by: H. Peter Anvin <hpa@zytor.com> Resolved Conflicts: libinstaller/linuxioctl.h
* | Merge remote-tracking branch 'zytor/master' into elflinkMatt Fleming2011-04-263-9/+26
|\ \ | |/ | | | | | | | | | | | | | | | | | | We need the recent Makefile filename changes to be merged into the elflink branch because it will make things simpler when converting all modules to ELF format. Conflicts: com32/Makefile com32/modules/Makefile version
| * Merge commit 'syslinux-4.04' into dynamic-sectordynamic-sectorH. Peter Anvin2011-04-182-0/+14
| |\
| | * libinstaller: implement syslinux_already_installedPaulo Alcantara2011-04-152-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | syslinux_already_installed function will be used in both extlinux and syslinux for checking if the boot sector has either the string "SYSLINUX" or "EXTLINUX" in the OEMID field. Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
| * | installer: Update and correct generate_extents()H. Peter Anvin2011-04-051-9/+12
| |/ | | | | | | | | | | | | 1. Make sure extents are strictly less than 64K in size 2. Make sure extents do not cross 64K boundaries Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge remote-tracking branch 'zytor/master' into elflink-mergeMatt Fleming2011-04-043-6/+7
|\ \ | |/ | | | | | | | | | | Conflicts: com32/lib/Makefile com32/lib/sys/open.c version
| * libinstaller/fat.c: remove variables set but not usedH. Peter Anvin2011-03-161-3/+0
| | | | | | | | | | | | gcc 4.6 warns on variables set but not used, so remove them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * disk: put a magic at the end of the boot sectorH. Peter Anvin2011-01-251-2/+6
| | | | | | | | | | | | | | | | | | Put a magic signature at the end of the boot sector, and a backpointer to the code that contains the pointer to the main code extent. This is useful for integrity-checking tools, and could help the installer in the future. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * Fix missing option -s in libinstallersyslinux-4.03-pre3Arwin Vosselman2010-09-091-1/+1
| | | | | | | | | | | | | | | | In 'libinstaller/syslxopt.c' on line 71 the "s" (undercast) is missing in: const char short_options[] = "t:fid:UuzS:H:rvho:OM:ma"; Adding the 's' there seems to solve our problem.
* | Merge branch 'master' into elflink-mergeH. Peter Anvin2010-08-125-17/+229
|\ \ | |/ | | | | | | | | | | | | Resolved Conflicts: core/diskfs.inc core/mem/free.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * syslxopt: remove lengthy warning messageH. Peter Anvin2010-07-301-10/+0
| | | | | | | | | | | | | | Remove a lengthy warning message which cause the actual command reference to overflow a 24-line screen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * syslxopt: fix fatal warningsH. Peter Anvin2010-07-301-9/+12
| | | | | | | | | | | | | | | | | | | | | | Fix fatal warnings in syslxopt.c partly due to legal but non-idiomatic use of switch(). Since the only purpose was to conditionalize single output statements, just do it explicitly. In addition, since they are conditional messages, there is no need to explain when they apply. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * libinstaller/syslxopt.c: remove unneeded usage text from certain variants.Gene Cumm2010-07-271-3/+10
| | | | | | | | Gert Hulselmans noticed this.
| * dos: Use libinstaller option parserShao Miller2010-07-191-2/+3
| | | | | | | | | | | | | | 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, win32: use our own getopt_long() for bothH. Peter Anvin2010-07-192-0/+177
| | | | | | | | | | | | | | | | 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-193-0/+0
| | | | | | | | | | | | Don't make non-executable files +x... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * dos: add memcpy_from_sl() and use it where appropriateH. Peter Anvin2010-07-191-0/+2
| | | | | | | | | | | | | | 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-191-3/+1
| | | | | | | | | | | | | | | | | | 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-101-0/+0
| |
| * 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>