summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/errfile.h
diff options
context:
space:
mode:
authorMichael Brown2021-01-25 17:34:22 +0100
committerMichael Brown2021-01-25 18:04:44 +0100
commita3f1e8fb6707811e6eb90e339d7ebe813fd89a63 (patch)
treed97f693d64a39191a02f472f8fdc3ca4f02a80e0 /src/include/ipxe/errfile.h
parent[image] Provide image_memory() (diff)
downloadipxe-a3f1e8fb6707811e6eb90e339d7ebe813fd89a63.tar.gz
ipxe-a3f1e8fb6707811e6eb90e339d7ebe813fd89a63.tar.xz
ipxe-a3f1e8fb6707811e6eb90e339d7ebe813fd89a63.zip
[efi] Automatically load "/autoexec.ipxe" when booted from a filesystem
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>
Diffstat (limited to 'src/include/ipxe/errfile.h')
-rw-r--r--src/include/ipxe/errfile.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h
index d317ce5b..f14cb861 100644
--- a/src/include/ipxe/errfile.h
+++ b/src/include/ipxe/errfile.h
@@ -383,6 +383,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_acpi_settings ( ERRFILE_OTHER | 0x00500000 )
#define ERRFILE_ntlm ( ERRFILE_OTHER | 0x00510000 )
#define ERRFILE_efi_veto ( ERRFILE_OTHER | 0x00520000 )
+#define ERRFILE_efi_autoboot ( ERRFILE_OTHER | 0x00530000 )
/** @} */