aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/genfsimg
Commit message (Collapse)AuthorAgeFilesLines
* [build] Fix genfsimg to work with FATDIR with spaceJuniorJPDJ2021-07-261-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use SOURCE_DATE_EPOCH for isohybrid MBR ID if it existsMichael Brown2021-05-241-1/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use SOURCE_DATE_EPOCH for .iso timestamps if it existsMichael Brown2021-05-241-0/+10
| | | | | Originally-implemented-by: Bernhard M. Wiedemann <bwiedemann@suse.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix genfsimg to build ISO with long filenamesMatya2021-04-201-1/+1
| | | | | | | | | | Commit 79c0173 ("[build] Create util/genfsimg for building filesystem-based images") introduced the new genfsimg, which lacks the -l option when building ISO files. This option is required to build level 2 (long plain) ISO9660 filenames, which are required when using the .lkrn extensions on older versions of ISOLINUX. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Report detailed errors when unable to find a usable mkisofsMichael Brown2021-02-121-3/+17
| | | | | | | | | | | | | | | | As of commit 7c3d186 ("[build] Check that mkisofs equivalent supports the required options"), we may refuse to use a mkisofs equivalent if it does not support the options required to produce the requested output file. This can result in confusing error messages since the user is unaware of the reason for which the installed mkisofs or genisoimage has been rejected. Fix by explicitly reporting the reason why each possible mkisofs equivalent could not be used. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Ensure that isolinux.bin is modifiableMichael Brown2021-01-291-1/+1
| | | | | | | | | The -boot-info-table option to mkisofs will cause it to overwrite a portion of the local copy of isolinux.bin. Ensure that this file is writable. Originally-implemented-by: Nikolai Lifanov <lifanov@mail.lifanov.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add syslinux search locations used on FreeBSDMichael Brown2021-01-291-0/+2
| | | | | Originally-implemented-by: Nikolai Lifanov <lifanov@mail.lifanov.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Automatically load "/autoexec.ipxe" when booted from a filesystemMichael Brown2021-01-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting iPXE from a filesystem (e.g. a FAT-formatted USB key) it can be useful to have an iPXE script loaded automatically from the same filesystem. Compared to using an embedded script, this has the advantage that the script can be edited without recompiling the iPXE binary. For the BIOS version of iPXE, loading from a filesystem is handled using syslinux (or isolinux) which allows the script to be passed to the iPXE .lkrn image as an initrd. For the UEFI version of iPXE, the platform firmware loads the iPXE .efi image directly and there is currently no equivalent of the BIOS initrd mechanism. Add support for automatically loading a file "autoexec.ipxe" (if present) from the root of the filesystem containing the UEFI iPXE binary. A combined BIOS and UEFI image for a USB key can be created using e.g. ./util/genfsimg -o usbkey.img -s myscript.ipxe \ bin-x86_64-efi/ipxe.efi bin/ipxe.lkrn The file "myscript.ipxe" would appear as "autoexec.ipxe" on the USB key, and would be loaded automatically on both BIOS and UEFI systems. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Report a meaningful error message if isolinux.bin is missingMichael Brown2021-01-241-2/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Check that mkisofs equivalent supports the required optionsMichael Brown2021-01-241-19/+14
| | | | | | | | | | | | | | | | | The "-e" option required for creating EFI boot images is supported only by widely used patched versions of genisoimage. Check that the required options are supported when selecting a mkisofs equivalent, thereby allowing a fallback to the use of xorrisofs when building a UEFI ISO image on a system with an unpatched version of genisoimage. Continue to prefer the use of genisoimage over xorrisofs, since there is apparently no way to inhibit the irritatingly useless startup banner message printed by xorrisofs even when the "-quiet" option is specified. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow an initrd script to be provided via genfsimgMichael Brown2021-01-221-4/+15
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fail gracefully when no input files are given to genfsimgMichael Brown2021-01-221-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use explicit disk geometry for generated FAT filesystem imagesMichael Brown2021-01-221-4/+7
| | | | | | | | | For FAT filesystem images larger than a 1.44MB floppy disk, round up the image size to a whole number of 504kB cylinders before formatting. This avoids losing up to a cylinder's worth of expected space in the filesystem image. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix genfsimg incompatibility with dash shellMichael Brown2021-01-221-2/+2
| | | | | Reported-by: Antony Messerli <antony@mes.ser.li> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Set volume name "iPXE" on FAT filesystem imagesMichael Brown2021-01-211-2/+2
| | | | | | | | | | Allow generated filesystem images to be accessed using the file:// URI syntax by setting a defined volume name. This allows a script placed on the same filesystem image to be accessed using e.g. chain file://iPXE/script.ipxe Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow genfsimg to be used on third party UEFI binariesMichael Brown2021-01-191-3/+21
| | | | | | | | | | Extract the PE header offset from the MZ header rather than assuming a fixed offset as used in the binaries created by the iPXE build system. This allows genfsimg to be used to create bootable filesystem images from third party UEFI binaries such as the UEFI shell. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include xorrisofs as a viable mkisofs equivalentOmgalof2021-01-181-2/+2
| | | | | | | | Add support for xorrisofs, a GNU mkisofs equivalent that is available in most distro repositories. Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Create util/genfsimg for building filesystem-based imagesMichael Brown2021-01-131-0/+253
Generalise util/geniso, util/gensdsk, and util/genefidsk to create a single script util/genfsimg that can be used to build either FAT filesystem images or ISO images. Extend the functionality to allow for building multi-architecture UEFI bootable ISO images and combined BIOS+UEFI images. For example: ./util/genfsimg -o combined.iso \ bin-x86_64-efi/ipxe.efi \ bin-arm64-efi/ipxe.efi \ bin/ipxe.lkrn would generate a hybrid image that could be used as a CDROM (or hard disk or USB key) on legacy BIOS, x86_64 UEFI, or ARM64 UEFI. Signed-off-by: Michael Brown <mcb30@ipxe.org>