From: Michael Brown Date: Wed, 11 Feb 2026 15:38:58 +0000 (+0000) Subject: [build] Construct driver lists for each bus type X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e783adcfd4641bda48aae5a59fc5cf391d4239b8;p=thirdparty%2Fipxe.git [build] Construct driver lists for each bus type Include the underlying bus type (e.g. "pci" or "isa") within the lists constructed to describe the available drivers, to allow for the possibility that platforms may want to define a platform-specific subset of drivers to be present in the all-drivers build. For example, non-x86 platforms such as RISC-V SBI do not need to include the ISA network drivers since the corresponding hardware cannot ever be present on a RISC-V system. Signed-off-by: Michael Brown --- diff --git a/src/Makefile b/src/Makefile index 6d7df0e2c..e7acdd662 100644 --- a/src/Makefile +++ b/src/Makefile @@ -243,12 +243,15 @@ version : # All drivers (excluding USB) # -DRIVERS_ipxe = $(DRIVERS_net) $(DRIVERS_infiniband) \ - $(DRIVERS_xen) $(DRIVERS_hyperv) +DRIVERS_ipxe += $(DRIVERS_isa_net) +DRIVERS_ipxe += $(DRIVERS_pci_net) +DRIVERS_ipxe += $(DRIVERS_pci_infiniband) +DRIVERS_ipxe += $(DRIVERS_pci_xen) +DRIVERS_ipxe += $(DRIVERS_hyperv) # Raspberry Pi # -DRIVERS_rpi = smsc95xx lan78xx +DRIVERS_rpi += smsc95xx lan78xx ############################################################################### # diff --git a/src/Makefile.efi b/src/Makefile.efi index 0c42ce6bc..ec1c34cd5 100644 --- a/src/Makefile.efi +++ b/src/Makefile.efi @@ -25,7 +25,8 @@ NON_AUTO_MEDIA += efirom # Include SNP and MNP drivers in the all-drivers build # -DRIVERS_net += snp mnp +DRIVERS_efi_net += snp mnp +DRIVERS_ipxe += $(DRIVERS_efi_net) # Rules for building EFI files # diff --git a/src/util/parserom.pl b/src/util/parserom.pl index b516fd2e3..6b3b0b7cc 100755 --- a/src/util/parserom.pl +++ b/src/util/parserom.pl @@ -131,8 +131,9 @@ sub process_pci_rom { (my $image, $decl) = extract_quoted_string($decl, 'IMAGE'); (my $desc, $decl) = extract_quoted_string($decl, 'DESCRIPTION'); if ( $vendor and $device and $image and $desc ) { - print_make_rules( $state, "${vendor}${device}", $desc, $vendor, $device ); - print_make_rules( $state, $image, $desc, $vendor, $device, 1 ); + print_make_rules( $state, "pci", "${vendor}${device}", $desc, + $vendor, $device ); + print_make_rules( $state, "pci", $image, $desc, $vendor, $device, 1 ); } else { log_debug("WARNING", "Malformed PCI_ROM macro on line $. of $state->{source_file}"); @@ -149,7 +150,7 @@ sub process_isa_rom { (my $image, $decl) = extract_quoted_string($decl, 'IMAGE'); (my $desc, $decl) = extract_quoted_string($decl, 'DESCRIPTION'); if ( $image and $desc ) { - print_make_rules( $state, $image, $desc ); + print_make_rules( $state, "isa", $image, $desc ); } else { log_debug("WARNING", "Malformed ISA_ROM macro on line $. of $state->{source_file}"); @@ -159,11 +160,11 @@ sub process_isa_rom { # Output Makefile rules for the specified ROM declarations sub print_make_rules { - my ( $state, $image, $desc, $vendor, $device, $dup ) = @_; + my ( $state, $bus, $image, $desc, $vendor, $device, $dup ) = @_; unless ( $state->{'is_header_printed'} ) { print "# NIC\t\n"; print "# NIC\tfamily\t$state->{family}\n"; - print "DRIVERS_$state->{driver_class} += $state->{driver_name}\n"; + print "DRIVERS_${bus}_$state->{driver_class} += $state->{driver_name}\n"; print "DRIVERS += $state->{driver_name}\n"; print "\n"; $state->{'is_header_printed'} = 1;