summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2015-03-04 18:22:07 +0100
committerMichael Brown2015-03-05 01:57:44 +0100
commit86ae6e6c1836e43993a14db278398fc54e5419bd (patch)
tree92758900be8ba37c36448094747ace0c2f97e13e
parent[build] Remove obsolete and unused portions of config.c (diff)
downloadipxe-86ae6e6c1836e43993a14db278398fc54e5419bd.tar.gz
ipxe-86ae6e6c1836e43993a14db278398fc54e5419bd.tar.xz
ipxe-86ae6e6c1836e43993a14db278398fc54e5419bd.zip
[build] Use REQUIRE_OBJECT() to drag in per-object configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/arch/i386/prefix/romprefix.S3
-rw-r--r--src/config/config_isaromprefix.c24
-rw-r--r--src/config/config_mromprefix.c24
-rw-r--r--src/config/config_pciromprefix.c24
-rw-r--r--src/drivers/bus/usb.c3
-rw-r--r--src/include/compiler.h5
-rw-r--r--src/net/80211/net80211.c3
-rw-r--r--src/net/ethernet.c3
-rw-r--r--src/net/fc.c3
-rw-r--r--src/net/infiniband.c3
-rw-r--r--src/usr/route.c3
11 files changed, 21 insertions, 77 deletions
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index 0ad6e16d..08fcf73b 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -874,3 +874,6 @@ wait_for_tick:
popl %eax
ret
.size wait_for_tick, . - wait_for_tick
+
+/* Drag in ROM configuration */
+REQUIRE_OBJECT ( config_romprefix )
diff --git a/src/config/config_isaromprefix.c b/src/config/config_isaromprefix.c
deleted file mode 100644
index d5a2b03e..00000000
--- a/src/config/config_isaromprefix.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- * You can also choose to distribute this program under the terms of
- * the Unmodified Binary Distribution Licence (as given in the file
- * COPYING.UBDL), provided that you have satisfied its requirements.
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include "config_romprefix.c"
diff --git a/src/config/config_mromprefix.c b/src/config/config_mromprefix.c
deleted file mode 100644
index d5a2b03e..00000000
--- a/src/config/config_mromprefix.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- * You can also choose to distribute this program under the terms of
- * the Unmodified Binary Distribution Licence (as given in the file
- * COPYING.UBDL), provided that you have satisfied its requirements.
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include "config_romprefix.c"
diff --git a/src/config/config_pciromprefix.c b/src/config/config_pciromprefix.c
deleted file mode 100644
index d5a2b03e..00000000
--- a/src/config/config_pciromprefix.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- * You can also choose to distribute this program under the terms of
- * the Unmodified Binary Distribution Licence (as given in the file
- * COPYING.UBDL), provided that you have satisfied its requirements.
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include "config_romprefix.c"
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c
index af3663eb..91d52b0c 100644
--- a/src/drivers/bus/usb.c
+++ b/src/drivers/bus/usb.c
@@ -1903,5 +1903,8 @@ struct usb_port * usb_root_hub_port ( struct usb_device *usb ) {
return usb->port;
}
+/* Drag in USB configuration */
+REQUIRE_OBJECT ( config_usb );
+
/* Drag in hub driver */
REQUIRE_OBJECT ( usbhub );
diff --git a/src/include/compiler.h b/src/include/compiler.h
index 0b6f61a3..f877ebce 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -115,15 +115,10 @@
#define PREFIX_OBJECT( _prefix ) _C2 ( _prefix, OBJECT )
#define OBJECT_SYMBOL PREFIX_OBJECT ( obj_ )
-#define REQUEST_EXPANDED( _sym ) REQUEST_SYMBOL ( _sym )
-#define CONFIG_SYMBOL PREFIX_OBJECT ( obj_config_ )
/** Always provide the symbol for the current object (defined by -DOBJECT) */
PROVIDE_SYMBOL ( OBJECT_SYMBOL );
-/** Pull in an object-specific configuration file if available */
-REQUEST_EXPANDED ( CONFIG_SYMBOL );
-
/** Explicitly require another object */
#define REQUIRE_OBJECT( _obj ) REQUIRE_SYMBOL ( obj_ ## _obj )
diff --git a/src/net/80211/net80211.c b/src/net/80211/net80211.c
index 43494452..d2051f64 100644
--- a/src/net/80211/net80211.c
+++ b/src/net/80211/net80211.c
@@ -2826,3 +2826,6 @@ struct errortab common_wireless_errors[] __errortab = {
__einfo_errortab ( EINFO_ECONNREFUSED_ASSOC_DENIED ),
__einfo_errortab ( EINFO_ECONNREFUSED_AUTH_ALGO_UNSUPP ),
};
+
+/* Drag in 802.11 configuration */
+REQUIRE_OBJECT ( config_net80211 );
diff --git a/src/net/ethernet.c b/src/net/ethernet.c
index 1ca92a20..a4bdfd4e 100644
--- a/src/net/ethernet.c
+++ b/src/net/ethernet.c
@@ -239,5 +239,8 @@ struct net_device * alloc_etherdev ( size_t priv_size ) {
return netdev;
}
+/* Drag in Ethernet configuration */
+REQUIRE_OBJECT ( config_ethernet );
+
/* Drag in Ethernet slow protocols */
REQUIRE_OBJECT ( eth_slow );
diff --git a/src/net/fc.c b/src/net/fc.c
index d37e81eb..459f6fc3 100644
--- a/src/net/fc.c
+++ b/src/net/fc.c
@@ -1939,3 +1939,6 @@ struct fc_ulp * fc_ulp_get_port_id_type ( struct fc_port *port,
err_peer_get_wwn:
return NULL;
}
+
+/* Drag in Fibre Channel configuration */
+REQUIRE_OBJECT ( config_fc );
diff --git a/src/net/infiniband.c b/src/net/infiniband.c
index fcc8a639..7e545f74 100644
--- a/src/net/infiniband.c
+++ b/src/net/infiniband.c
@@ -999,5 +999,8 @@ struct ib_device * last_opened_ibdev ( void ) {
return ibdev;
}
+/* Drag in Infiniband configuration */
+REQUIRE_OBJECT ( config_infiniband );
+
/* Drag in IPoIB */
REQUIRE_OBJECT ( ipoib );
diff --git a/src/usr/route.c b/src/usr/route.c
index 49871e2a..eb50b5bb 100644
--- a/src/usr/route.c
+++ b/src/usr/route.c
@@ -46,3 +46,6 @@ void route ( void ) {
}
}
}
+
+/* Drag in routing management configuration */
+REQUIRE_OBJECT ( config_route );