From: Krzysztof Kozlowski <krzk@kernel.org>
To: openembedded-devel@lists.openembedded.org
Cc: poky@yoctoproject.org, openembedded-core@lists.openembedded.org
Subject: [meta-networking][rocko][PATCH 1/2] kernel_wireless_regdb: Add class for embedding regulatory data into the kernel
Date: Wed, 25 Apr 2018 15:47:33 +0200 [thread overview]
Message-ID: <1524664054-21717-1-git-send-email-krzk@kernel.org> (raw)
Small embedded systems might:
1. Want to get rid of daemons as much as possible (therefore be built
without CRDA),
2. Not receive user-space incremental updates but an entire system
upgrade (with kernel).
Add class kernel_wireless_regdb which allows in such cases to embed the
wireless regulatory database directly in the Linux kernel during build
process.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
meta-networking/classes/kernel_wireless_regdb.bbclass | 12 ++++++++++++
.../wireless-regdb/wireless-regdb_2016.06.10.bb | 8 ++++++++
2 files changed, 20 insertions(+)
create mode 100644 meta-networking/classes/kernel_wireless_regdb.bbclass
diff --git a/meta-networking/classes/kernel_wireless_regdb.bbclass b/meta-networking/classes/kernel_wireless_regdb.bbclass
new file mode 100644
index 000000000000..6ae90d2d088c
--- /dev/null
+++ b/meta-networking/classes/kernel_wireless_regdb.bbclass
@@ -0,0 +1,12 @@
+# Copies the regulatory plaintext database to kernel sources before compiling.
+# Linux kernel must be compiled with CONFIG_CFG80211_INTERNAL_REGDB to use it.
+
+DEPENDS += "wireless-regdb-native"
+
+SRCTREECOVEREDTASKS += "do_kernel_add_regdb"
+do_kernel_add_regdb() {
+ cp ${STAGING_LIBDIR_NATIVE}/crda/db.txt ${S}/net/wireless/db.txt
+ echo ${S}
+}
+do_kernel_add_regdb[dirs] = "${S}"
+addtask kernel_add_regdb before do_configure after do_patch
diff --git a/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb b/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb
index 64e9401e7a3c..14bf272f4050 100644
--- a/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb
+++ b/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2016.06.10.bb
@@ -17,4 +17,12 @@ do_install() {
install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem
}
+# Native users might want to use source db.txt
+do_install_append_class-native() {
+ install -d -m 0755 ${D}${libdir}/crda
+ install -m 0644 db.txt ${D}${libdir}/crda/db.txt
+}
+
RSUGGESTS_${PN} = "crda"
+
+BBCLASSEXTEND = "native"
--
2.7.4
next reply other threads:[~2018-04-25 13:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 13:47 Krzysztof Kozlowski [this message]
2018-04-25 13:47 ` [meta-networking][rocko][PATCH 2/2] wireless-regdb: Bump version to latest upstream 2017.12.23 Krzysztof Kozlowski
2018-04-25 13:51 ` [meta-networking][rocko][PATCH 1/2] kernel_wireless_regdb: Add class for embedding regulatory data into the kernel Krzysztof Kozlowski
2018-04-25 14:30 ` Trevor Woerner
2018-04-25 14:10 ` ✗ patchtest: failure for "[meta-networking,rocko] kernel..." and 1 more Patchwork
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=1524664054-21717-1-git-send-email-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=openembedded-devel@lists.openembedded.org \
--cc=poky@yoctoproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox