A network boot loader
Go to file
Laszlo Ersek a515f8e718 spec: combine BIOS and EFI roms using "util/catrom.pl"
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1926561

When combining BIOS and EFI roms, the EfiRom utility from edk2-tools
clears the "last image indicator" in the BIOS ROM image header, and then
updates the checksum in the last byte of the BIOS ROM image. However,
EfiRom does not update any internal, iPXE-specific checksums in the BIOS
ROM image.

In the rare case when the checksum residing in the BIOS ROM's last byte
does not fall into such padding that was added previously by
"util/padimg.pl" -- that is, if the BIOS image is a whole multiple of 512
bytes even without padding --, then the recalculation of *only* the last
byte invalidates the LZMA stream and/or an internal CRC32 checksum that
are embedded elsewhere in the BIOS ROM. Consequently, iPXE fails to
LZMA-decompress itself when booted on SeaBIOS.

iPXE's own "util/catrom.pl" utility knows how to update internal
(iPXE-specific) checksums; use this tool for combining the BIOS and EFI
images.

(

  In theory we could abandon EfiRom from edk2-tools altogether, and
  prepare even the stand-alone EFI driver image with iPXE-internal
  tooling. For this, we'd only have to build the
  "bin-x86_64-efi/${rom}.efirom" target, in place of the
  "bin-x86_64-efi/${rom}.efidrv" target. The iPXE build would
  automatically convert the latter into the former with the "util/efirom"
  program.

  Unfortunately, "util/efirom" does not support "EFI compression", and
  that would cause us to nearly exhaust our 256 KB "migration buffer".
  Therefore, continue using EfiRom, but only for compressing the "efidrv"
  binary to a single (not combined) EFI ROM image. Perform only the
  combination step with "util/catrom.pl".

)

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2021-02-23 09:49:31 -05:00
.gitignore Update to latest git snapshot 2019-02-12 11:05:39 +00:00
0001-build-customize-configuration.patch Re-enable HTTPS support, with edk2 fix included (bz 1820836) 2020-09-15 19:28:56 -04:00
0002-Use-spec-compliant-timeouts.patch Add missing patches 2017-11-29 14:50:18 -05:00
ipxe.spec spec: combine BIOS and EFI roms using "util/catrom.pl" 2021-02-23 09:49:31 -05:00
sources Update to newer git snapshot, synced with qemu.git 2020-09-15 19:29:55 -04:00