summaryrefslogtreecommitdiffstats
path: root/src/Makefile.efi
Commit message (Collapse)AuthorAgeFilesLines
* [efi] Add support for driving EFI_MANAGED_NETWORK_PROTOCOL devicesMichael Brown2024-03-251-2/+2
| | | | | | | | | | | | | | | | | We want exclusive access to the network device, both for performance reasons and because we perform operations such as EAPoL that affect the entire link. We currently drive the network card via either a native hardware driver or via the SNP or NII/UNDI interfaces, both of which grant us this exclusive access. Add an alternative driver that drives the network card non-exclusively via the EFI_MANAGED_NETWORK_PROTOCOL interface. This can function as a fallback for situations where neither SNP nor NII/UNDI interfaces are functional, and also opens up the possibility of non-destructively installing a temporary network device over which to download the autoexec.ipxe script. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid using multiple target patterns in pattern rulesMichael Brown2023-06-301-1/+5
| | | | | | | | | | | | | Multiple target patterns in pattern rules are treated as grouped targets regardless of the separator character. Newer verions of make will generate "warning: pattern recipe did not update peer target" to warn that the rule was expected to update all of the (implicitly) grouped targets. Fix by splitting all multiple target pattern rules into single target pattern rules. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Use zero for PCI vendor/device IDs when no applicable ID existsMichael Brown2021-07-261-1/+2
| | | | | | | | | | | | | | | | | | When building an EFI ROM image for which no PCI vendor/device ID is applicable (e.g. bin-x86_64-efi/ipxe.efirom), the build process will currently construct a command such as ./util/efirom -v -d -c bin-x86_64-efi/ipxe.efidrv \ bin-x86_64-efi/ipxe.efirom which gets interpreted as a vendor ID of "-0xd" (i.e. 0xfff3, after truncation to 16 bits). Fix by using an explicit zero ID when no applicable ID exists, as is already done when constructing BIOS ROM images. Reported-by: Konstantin Aladyshev <aladyshev22@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Compress EFI ROM imagesMichael Brown2021-02-191-1/+1
| | | | | | | | | Use the reference implementation of the EFI compression algorithm (taken from the EDK2 codebase, with minor bugfixes to allow compilation with -Werror) to compress EFI ROM images. Inspired-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Create util/genfsimg for building filesystem-based imagesMichael Brown2021-01-131-3/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* [efi] Enable stack protection where possibleMichael Brown2020-06-241-0/+8
| | | | | | | | | | | | | | | | | | | Enable -fstack-protector for EFI builds, where binary size is less critical than for BIOS builds. The stack cookie must be constructed immediately on entry, which prohibits the use of any viable entropy source. Construct a cookie by XORing together various mildly random quantities to produce a value that will at least not be identical on each run. On detecting a stack corruption, attempt to call Exit() with an appropriate error. If that fails, then lock up the machine since there is no other safe action that can be taken. The old conditional check for support of -fno-stack-protector is omitted since this flag dates back to GCC 4.1. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Centralise architecture-independent EFI Makefile and linker scriptMichael Brown2016-03-121-0/+46
Signed-off-by: Michael Brown <mcb30@ipxe.org>