]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Include USB drivers in the all-drivers build by default
authorMichael Brown <mcb30@ipxe.org>
Fri, 13 Feb 2026 18:09:37 +0000 (18:09 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 13 Feb 2026 18:36:14 +0000 (18:36 +0000)
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 <mcb30@ipxe.org>
.github/workflows/build.yml
src/Makefile
src/Makefile.efi
src/arch/x86/Makefile.pcbios

index 6a4fd38f48be2a7eb90f1f776621814f6fa8cdaa..f69f2d5b0cedaf6234e2d2cf719daa38b4eddf67 100644 (file)
@@ -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
index 7180a8756eaa87137e052d240f9526b8c2fc964a..8513b21065058a735bd8c7321619423199662962 100644 (file)
@@ -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
index cbb2243f6b68ee0b5762ed3bfd74bc911ea946ef..ce6892733550fbaf4a5c1e3c2ae7cb2a93366a81 100644 (file)
@@ -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)
index c09a9e09691fceee3f43544f54646f2072c6dd87..c1e829108c934bb6ba8f7747788786726c905961 100644 (file)
@@ -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)