From: Michael Brown Date: Fri, 13 Feb 2026 18:09:37 +0000 (+0000) Subject: [build] Include USB drivers in the all-drivers build by default X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2161e976cdf78d0b26687e14f2cdc14008a99c83;p=thirdparty%2Fipxe.git [build] Include USB drivers in the all-drivers build by default Including USB drivers has some unavoidable side effects. With a BIOS firmware, attaching the host controller drivers will necessarily disable the SMM-based USB legacy support which emulates a PS/2 keyboard. With a UEFI firmware, loading the host controller drivers may disconnect some of the less compliant vendor USB device drivers. We have historically erred on the side of caution and avoided including any USB drivers in the all-drivers build. Time has moved on, USB NICs have become more common (especially for laptops, which now rarely include physical Ethernet ports), and the UEFI Secure Boot model makes it prohibitively difficult for users to compile their own binaries to add support for non-default drivers. Switch to including USB drivers by default in the all-drivers build. Provide a fallback build target that matches the existing driver set (i.e. excluding any USB drivers) and can be built using e.g.: make bin/ipxe-legacy.iso make bin-x86_64-efi/ipxe-legacy.efi Signed-off-by: Michael Brown --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a4fd38f4..f69f2d5b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,8 @@ jobs: ${{ env.bindir }}/ipxe.lkrn \ ${{ env.bindir }}/ipxe.pxe \ ${{ env.bindir }}/ipxe.usb \ + ${{ env.bindir }}/ipxe-legacy.lkrn \ + ${{ env.bindir }}/ipxe-legacy.pxe \ ${{ env.bindir }}/undionly.kpxe \ ${{ env.bindir }}/errors @@ -57,6 +59,8 @@ jobs: path: | src/${{ env.bindir }}/ipxe.lkrn src/${{ env.bindir }}/ipxe.pxe + src/${{ env.bindir }}/ipxe-legacy.lkrn + src/${{ env.bindir }}/ipxe-legacy.pxe src/${{ env.bindir }}/undionly.kpxe src/${{ env.bindir }}/errors src/${{ env.bindir }}/niclist.txt @@ -126,6 +130,7 @@ jobs: make ${{ env.bindir }}/ipxe.efi \ ${{ env.bindir }}/ipxe.iso \ ${{ env.bindir }}/ipxe.usb \ + ${{ env.bindir }}/ipxe-legacy.efi \ ${{ env.bindir }}/snponly.efi \ ${{ env.bindir }}/errors @@ -136,6 +141,7 @@ jobs: if-no-files-found: error path: | src/${{ env.bindir }}/ipxe.efi + src/${{ env.bindir }}/ipxe-legacy.efi src/${{ env.bindir }}/snponly.efi src/${{ env.bindir }}/errors @@ -234,14 +240,14 @@ jobs: image: ghcr.io/ipxe/ipxe-signer env: binaries: >- - bin-x86_64-pcbios/ipxe.lkrn - bin-arm32-efi/ipxe.efi - bin-arm64-efi/ipxe.efi - bin-i386-efi/ipxe.efi - bin-loong64-efi/ipxe.efi - bin-riscv32-efi/ipxe.efi - bin-riscv64-efi/ipxe.efi - bin-x86_64-efi/ipxe.efi + bin-x86_64-pcbios/${DRIVERS}.lkrn + bin-arm32-efi/${DRIVERS}.efi + bin-arm64-efi/${DRIVERS}.efi + bin-i386-efi/${DRIVERS}.efi + bin-loong64-efi/${DRIVERS}.efi + bin-riscv32-efi/${DRIVERS}.efi + bin-riscv64-efi/${DRIVERS}.efi + bin-x86_64-efi/${DRIVERS}.efi steps: - name: Check out code @@ -262,8 +268,11 @@ jobs: Press Ctrl-B for the iPXE command line... \ && shell || autoboot EOF - ./src/util/genfsimg -o ipxe.iso ${{ env.binaries }} - ./src/util/genfsimg -o ipxe.usb -s autoexec.ipxe ${{ env.binaries }} + for DRIVERS in ipxe ipxe-legacy ; do + ./src/util/genfsimg -o ${DRIVERS}.iso ${{ env.binaries }} + ./src/util/genfsimg -o ${DRIVERS}.usb -s autoexec.ipxe \ + ${{ env.binaries }} + done - name: Upload uses: actions/upload-artifact@v6 @@ -273,6 +282,8 @@ jobs: path: | ipxe.iso ipxe.usb + ipxe-legacy.iso + ipxe-legacy.usb publish: name: Publish diff --git a/src/Makefile b/src/Makefile index 7180a8756..8513b2106 100644 --- a/src/Makefile +++ b/src/Makefile @@ -245,6 +245,10 @@ version : # DRIVERS_ipxe += +# All drivers (excluding USB network devices) +# +DRIVERS_ipxe-legacy = $(filter-out $(DRIVERS_usb_net),$(DRIVERS_ipxe)) + # Raspberry Pi # DRIVERS_rpi += smsc95xx lan78xx diff --git a/src/Makefile.efi b/src/Makefile.efi index cbb2243f6..ce6892733 100644 --- a/src/Makefile.efi +++ b/src/Makefile.efi @@ -28,6 +28,10 @@ NON_AUTO_MEDIA += efirom DRIVERS_ipxe += $(DRIVERS_pci_net) DRIVERS_ipxe += $(DRIVERS_pci_infiniband) +# Include USB drivers in the all-drivers build +# +DRIVERS_ipxe += $(DRIVERS_usb_net) + # Include SNP and MNP drivers in the all-drivers build # DRIVERS_ipxe += $(DRIVERS_efi_net) diff --git a/src/arch/x86/Makefile.pcbios b/src/arch/x86/Makefile.pcbios index c09a9e096..c1e829108 100644 --- a/src/arch/x86/Makefile.pcbios +++ b/src/arch/x86/Makefile.pcbios @@ -111,6 +111,10 @@ NON_AUTO_MEDIA += pdsk DRIVERS_ipxe += $(DRIVERS_pci_net) DRIVERS_ipxe += $(DRIVERS_pci_infiniband) +# Include USB drivers in the all-drivers build +# +DRIVERS_ipxe += $(DRIVERS_usb_net) + # Include Xen and Hyper-V drivers in the all-drivers build # DRIVERS_ipxe += $(DRIVERS_xen_net)