aboutsummaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* isohybrid: fix isohybrid.c compileFrediano Ziglio2012-10-101-5/+5
| | | | | | | | | | | | | Make isohybrid.c compile on gcc 4.4 32 bit instead of producing the following error, isohybrid.c: In function ‘lendian_64’: isohybrid.c:437: error: integer constant is too large for ‘long’ type Cc: Matthew Garrett <mjg@redhat.com> Cc: Michal Soltys <soltys@ziu.info> Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* isohybrid: Fix building with --as-neededMicah Gersten2012-06-111-1/+1
| | | | | | | | | The library link order was wrong. This patch was picked from Ubuntu. Reported-and-tested-by: Tim Fletcher <tim@night-shade.org.uk> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohybrid: Generate MBR even when in EFI modeMatthew Garrett2012-03-261-5/+49
| | | | | | | | | | | Various EFI systems insist that there be no active flag in the pMBR in order to parse the GPT. The only way around this is to also generate a valid MBR - the firmware will then pick that up and use the system partition provided there. In order to deal with other EFI "sanity" checks, the partition type for the non-EFI partitions is set to 0 to skip the firmware bailing because of overlapping partitions. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohybrid: Generate GPT and Mac bootable imagesMatthew Garrett2011-08-242-8/+541
| | | | | | | | | | | | | | | | | | | | | | | EFI systems typically don't support booting off ISO 9660 filesystems, even if written to USB sticks. This patch adds support for generating a GPT that covers the stick as well, with an additional partition entry pointing purely at the secondary El Torito image. When burned to CD the secondary El Torito will be used as an EFI boot image, and when written to a USB stick the GPT partition will be found and may be booted from. However, some earlier EFI Macs don't support booting from El Torito images via EFI. To cater for them this also supports generating an Apple partition table, allowing a third El Torito image in HFS+ format to be made available to the firmware. This requires padding the MBR images slightly in order to leave space for the Apple header, but should have no functional impact. Sadly, this breaks the workaround for Acer BIOSes (magic xor instruction) when Mac support is enabled via -m... not much that can be done about that. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohybrid: unbreak hex/octal arguments in C versionsyslinux-4.05-pre3P J P2011-06-282-7/+14
| | | | | Allow hex/octal arguments in the C version of isohybrid, since they were accepted by the Perl version.
* Add "make strip" targetH. Peter Anvin2011-05-091-4/+10
| | | | | | | | 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>
* Remove -s for host binariesH. Peter Anvin2011-05-091-1/+1
| | | | | | | | Remove -s for host binaries; current practice is to let the distro packaging systems do that themselves. For the official binaries, we should probably strip them, but via an external tool. Signed-off-by: H. Peter Anvin <hpa@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>
* | ppmtolss16: remove obsolete Perl constructH. Peter Anvin2011-04-251-1/+1
|/ | | | | | | defined() on an array is considered obsolete; instead check for a nonzero number of elements with scalar(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdiskfind: abstract get page size so we can compile against klibcH. Peter Anvin2010-12-071-1/+11
| | | | | | | | | | klibc doesn't have sysconf(), because it involves a hideously inefficient multiplex. Thus, if _SC_PAGESIZE is not defined, invoke getpagesize(). Call the routine get_page_size() so it doesn't conflict on a platform which has both sysconf(_SC_PAGESIZE) and getpagesize(). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohybrid: Use ftruncate instead of seek for final paddingP J P2010-10-121-8/+4
| | | | | | | Pad the image via ftruncate instead of seeking to the end (which was done incorrectly). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Fix nuisance _FORTIFY_SOURCE failuresH. Peter Anvin2010-07-021-1/+3
| | | | | | | Fix a couple of _FORTIFY_SOURCE failures which are nuisance warnings, but fortunately not too hard to just plain avoid. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdiskfind: remove debugging printfH. Peter Anvin2010-06-221-2/+0
| | | | | | Remove accidentally checked in debugging printf. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdiskfind: make sure we don't map unavailable RAMH. Peter Anvin2010-06-221-6/+38
| | | | | | | | | Sometimes FBM is below the reserved memory limit, which means memory that is available to protected-mode operating systems only and which will be claimed by the kernel and therefore be unmappable. Read /proc/iomem to make sure the memory range is safe to map. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: add a sector_shift field to the MDI; fix memdiskfindH. Peter Anvin2010-06-221-1/+7
| | | | | | | Add a sector_shift field to the MDI rather than assuming 512-byte sectors. Fix memdiskfind to report size in bytes, not in sectors. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohybrid: fix another type mismatchH. Peter Anvin2010-06-221-1/+1
| | | | | | Fix another printf type mismatch in the C version of isohybrid. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdiskfind: sanity check the FBM valueH. Peter Anvin2010-06-211-1/+4
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* memdiskfind: utility to find an mBFT and output phram parametersH. Peter Anvin2010-06-212-1/+123
| | | | | | | A trivial Linux utility to search for mBFT and output its parameters in a form which can be used as input to the phram Linux kernel module. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* utils/Makefile: fix build rulesH. Peter Anvin2010-06-211-2/+2
| | | | | | Fix isohybrid build rules. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohybrid: fix beginner mistakesH. Peter Anvin2010-06-211-2/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* isohybrid: use getopt_long_only()syslinux-3.8xH. Peter Anvin2010-05-201-1/+1
| | | | | | | For compatibility with isohybrid.pl, use getopt_long_only() so long options are accepted with a single dash. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: create a C versionP. J. Pandit2010-05-204-2/+653
| | | | | | | Some Linux distributions have complained about Perl as a prerequisite for isohybrid, so create a C version. [ hpa: modified the array generator to put it all in one script ]
* mkdiskimage: add option -s to make a sparse imagesyslinux-3.85-pre4H. Peter Anvin2010-02-011-6/+10
| | | | | | | It is often fine to have a sparse file for the output image, so add an -s option to generate a sparse image. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* 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>
* isohybrid: make the -offset option actually workH. Peter Anvin2009-11-161-2/+2
| | | | | | | | Actually implement the -offset option. Credit for the patch goes to "cmdr from the gparted-forum", reported by Sven-Hendrik Haase <sh@lutzhaase.com>. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* utils/Makefile: install pxelinux-optionsH. Peter Anvin2009-09-291-1/+2
| | | | | | Make sure the pxelinux-options script gets installed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxelinux-options: add help textH. Peter Anvin2009-09-291-7/+24
| | | | | | Add help text to pxelinux-options. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxelinux: support hardcoded options "before" or "after"; toolH. Peter Anvin2009-09-291-0/+482
| | | | | | | | | Support hardcoded DHCP options both "before" or "after" the PXE-provided options. Add a tool to manipulate these hardcoded options. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: convert -id to a binary stringSteffen Winterfeldt2009-08-031-1/+1
| | | | | Shouldn't 'isohybrid -id ID' write ID as 32bit number? Currently it ends up as string messing up the mbr.
* bin2hex: actually account for the number of bytes writtenH. Peter Anvin2009-05-291-2/+5
| | | | | | Unlike C, in Perl printf() doesn't return the number of bytes written. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on utils/gethostip.cH. Peter Anvin2009-05-291-88/+88
| | | | | | | | | Automatically reformat utils/gethostip.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>
* isohybrid: we are backwards compatible again, change the error msgH. Peter Anvin2009-05-251-3/+2
| | | | | | | | We are backwards compatible again, at least as long as -partok is not used. However, there is no minor version number, so we can't check for that at this time. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: revert to a stack format compatible with previous versionsyslinux-3.81-pre14H. Peter Anvin2009-05-251-1/+1
| | | | | | | | Revert the isohybrid handover protocol so that it has a stack format compatible with the previous versions; that way we can also revert the magic number to a compatible one. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: support booting from partition; fix CBIOS bootingH. Peter Anvin2009-05-212-5/+11
| | | | | | | | Fix CBIOS in isohybrid mode. Also allow an isohybrid image to be booted from a partition. Unfortunately this breaks compatibility between differing versions of isohybrid and isolinux.bin. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: allow selecting the _c and _f versions of the prefixH. Peter Anvin2009-05-214-23/+58
| | | | | | | | Allow selecting the _f or _c versions of the prefix in addition to the default one. This is specified with the -forcehd0 or -ctrlhd0 options. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: add options, change default ptype to 0x17syslinux-3.81-pre8H. Peter Anvin2009-05-201-13/+81
| | | | | | | | Add support for setting a variety of options in isohybrid. Also change the default partition type to 0x17, "Windows hidden IFS", as that seems to make Windows less unhappy. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: preserve MBR id in isohybridPascal Terjan2009-05-011-6/+8
| | | | | | | | | | When running isohybrid again it's nice to preserve the MBR id There was some partial code to support setting the id using non existing to_int, but no way to use it. Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: support iso images over 2GBPascal Terjan2009-05-011-2/+1
| | | | | | | | "use integer" limits integers to 2^31-1 on 32 bits, which makes imgsize to be -1 on DVD images Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Unify dependency generationH. Peter Anvin2009-04-271-2/+4
| | | | | | | | | | | | 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>
* Fix minor errors in keytab-liloOlivier Korn2009-02-101-5/+5
| | | | | | | | | | | | | | | | | | H. Peter Anvin wrote: > Thanks for the warning. I have updated keytab-lilo in the git tree with > keytab-lilo.pl from LILO 22.8. Thank you H. Peter. I just checked it and the new version doesn't work "out of the box". It says... syntax error at keytab-lilo line 4, near "eval " Execution of keytab-lilo aborted due to compilation errors. Furthermore, after correcting lines 3 and 4 (which are responsible of the above error), keyboard maps can't be found (by loadkeys utility) because of an added bad extension (.map instead of .kmap). Attached is a patch I wrote in order to make it fully work (apply it against the version of keytab-lilo which is now in the git tree).
* Update keytab-lilo from LILO 22.8H. Peter Anvin2009-02-091-21/+5
|
* isohybrid: remove Perl modules we don't actually needH. Peter Anvin2008-09-071-3/+0
| | | | | | Remove Perl "use" statements that aren't actually required. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: verify we have a hybrid-compatible isolinux.binH. Peter Anvin2008-09-071-2/+9
| | | | | | | | Verify that the PXE boot loader is a hybrid-compatible isolinux.bin by looking for the hybrid boot signature, otherwise print an error message. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid, mkdiskimage: don't use sysopen(), sysread()H. Peter Anvin2008-09-072-4/+2
| | | | | | | | Don't use sysopen() and sysread() when it doesn't make sense. Especially avoid using sysread() -- sysopen() can be used with read(); the C fdopen() is implicit. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isohybrid: fix partition table generation, documentsyslinux-3.72-pre3H. Peter Anvin2008-09-051-10/+4
| | | | | | | Fix the generation of the partition table in isohybrid; also document the operation of the partition table. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ISOLINUX: support for hybrid mode (CD-ROM/USB key)H. Peter Anvin2008-09-052-1/+170
| | | | | | Still a work in progress. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* keytab-lilo: don't try to be too smartH. Peter Anvin2008-09-041-3/+3
| | | | | | | The keytab-lilo script tried to add pathname and extension, but loadkeys does that better. Therefore, don't try to be smart. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Centralize configurables; better "make install" etcH. Peter Anvin2008-05-291-16/+8
| | | | | | | 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-2910-0/+1279
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.