summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2015-11-18 18:02:21 +0800
committerArmin Kuster <akuster808@gmail.com>2015-12-22 10:16:37 -0800
commit7879f8c3060c1c6e4cdc408a0e943a1cbaad46da (patch)
treeeef1511bd89643bb83faa405b987e8c88ac28363
parent4207d1adce63ed5c518086ef5dde4c7b5ec4bed1 (diff)
downloadmeta-openembedded-7879f8c3060c1c6e4cdc408a0e943a1cbaad46da.tar.gz
netmap-modules: make deterministic builds for drivers
The driver builds are optional, but for deterministic builds, we should should be able to explicitly enable/disable the builds for them in a proper place (maybe in BSP). But we can't use PACKAGECONFIG since there is no option for each driver, and the options are: --no-drivers do not compile any driver --no-drivers= do not compile the given drivers (comma sep.) --drivers= only compile the given drivers (comma sep.) So use NETMAP_DRIVERS to list the needed drivers and add proper configs to EXTRA_OECONF, the default is no drivers, and all supported drivers are listed in NETMAP_ALL_DRIVERS. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-kernel/netmap/netmap-modules_git.bb26
1 files changed, 25 insertions, 1 deletions
diff --git a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
index 6365fee92..23f3094af 100644
--- a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
+++ b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
@@ -15,7 +15,31 @@ EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \
15 --driver-suffix="-netmap" \ 15 --driver-suffix="-netmap" \
16 " 16 "
17 17
18EXTRA_OECONF += "--no-drivers=ixgbe --no-drivers=virtio_net.c" 18# The driver builds are optional, but for deterministic builds,
19# we should be able to explicitly enable/disable the builds
20# for them in a proper place (maybe in BSP).
21# But we can't use PACKAGECONFIG since there is no option for
22# each driver, and the options are:
23# --no-drivers do not compile any driver
24# --no-drivers= do not compile the given drivers (comma sep.)
25# --drivers= only compile the given drivers (comma sep.)
26#
27# So use NETMAP_DRIVERS and the following python code to add proper
28# configs to EXTRA_OECONF.
29#
30# The default is no-drivers, and all supported drivers are listed
31# in NETMAP_ALL_DRIVERS.
32NETMAP_DRIVERS ??= ""
33NETMAP_ALL_DRIVERS = "ixgbe igb e1000e e1000 veth.c forcedeth.c virtio_net.c r8169.c"
34
35python __anonymous () {
36 drivers_list = d.getVar("NETMAP_DRIVERS", True).split()
37 all_drivers_list = d.getVar("NETMAP_ALL_DRIVERS", True).split()
38 config_drivers = "--drivers=" + ",".join(drivers_list)
39
40 extra_oeconf_drivers = bb.utils.contains_any('NETMAP_DRIVERS', all_drivers_list, config_drivers, '--no-drivers', d)
41 d.appendVar("EXTRA_OECONF", extra_oeconf_drivers)
42}
19 43
20LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,-O1', '')}" 44LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,-O1', '')}"
21LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,--as-needed', '')}" 45LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,--as-needed', '')}"