mirror of
https://github.com/ipxe/ipxe
synced 2026-05-04 03:03:43 +03:00
646d4b0a09168669c883c249a3f027a9af357854
For UEFI, the USB disk image is constructed from the built EFI binary (e.g. bin-x86_64-efi/ipxe.efi) by genfsimg, which does not itself have any way to access the build configuration. We therefore need a way to annotate the binary such that genfsimg can determine whether or not to include a log partition within the USB disk image. The "OEM ID" and "OEM information" fields within the PE header can be used for this, since they are easily accessed and serve no other purpose. We define bit 0 of "OEM information" as a flag indicating that a log partition should be included. If this bit is set, genfsimg will create a log partition with a layout matching that of the BIOS build (i.e. using partition 3 and at an offset of 16kB from the start of the disk). The PE header is constructed by elf2efi.c, which takes as an input the linked ELF form of the binary. We use an ELF .note section to allow any linked-in object to communicate the log partition request through to elf2efi.c, which then populates the OEM information field accordingly. We choose to use the same field locations within the BIOS bzImage header, since this allows genfsimg to use the same logic for both BIOS and UEFI binaries. In a BIOS build, there is no external processing equivalent to elf2efi.c, and so we construct the field value directly using absolute symbols and explicit relocation records. (Note that the bzImage header is relevant only when using genfsimg to construct a combined BIOS/UEFI image. In the common case of building a BIOS-only image such as bin/ipxe.usb, the partition table is manually constructed by usbdisk.S and genfsimg is not involved.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
iPXE network bootloader
iPXE is the leading open source network boot firmware. It provides a full PXE implementation enhanced with additional features such as:
-
boot from a web server via HTTP or HTTPS,
-
boot from an iSCSI, FCoE, or AoE SAN,
-
control the boot process with a script,
You can use iPXE to replace the existing PXE ROM on your network card, or you can chainload into iPXE to obtain the features of iPXE without the hassle of reflashing.
iPXE is free, open-source software licensed under the GNU GPL (with some portions under GPL-compatible licences).
You can download the rolling release binaries (built from the latest commit), or use the most recent stable release.
For full documentation, visit the iPXE website.
Languages
C
96.9%
Assembly
1.5%
Perl
0.6%
Python
0.4%
Makefile
0.4%