[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 <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-02-13 18:09:37 +00:00
parent ae8e23a452
commit 2161e976cd
4 changed files with 33 additions and 10 deletions
+21 -10
View File
@@ -38,6 +38,8 @@ jobs:
${{ env.bindir }}/ipxe.lkrn \ ${{ env.bindir }}/ipxe.lkrn \
${{ env.bindir }}/ipxe.pxe \ ${{ env.bindir }}/ipxe.pxe \
${{ env.bindir }}/ipxe.usb \ ${{ env.bindir }}/ipxe.usb \
${{ env.bindir }}/ipxe-legacy.lkrn \
${{ env.bindir }}/ipxe-legacy.pxe \
${{ env.bindir }}/undionly.kpxe \ ${{ env.bindir }}/undionly.kpxe \
${{ env.bindir }}/errors ${{ env.bindir }}/errors
@@ -57,6 +59,8 @@ jobs:
path: | path: |
src/${{ env.bindir }}/ipxe.lkrn src/${{ env.bindir }}/ipxe.lkrn
src/${{ env.bindir }}/ipxe.pxe 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 }}/undionly.kpxe
src/${{ env.bindir }}/errors src/${{ env.bindir }}/errors
src/${{ env.bindir }}/niclist.txt src/${{ env.bindir }}/niclist.txt
@@ -126,6 +130,7 @@ jobs:
make ${{ env.bindir }}/ipxe.efi \ make ${{ env.bindir }}/ipxe.efi \
${{ env.bindir }}/ipxe.iso \ ${{ env.bindir }}/ipxe.iso \
${{ env.bindir }}/ipxe.usb \ ${{ env.bindir }}/ipxe.usb \
${{ env.bindir }}/ipxe-legacy.efi \
${{ env.bindir }}/snponly.efi \ ${{ env.bindir }}/snponly.efi \
${{ env.bindir }}/errors ${{ env.bindir }}/errors
@@ -136,6 +141,7 @@ jobs:
if-no-files-found: error if-no-files-found: error
path: | path: |
src/${{ env.bindir }}/ipxe.efi src/${{ env.bindir }}/ipxe.efi
src/${{ env.bindir }}/ipxe-legacy.efi
src/${{ env.bindir }}/snponly.efi src/${{ env.bindir }}/snponly.efi
src/${{ env.bindir }}/errors src/${{ env.bindir }}/errors
@@ -234,14 +240,14 @@ jobs:
image: ghcr.io/ipxe/ipxe-signer image: ghcr.io/ipxe/ipxe-signer
env: env:
binaries: >- binaries: >-
bin-x86_64-pcbios/ipxe.lkrn bin-x86_64-pcbios/${DRIVERS}.lkrn
bin-arm32-efi/ipxe.efi bin-arm32-efi/${DRIVERS}.efi
bin-arm64-efi/ipxe.efi bin-arm64-efi/${DRIVERS}.efi
bin-i386-efi/ipxe.efi bin-i386-efi/${DRIVERS}.efi
bin-loong64-efi/ipxe.efi bin-loong64-efi/${DRIVERS}.efi
bin-riscv32-efi/ipxe.efi bin-riscv32-efi/${DRIVERS}.efi
bin-riscv64-efi/ipxe.efi bin-riscv64-efi/${DRIVERS}.efi
bin-x86_64-efi/ipxe.efi bin-x86_64-efi/${DRIVERS}.efi
steps: steps:
- name: Check out code - name: Check out code
@@ -262,8 +268,11 @@ jobs:
Press Ctrl-B for the iPXE command line... \ Press Ctrl-B for the iPXE command line... \
&& shell || autoboot && shell || autoboot
EOF EOF
./src/util/genfsimg -o ipxe.iso ${{ env.binaries }} for DRIVERS in ipxe ipxe-legacy ; do
./src/util/genfsimg -o ipxe.usb -s autoexec.ipxe ${{ env.binaries }} ./src/util/genfsimg -o ${DRIVERS}.iso ${{ env.binaries }}
./src/util/genfsimg -o ${DRIVERS}.usb -s autoexec.ipxe \
${{ env.binaries }}
done
- name: Upload - name: Upload
uses: actions/upload-artifact@v6 uses: actions/upload-artifact@v6
@@ -273,6 +282,8 @@ jobs:
path: | path: |
ipxe.iso ipxe.iso
ipxe.usb ipxe.usb
ipxe-legacy.iso
ipxe-legacy.usb
publish: publish:
name: Publish name: Publish
+4
View File
@@ -245,6 +245,10 @@ version :
# #
DRIVERS_ipxe += DRIVERS_ipxe +=
# All drivers (excluding USB network devices)
#
DRIVERS_ipxe-legacy = $(filter-out $(DRIVERS_usb_net),$(DRIVERS_ipxe))
# Raspberry Pi # Raspberry Pi
# #
DRIVERS_rpi += smsc95xx lan78xx DRIVERS_rpi += smsc95xx lan78xx
+4
View File
@@ -28,6 +28,10 @@ NON_AUTO_MEDIA += efirom
DRIVERS_ipxe += $(DRIVERS_pci_net) DRIVERS_ipxe += $(DRIVERS_pci_net)
DRIVERS_ipxe += $(DRIVERS_pci_infiniband) 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 # Include SNP and MNP drivers in the all-drivers build
# #
DRIVERS_ipxe += $(DRIVERS_efi_net) DRIVERS_ipxe += $(DRIVERS_efi_net)
+4
View File
@@ -111,6 +111,10 @@ NON_AUTO_MEDIA += pdsk
DRIVERS_ipxe += $(DRIVERS_pci_net) DRIVERS_ipxe += $(DRIVERS_pci_net)
DRIVERS_ipxe += $(DRIVERS_pci_infiniband) 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 # Include Xen and Hyper-V drivers in the all-drivers build
# #
DRIVERS_ipxe += $(DRIVERS_xen_net) DRIVERS_ipxe += $(DRIVERS_xen_net)