====== Build targets ====== iPXE is built using a command-line something like this: make bin/ipxe.pxe The first part, bin in this case indicates platform. ipxe indicates driver, and .pxe indicates boot type. make [platform]/[driver].[extension] The ''bin'' directory is included in git repo, but all platforms will be created automatically as part of the build process. There are some other [[#special targets]] as well. ===== Platforms ===== Currently supported platforms are: * bin //(alias for bin-i386-pcbios)// * bin-i386-pcbios * bin-i386-efi * bin-i386-linux * bin-x86_64-efi * bin-x86_64-linux * bin-x86_64-pcbios * bin-arm32-efi //([[https://github.com/ipxe/ipxe/issues/473#issuecomment-923911561|Limited support]], works with ''snp.efi'' and ''snponly.efi'', but not with ''ipxe.efi'')// * bin-arm64-efi * bin-arm64-linux ''-efi'' platforms can also [[http://git.ipxe.org/ipxe.git/commitdiff/7428ab7|have an additional -sb at the end]]. Used when submitting binaries for Secure Boot signing. ===== Driver ===== As the subtitle suggests this is the kind of driver to include in the build * ''ipxe'' builds one binary with (almost) all PCI based NIC drivers that iPXE has //(for now not working on arm since some interfaces have not yet been implemented there, build specific drivers instead such as snp)// * ''intel'' or other driver file found in the sources builds for that driver * ''808610de'' binary with driver for specific PCI device with given pci-id. See [[:appnote/hardware_drivers|list of hardware]] expected to work. * ''%%ecm--ncm%%'' double dash (''%%--%%'') adds multiple drivers to one file, in this case we pull in most USB based drivers (you can add double dash multiple times for more than two drivers) Some commonly used variants and why: * ''ipxe'' all native drivers, commonly used for usb based boot media or where iPXE is not used in a chainloaded manner. * ''undionly'' driver used for building chainable iPXE for ''pcbios'' platforms (not included in ''ipxe'' since UNDI stack can't be reliably kept and still having device available for possible native iPXE driver) use with ''.kpxe'' extension * ''snponly'' similar to ''undionly'' but for ''efi'' uses ''snp'' (Simple Network Protocol) or ''nii'' (Network Interface Identifier Protocol) provided by something else in EFI land, should only find and boot the specific NIC device it was chained from. * ''snp'' same as ''snponly'' but tries to boot all devices and not just the one it was chained via, this is also included in ''ipxe'' builds * ''efidrv.cab'' efi platform build cab for signing [[https://github.com/ipxe/ipxe/commit/dbea47ce7d61f253b58aa7268b0261922a6b1a22|commit]] * ''tests'' the Linux test suite example: ''make bin-x86_64-linux/tests.linux && ./bin-x86_64-linux/tests.linux'' [[http://lists.ipxe.org/pipermail/ipxe-devel/2019-January/006468.html|post on mailinglist with more examples]] * ''tap'' the Linux tap driver, use with ''.linux'' boot type, ex: ''bin-x86_64-linux/tap.linux --net tap,if=tap0,mac=00:0c:29:c5:39:a1'' * ''slirp'' the Linux slirp driver, use with ''.linux'' boot type see [[https://github.com/ipxe/ipxe/commit/2b5d3f582f718ca11488fb6d92ea39dd22b8ffed|commit]] ===== Boot type ===== Determines what kind of header should be added to the binary and how entrypoints should be handled. ^ extension ^ Valid platforms ^ Description ^ | ''.pxe'' | ''pcbios'' | Headerless X86 assembly code, PXE- or NBP-booted, sometimes renamed to .0 to work on older DHCP/TFTP servers | | ''.efi'' | ''efi'' | EFI executable | | ''.kpxe'' | ''pcbios'' | Same as ''.pxe'' but will Keep the original UNDI stack/driver present. This is needed for undionly [[http://forum.ipxe.org/showthread.php?tid=8127&pid=12812#pid12812|ref]] | | ''.kkpxe'' | ''pcbios'' | Same as ''.kpxe'' but will not unload (Keep) the PXE base code. only use with buggy BIOSes | | ''.lkrn'' | ''pcbios'' | Builds with kernel header similar to Linux so it can be started by many bootloaders | | ''.iso'' | ''pcbios'' | Builds ''.lkrn'' and adds ISOLINUX to create CD-ROM image, can be started by many bootloaders | | ''.hd'' | ''pcbios'' | Direct executable i386 code put on a harddisk image (32KB blocks) | | ''.dsk'' | ''pcbios'' | Direct executable i386 code put on a floppy disk image (512 Byte blocks) | | ''.pdsk'' | ''pcbios'' | Padded ''.dsk'' to work with loaders that requires exact size such as iLO | | ''.usb'' | ''pcbios'', ''efi'' | Same as ''.dsk'' for ''pcbios'', in ''efi'' mode it's an 1440K image with partition and [driver].efi added as /efi/boot/boot[arch].efi, mostly used for making USB stick images | | ''.vhd'' | ''pcbios'' | ''.usb'' image converted to vhd [[https://github.com/ipxe/ipxe/commit/dfbbc16ae392e8f4ab62e15a99cdfb32a06af557|commit]] | | ''.raw'' | ''pcbios'' | Generic raw, can be used with RPL [[https://github.com/ipxe/ipxe/commit/22bb29eabc2f68f3e60e99df4ef33984b7795a49|commit]] | | ''.rom'' | ''pcbios'' | File intended to be flashed into PCI-based NIC ROM | | ''.mrom'' | ''pcbios'' | File intended to be flashed into PCI-based NIC ROM. See [[http://ipxe.org/download#large_rom_images|notes for ''.mrom'']] | | ''.pcirom'' | ''pcbios'' | Same as ''.rom'' | | ''.isarom'' | ''pcbios'' | File intended to be flashed into ISA-based NIC ROM, must be used with e.g. VirtualBox | | ''.efidrv'' | ''efi'' | Driver for NIC which can be used by other EFI firmware | | ''.efirom'' | ''efi'' | File intended to be flashed into NIC ROM for EFI | | ''.linux'' | ''linux'' | Linux ELF executable, use for ''tests'', ''slirp'' and ''tap'' drivers | ===== Special targets ===== * ''make'' Same as ''make all'' * ''make all'' Predefined list of most common targets and prints some helpfully suggestive message * ''make everything'' tries to build targets for multiple platforms * ''make vmware'' ROMs for VMware * ''make doc'' Same as ''make bin/doc'' * ''make [platform]/doc'' Builds doxygen documentation * ''make docview'' Tries to open doxygen documentation in browser ===== Cross Compile ===== For cross-compiling, you will need to specify an approriate ''CROSS=...'' parameter to specify your cross-toolchain prefix. For example: '' make CROSS=aarch64-linux-gnu- bin-arm64-efi/ipxe.efi '' Note that you do not need to (and should not) specify ''ARCH'' explicitly: this will be calculated based on the platform portion of the build target. [[https://github.com/ipxe/ipxe/issues/471#issuecomment-923914032|Details on GitHub issue]]