summaryrefslogtreecommitdiffstats
path: root/src/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* [build] Allow GITVERSION to be specified as an environment variableMichael Brown2026-01-251-10/+7Star
| | | | | | | | | | | When using GitHub Actions with a job container that does not have the git tools installed, the actions/checkout step will download a snapshot instead of performing a git clone, and will therefore not create a .git directory. Allow the GITVERSION variable to be specified externally, so that the test suite logs can still display the commit of the build being tested. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Do not use "git describe" to construct version numberMichael Brown2026-01-211-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Using "git describe" to automatically construct the version number has caused more problems than it has solved. In particular, it causes errors when building from a shallow clone of the repository, which is a common scenario in modern automated build environments. Define the base version number (currently 1.21.1+) as a set of hardcoded constants within the Makefile, to be updated whenever a release is made. It is extremely useful to have the git commit ID present in the startup banner. End users tend to provide screenshots of failures, and having the commit ID printed at startup makes it trivial to identify which version of the code is in use. Identify the git version (if building from a git tree) by directly reading from .git/HEAD and associated files. This allows the git commit ID to potentially be included even if the build environment does not have the git tools installed. Use the default shallow clone in the GitHub Actions workflow, since we no longer require access to the full commit history. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Mark existing files as explicitly forbidden for Secure BootMichael Brown2026-01-131-10/+6Star
| | | | | | | | | | | | | | | The third-party 802.11 stack and NFS protocol code are known to include multiple potential vulnerabilities and are explicitly forbidden from being included in Secure Boot signed builds. This is currently handled at the per-directory level by defining a list of source directories (SRCDIRS_INSEC) that are to be excluded from Secure Boot builds. Annotate all files in these directories with FILE_SECBOOT() to convey this information to the new per-file Secure Boot permissibility check, and remove the old separation between SRCDIRS and SRCDIRS_INSEC. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dwgpio] Add driver for the DesignWare GPIO controllerMichael Brown2025-08-051-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uart] Allow for the existence of non-16550 UARTsMichael Brown2025-06-201-0/+1
| | | | | | | | | | | | | | | | | | | Remove the assumption that all platforms use a fixed number of 16550 UARTs identifiable by a simple numeric index. Create an abstraction allowing for dynamic instantiation and registration of any number of arbitrary UART models. The common case of the serial console on x86 uses a single fixed UART specified at compile time. Avoid unnecessarily dragging in the dynamic instantiation code in this use case by allowing COMCONSOLE to refer to a single static UART object representing the relevant port. When selecting a UART by command-line argument (as used in the "gdbstub serial <port>" command), allow the UART to be specified as either a numeric index (to retain backwards compatiblity) or a case-insensitive port name such as "COM2". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Add a .pf32 build target for padded parallel flash imagesMichael Brown2025-05-131-0/+1
| | | | | | | | | | | QEMU's -pflash option requires an image that has been padded to the exact expected size (32MB for all of the supported RISC-V virtual machines). Add a .pf32 build target which is simply the equivalent .sbi target padded to 32MB in size, to simplify testing. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow for 32-bit and 64-bit versions of util/zbinMichael Brown2025-05-061-1/+2
| | | | | | | | | | Parsing ELF data is simpler if we don't have to build a single binary to handle both 32-bit and 64-bit ELF formats. Allow for separate 32-bit and 64-bit binaries built from util/zbin.c (as is already done for util/elf2efi.c). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow for per-architecture cross-compilation prefixesMichael Brown2024-10-291-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | We currently require the variable CROSS (or CROSS_COMPILE) to be set to specify the global cross-compilation prefix. This becomes cumbersome when developing across multiple CPU architectures, requiring frequent editing of build command lines and preventing incompatible architectures from being built with a single command. Allow a default cross-compilation prefix for each architecture to be specified via the CROSS_COMPILE_<arch> variables. These may then be provided as environment variables, e.g. using export CROSS_COMPILE_arm32=arm-linux-gnu- export CROSS_COMPILE_arm64=aarch64-linux-gnu- export CROSS_COMPILE_loong64=loongarch64-linux-gnu- export CROSS_COMPILE_riscv32=riscv64-linux-gnu- export CROSS_COMPILE_riscv64=riscv64-linux-gnu- This change requires some portions of the Makefile to be rearranged, to allow for the fact that $(CROSS_COMPILE) may not have been set until the build directory has been parsed to determine the CPU architecture. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [aqc1xx] Add support for Marvell AQtion Ethernet controllerAnimesh Bhatt2024-09-021-0/+1
| | | | | | | | | This patch adds support for the AQtion Ethernet controller, enabling iPXE to recognize and utilize the specific models (AQC114, AQC113, and AQC107). Tested-by: Animesh Bhatt <animeshb@marvell.com> Signed-off-by: Animesh Bhatt <animeshb@marvell.com>
* [build] Avoid invoking genkeymap.py via PerlMichael Brown2022-02-151-0/+1
| | | | | | | The build process currently invokes the Python genkeymap.py script via the Perl executable. Strangely, this appears to work. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Update genkeymap to work with current databasesMichael Brown2022-02-101-1/+1
| | | | | | | | Rewrite genkeymap.pl in Python with added sanity checks, and update the list of keyboard mappings to remove those no longer supported by the underlying "loadkeys" tool. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [doc] Update user-visible ipxe.org URIs to use HTTPSMichael Brown2022-01-131-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Add a prefix to all symbols to avoid future name collisionsMichael Brown2021-02-271-0/+1
| | | | | | | Allow for the possibility of linking to platform libraries for the Linux userspace build by adding an iPXE-specific symbol prefix. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove support for building with the Intel C compilerMichael Brown2021-02-121-1/+0Star
| | | | | | | | | | | | | | | | | | | Support for building with the Intel C compiler (icc) was added in 2009 in the expectation that UEFI support would eventually involve compiling iPXE to EFI Byte Code. EFI Byte Code has never found any widespread use: no widely available compilers can emit it, Microsoft refuses to sign EFI Byte Code binaries for UEFI Secure Boot, and I have personally never encountered any examples of EFI Byte Code in the wild. The support for using the Intel C compiler has not been tested in over a decade, and would almost certainly require modification to work with current releases of the compiler. Simplify the build process by removing this old legacy code. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bnxt] Add driver support for Broadcom NetXtreme-E AdaptersJoseph Wong2020-05-061-0/+1
| | | | Signed-off-by: Joseph Wong <joseph.wong@broadcom.com>
* [build] Construct full version number automatically from git revisionv1.20.1Michael Brown2020-01-021-2/+15
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add predefined shortcut for Raspberry Pi buildsMichael Brown2019-08-021-0/+4
| | | | | | | | Add a build shortcut "rpi", allowing for e.g. make CONFIG=rpi CROSS=aarch64-linux-gnu- bin-arm64-efi/rpi.efi Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Move predefined all-drivers build shortcut to MakefileMichael Brown2019-08-021-0/+9
| | | | | | | | | | | The (very approximate) split between Makefile.housekeeping and Makefile is that the former provides mechanism and the latter provides policy. Provide a section within Makefile as a home for predefined build shortcuts such as the existing all-drivers build. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Exclude selected directories from Secure Boot buildsMichael Brown2017-09-181-5/+11
| | | | | | | | | | | | | | | | | | When submitting binaries for UEFI Secure Boot signing, certain known-dubious subsystems (such as 802.11 and NFS) must be excluded from the build. Mark the directories containing these subsystems as insecure, and allow the build target to include an explicit "security flag" (a literal "-sb" appended to the build platform) to exclude these source directories from the build process. For example: make bin-x86_64-efi-sb/ipxe.efi will build iPXE with all code from the 802.11 and NFS subsystems excluded from the build. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sfc] Add driver for Solarflare SFC8XXX adaptersMartin Habets2017-04-101-0/+1
| | | | | | Signed-off-by: Martin Habets <mhabets@solarflare.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Bug fixes and improved paging allocation methodRaed Salem2017-03-231-0/+1
| | | | | | | | Updates: - revert Support for clear interrupt via BAR Signed-off-by: Raed Salem <raeds@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add %.vhd target for building VM bootable disk imagesMichael Brown2017-01-221-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove unnecessary dependency on zlibMichael Brown2016-05-031-1/+0Star
| | | | | | | | | | The dependency on zlib seems to have been introduced in commit 3dd7ce1 ("[efi] Allow building with non-system libbfd") as an indirect requirement of either libbfd or libiberty when building on Mac OS X. Since we no longer use either of these libraries, remove the unnecessary link against zlib. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Eliminate use of libbfdMichael Brown2016-05-021-2/+0Star
| | | | | | | | | Parse the intermediate ELF file directly instead of using libbfd, in order to allow for cross-compiled ELF objects. As a side bonus, this eliminates libbfd as a build requirement. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Add Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) supportWissam Shoukair2016-03-221-0/+8
| | | | | Signed-off-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Accept CROSS= as a synonym for CROSS_COMPILE=Michael Brown2016-03-131-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [librm] Add support for running in 64-bit long modeMichael Brown2016-02-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for running the BIOS version of iPXE in 64-bit long mode. A 64-bit BIOS version of iPXE can be built using e.g. make bin-x86_64-pcbios/ipxe.usb make bin-x86_64-pcbios/8086100e.mrom The 64-bit BIOS version should appear to function identically to the normal 32-bit BIOS version. The physical memory layout is unaltered: iPXE is still relocated to the top of the available 32-bit address space. The code is linked to a virtual address of 0xffffffffeb000000 (in the negative 2GB as required by -mcmodel=kernel), with 4kB pages created to cover the whole of .textdata. 2MB pages are created to cover the whole of the 32-bit address space. The 32-bit portions of the code run with VIRTUAL_CS and VIRTUAL_DS configured such that truncating a 64-bit virtual address gives a 32-bit virtual address pointing to the same physical location. The stack pointer remains as a physical address when running in long mode (although the .stack section is accessible via the negative 2GB virtual address); this is done in order to simplify the handling of interrupts occurring while executing a portion of 32-bit code with flat physical addressing via PHYS_CODE(). Interrupts may be enabled in either 64-bit long mode, 32-bit protected mode with virtual addresses, 32-bit protected mode with physical addresses, or 16-bit real mode. Interrupts occurring in any mode other than real mode will be reflected down to real mode and handled by whichever ISR is hooked into the BIOS interrupt vector table. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Support SHA-{224,384,512} in X.509 certificatesMichael Brown2015-08-021-1/+1
| | | | | | | | | Add support for SHA-224, SHA-384, and SHA-512 as digest algorithms in X.509 certificates, and allow the choice of public-key, cipher, and digest algorithms to be configured at build time via config/crypto.h. Originally-implemented-by: Tufan Karadere <tufank@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Add basic support for USB hubsMichael Brown2015-02-031-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hyperv] Add support for VMBus devicesMichael Brown2014-12-181-0/+1
| | | | | | Add support for an abstraction of a VMBus device. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add efifatbin utilityMichael Brown2014-09-101-0/+1
| | | | | | | | | | | | | | | | | Add utility for constructing EFI fat binaries (dual 32/64-bit binaries, usable only on Apple EFI systems). This utility is not part of the standard build process. To use it: make util/efifatbin bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi and then ./util/efifatbin bin-*-efi/ipxe.efi fat-ipxe.efi Requested-by: Brandon Penglase <bpenglase-ipxe@spaceservices.net> Tested-by: Brandon Penglase <bpenglase-ipxe@spaceservices.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow ISA ROMs to be builtMichael Brown2014-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build process has for a long time assumed that every ROM is a PCI ROM, and will always include the PCI header and PCI-related functionality (such as checking the PCI BIOS version, including the PCI bus:dev.fn address within the ROM product name string, etc.). While real ISA cards are no longer in use, some virtualisation environments (notably VirtualBox) have support only for ISA ROMs. This can cause problems: in particular, VirtualBox will call our initialisation entry point with random garbage in %ax, which we then treat as the PCI bus:dev.fn address of the autoboot device: this generally prevents the default boot sequence from using any network devices. Create .isarom and .pcirom prefixes which can be used to explicitly specify the type of ROM to be created. (Note that the .mrom prefix always implies a PCI ROM, since the .mrom mechanism relies on reconfiguring PCI BARs.) Make .rom a magic prefix which will automatically select the appropriate PCI or ISA ROM prefix for ROMs defined via a PCI_ROM() or ISA_ROM() macro. To maintain backwards compatibility, we default to building a PCI ROM for anything which is not directly derived from a PCI_ROM() or ISA_ROM() macro (e.g. bin/intel.rom). Add a selection of targets to "make everything" to ensure that the (relatively obscure) ISA ROM build process is included within the per-commit QA checks. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xen] Add basic support for PV-HVM domainsMichael Brown2014-07-291-0/+1
| | | | | | | | | Add basic support for Xen PV-HVM domains (detected via the Xen platform PCI device with IDs 5853:0001), including support for accessing configuration via XenStore and enumerating devices via XenBus. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Set GITVERSION only if there is a git repositoryFlorian Schmaus2014-07-281-1/+1
| | | | | | | | | | | | | | | The $(BIN)/version.%.o target will fail if iPXE is built within a non-git repository, e.g. when the user downloaded and extracted an archive containing iPXE sources, *and* if any parent directory of the iPXE sources is a git repository (or even contains a directory named ".git"). This is because git will by default ascend the directory tree and look for ".git". The problem typically manifests on source based distributions, see for example https://bugs.gentoo.org/show_bug.cgi?id=482804 Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Expose build timestamp, build name, and product namesMichael Brown2014-06-241-0/+1
| | | | | | | | Expose the build timestamp (measured in seconds since the Epoch) and the build name (e.g. "rtl8139.rom" or "ipxe.efi"), and provide the product name and product short name in a single centralised location. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise X.509 cache to a full certificate storeMichael Brown2014-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand the concept of the X.509 cache to provide the functionality of a certificate store. Certificates in the store will be automatically used to complete certificate chains where applicable. The certificate store may be prepopulated at build time using the CERT=... build command line option. For example: make bin/ipxe.usb CERT=mycert1.crt,mycert2.crt Certificates within the certificate store are not implicitly trusted; the trust list is specified using TRUST=... as before. For example: make bin/ipxe.usb CERT=root.crt TRUST=root.crt This can be used to embed the full trusted root certificate within the iPXE binary, which is potentially useful in an HTTPS-only environment in which there is no HTTP server from which to automatically download cross-signed certificates or other certificate chain fragments. This usage of CERT= extends the existing use of CERT= to specify the client certificate. The client certificate is now identified automatically by checking for a match against the private key. For example: make bin/ipxe.usb CERT=root.crt,client.crt TRUST=root.crt KEY=client.key Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Build ROMs used by qemu and VMware as part of "make all"Michael Brown2013-12-261-1/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nfs] Add support for NFS protocolMarin Hannache2013-07-151-1/+1
| | | | | | Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include ipxe.pxe in default buildRobin Smidsrød2013-07-151-1/+1
| | | | | Signed-off-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add efidrv.cab target for UEFI Secure Boot signingMichael Brown2013-05-141-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add vmware build targetBrandon Penglase2013-03-061-0/+17
| | | | | | | | Add "make vmware" build target, to build all of the ROMs used with VMware. Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include self-tests within "make everything"Michael Brown2013-01-311-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include version number within only a single object fileMichael Brown2012-11-021-5/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include git commit within version string when availableMichael Brown2012-07-201-2/+6
| | | | | Originally-implemented-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Enable warnings when building utilitiesMichael Brown2012-04-101-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow trusted root certificates to be specified at build timeMichael Brown2012-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | Allow trusted root certificates to be specified at build time using the syntax make TRUST=/path/to/certificate1,/path/to/certificate2,... The build process uses openssl to calculate the SHA-256 fingerprints of the specified certificates, and adds them to the root certificate store in rootcert.c. The certificates can be in any format understood by openssl. The certificates may be server certificates or (more usefully) CA certificates. If no trusted certificates are specified, then the default "iPXE root CA" certificate will be used. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tg3] New tg3 driverThomas Miletich2012-01-311-0/+1
| | | | | | | | | Replace the old Etherboot tg3 driver with a more up-to-date driver using the iPXE API. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ath9k] Add ath9k driverScott K Logan2011-10-141-1/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include ipxe.lkrn in default buildMichael Brown2011-03-261-2/+2
| | | | | | | bin/ipxe.lkrn is built anyway in order to create bin/ipxe.iso, so there is no additional cost to including it within the default build. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add keymap generatorMichael Brown2011-03-161-0/+2
| | | | | | | | Inspired by LILO's keytab-lilo.pl, genkeymap.pl uses "loadkeys -b" to obtain a Linux keyboard map, and generates a file keymap_xx.c in hci/keymap. Signed-off-by: Michael Brown <mcb30@ipxe.org>