All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH 09/14] netmap-modules: make deterministic builds for drivers
Date: Mon, 14 Dec 2015 07:34:02 -0800	[thread overview]
Message-ID: <87ced45873312f0ccda708518d078e7e30eada5c.1450027640.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1450027640.git.akuster808@gmail.com>
In-Reply-To: <cover.1450027640.git.akuster808@gmail.com>

From: Jackie Huang <jackie.huang@windriver.com>

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>
---
 .../recipes-kernel/netmap/netmap-modules_git.bb    | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
index 6365fee..23f3094 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} \
                 --driver-suffix="-netmap" \
                 "
 
-EXTRA_OECONF += "--no-drivers=ixgbe --no-drivers=virtio_net.c"
+# The driver builds are optional, but for deterministic builds,
+# we 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 and the following python code to add proper
+# configs to EXTRA_OECONF.
+#
+# The default is no-drivers, and all supported drivers are listed
+# in NETMAP_ALL_DRIVERS.
+NETMAP_DRIVERS ??= ""
+NETMAP_ALL_DRIVERS = "ixgbe igb e1000e e1000 veth.c forcedeth.c virtio_net.c r8169.c"
+
+python __anonymous () {
+    drivers_list = d.getVar("NETMAP_DRIVERS", True).split()
+    all_drivers_list = d.getVar("NETMAP_ALL_DRIVERS", True).split()
+    config_drivers = "--drivers=" + ",".join(drivers_list)
+
+    extra_oeconf_drivers = bb.utils.contains_any('NETMAP_DRIVERS', all_drivers_list, config_drivers, '--no-drivers', d)
+    d.appendVar("EXTRA_OECONF", extra_oeconf_drivers)
+}
 
 LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,-O1', '')}"
 LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,--as-needed', '')}"
-- 
1.9.1



  parent reply	other threads:[~2015-12-14 15:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 15:33 [PATCH 00/14] mete-oe Jethro-next Armin Kuster
2015-12-14 15:33 ` [PATCH 01/14] netcat: add DESCRIPTION Armin Kuster
2015-12-14 15:33 ` [PATCH 02/14] netcat-openbsd: replace patch with quilt Armin Kuster
2015-12-14 15:33 ` [PATCH 03/14] net-snmp: Modify snmpd.service Armin Kuster
2015-12-14 15:33 ` [PATCH 04/14] net-snmp: fix cross compilation Armin Kuster
2015-12-14 16:26   ` Martin Jansa
2015-12-14 18:56     ` akuster808
2015-12-15  0:27     ` akuster808
2015-12-14 15:33 ` [PATCH 05/14] ypbind-mt: set path of ypdomainname in ypbind script Armin Kuster
2015-12-14 15:33 ` [PATCH 06/14] opensaf: remove unused service file Armin Kuster
2015-12-14 15:34 ` [PATCH 07/14] lldpd: configure the systemd unit file dir Armin Kuster
2015-12-14 15:34 ` [PATCH 08/14] ctdb: rdep on bash Armin Kuster
2015-12-14 15:34 ` Armin Kuster [this message]
2015-12-14 15:34 ` [PATCH 10/14] netmap-modules: Modules may not have the same arch as userspace Armin Kuster
2015-12-14 15:34 ` [PATCH 11/14] ufw: improve RRECOMMENDS Armin Kuster
2015-12-14 15:34 ` [PATCH 12/14] dovecot: add PACKAGECONFIG for lz4 Armin Kuster
2015-12-14 15:34 ` [PATCH 13/14] pure-ftpd: add PACKAGECONFIG for libsodium Armin Kuster
2015-12-14 15:34 ` [PATCH 14/14] tmux: Fix QA issue Armin Kuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ced45873312f0ccda708518d078e7e30eada5c.1450027640.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.