aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/classes
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2018-07-05 20:58:12 +0200
committerKhem Raj <raj.khem@gmail.com>2018-07-05 17:51:16 -0700
commit8603b7643b9025bf88dd55165ec808c4cea144e3 (patch)
treef18a49be2731f0073fc4412a4cd1ee3132f910fd /meta-networking/classes
parent20e3c3e2e435526c3666cf0bf6a1d06266337174 (diff)
downloadmeta-openembedded-contrib-8603b7643b9025bf88dd55165ec808c4cea144e3.tar.gz
kernel_wireless_regdb: Add class for embedding regulatory data into older kernel
Linux kernels before v4.15, allowed to be compiled with static regulatory database if it was put under net/wireless/db.txt. Add kernel_wireless_regdb class which allows in such cases to embed the wireless regulatory database directly in the Linux kernel during build process. Usage: 1. The class should be inherited by kernel recipe (e.g. in linux-yocto_%.bbappend). 2. For Linux kernels up to v4.14, build kernel with CONFIG_EXPERT and CONFIG_CFG80211_INTERNAL_REGDB. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/classes')
-rw-r--r--meta-networking/classes/kernel_wireless_regdb.bbclass20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta-networking/classes/kernel_wireless_regdb.bbclass b/meta-networking/classes/kernel_wireless_regdb.bbclass
new file mode 100644
index 0000000000..1238172bd4
--- /dev/null
+++ b/meta-networking/classes/kernel_wireless_regdb.bbclass
@@ -0,0 +1,20 @@
+# Linux kernels before v4.15, allowed to be compiled with static
+# regulatory database if it was put under net/wireless/db.txt.
+#
+# This class copies the regulatory plaintext database to kernel sources before
+# compiling.
+#
+# Usage:
+# 1. The class should be inherited by kernel recipe (e.g. in
+# linux-yocto_%.bbappend).
+# 2. For Linux kernels up to v4.14, build kernel with CONFIG_EXPERT and
+# CONFIG_CFG80211_INTERNAL_REGDB.
+
+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
+}
+do_kernel_add_regdb[dirs] = "${S}"
+addtask kernel_add_regdb before do_build after do_configure