mirror of
https://github.com/ipxe/ipxe.git
synced 2026-03-10 08:01:34 +01:00
[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 <mcb30@ipxe.org>
This commit is contained in:
parent
1523512198
commit
e783adcfd4
@ -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
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
||||
@ -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
|
||||
#
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user