mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] crda+regdb: Bump. crda 3.18 -> 4.14, regdb 2019.06.03 -> 2021.08.28
@ 2022-01-19  9:51 Christian Melki
  2022-01-21 14:24 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Melki @ 2022-01-19  9:51 UTC (permalink / raw)
  To: ptxdist

* Move crda patches from 3.18 to 4.14, applies cleanly.
* Update crda URL, the old URL does not contain 4.14.
* crda depends on host system python capability.

* Introduce a new ONLY_REGULATOR_DB option.
Kernels > 4.15 do not really need CRDA anymore.
Make it an option instead of a kernel version check so that
developers can decide for themselves when to switch and why.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 .../0001-fix-linking-libreg.patch              |  0
 ...Do-not-run-ldconfig-if-DESTDIR-is-set.patch |  0
 ...hout-embedding-pubkey-data-into-crda-.patch |  0
 .../0004-udev-Fix-rule-for-initial-setup.patch |  0
 patches/{crda-3.18 => crda-4.14}/series        |  0
 rules/crda.in                                  | 18 ++++++++++++++++--
 rules/crda.make                                | 15 +++++++++------
 7 files changed, 25 insertions(+), 8 deletions(-)
 rename patches/{crda-3.18 => crda-4.14}/0001-fix-linking-libreg.patch (100%)
 rename patches/{crda-3.18 => crda-4.14}/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch (100%)
 rename patches/{crda-3.18 => crda-4.14}/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch (100%)
 rename patches/{crda-3.18 => crda-4.14}/0004-udev-Fix-rule-for-initial-setup.patch (100%)
 rename patches/{crda-3.18 => crda-4.14}/series (100%)

diff --git a/patches/crda-3.18/0001-fix-linking-libreg.patch b/patches/crda-4.14/0001-fix-linking-libreg.patch
similarity index 100%
rename from patches/crda-3.18/0001-fix-linking-libreg.patch
rename to patches/crda-4.14/0001-fix-linking-libreg.patch
diff --git a/patches/crda-3.18/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch b/patches/crda-4.14/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch
similarity index 100%
rename from patches/crda-3.18/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch
rename to patches/crda-4.14/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch
diff --git a/patches/crda-3.18/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch b/patches/crda-4.14/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch
similarity index 100%
rename from patches/crda-3.18/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch
rename to patches/crda-4.14/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch
diff --git a/patches/crda-3.18/0004-udev-Fix-rule-for-initial-setup.patch b/patches/crda-4.14/0004-udev-Fix-rule-for-initial-setup.patch
similarity index 100%
rename from patches/crda-3.18/0004-udev-Fix-rule-for-initial-setup.patch
rename to patches/crda-4.14/0004-udev-Fix-rule-for-initial-setup.patch
diff --git a/patches/crda-3.18/series b/patches/crda-4.14/series
similarity index 100%
rename from patches/crda-3.18/series
rename to patches/crda-4.14/series
diff --git a/rules/crda.in b/rules/crda.in
index b0008e7f5..48d952555 100644
--- a/rules/crda.in
+++ b/rules/crda.in
@@ -1,12 +1,26 @@
 ## SECTION=networking
 
-config CRDA
+menuconfig CRDA
 	tristate
 	select LIBNL3
 	select OPENSSL
-	prompt "crda"
+	select HOST_SYSTEM_PYTHON3
+	prompt "crda                          "
 	help
 	  CRDA acts as the udev helper for communication between the kernel and
 	  userspace for regulatory compliance. It relies on nl80211 for communication.
 	  CRDA is intended to be run only through udev communication from the kernel.
 	  The user should never have to run it manually except if debugging udev issues.
+
+if CRDA
+
+config CRDA_ONLY_REGULATORY_DB
+	bool
+	prompt "Install only regulatory db"
+	help
+	  CRDA is a legacy option for kernels older than 4.15.
+	  Newer kernels can use the regulatory db as a firmware file,
+	  without external help.
+	  If enabled, the CRDA package only installs the regulatory.db file.
+
+endif
diff --git a/rules/crda.make b/rules/crda.make
index 9cbb7af93..c3048c760 100644
--- a/rules/crda.make
+++ b/rules/crda.make
@@ -14,11 +14,11 @@ PACKAGES-$(PTXCONF_CRDA) += crda
 #
 # Paths and names
 #
-CRDA_VERSION	:= 3.18
-CRDA_MD5	:= 0431fef3067bf503dfb464069f06163a
+CRDA_VERSION	:= 4.14
+CRDA_MD5	:= cac7ba8de3e2e6aa46918e0c76df7d67
 CRDA		:= crda-$(CRDA_VERSION)
-CRDA_SUFFIX	:= tar.xz
-CRDA_URL	:= $(call ptx/mirror, KERNEL, ../software/network/crda/$(CRDA).$(CRDA_SUFFIX))
+CRDA_SUFFIX	:= tar.gz
+CRDA_URL	:= https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/$(CRDA).$(CRDA_SUFFIX)
 CRDA_SOURCE	:= $(SRCDIR)/$(CRDA).$(CRDA_SUFFIX)
 CRDA_DIR	:= $(BUILDDIR)/$(CRDA)
 CRDA_LICENSE	:= ISC AND copyleft-next-0.3.0
@@ -26,8 +26,8 @@ CRDA_LICENSE_FILES := \
 	file://LICENSE;md5=ef8b69b43141352d821fd66b64ff0ee7 \
 	file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe
 
-CRDA_REGDB_VERSION	:= 2019.06.03
-CRDA_REGDB_MD5		:= e16f223ec2ecb4937b1a8ef9ce8dda99
+CRDA_REGDB_VERSION	:= 2021.08.28
+CRDA_REGDB_MD5		:= 54db6062be38311b07bf9fd039c95e5d
 CRDA_REGDB		:= wireless-regdb-$(CRDA_REGDB_VERSION)
 CRDA_REGDB_SUFFIX	:= tar.gz
 CRDA_REGDB_URL		:= \
@@ -97,6 +97,7 @@ $(STATEDIR)/crda.targetinstall:
 	@$(call install_fixup, crda,AUTHOR,"Jan Luebbe <jlu@pengutronix.de>")
 	@$(call install_fixup, crda,DESCRIPTION,missing)
 
+ifndef PTXCONF_CRDA_ONLY_REGULATORY_DB
 	@$(call install_copy, crda, 0, 0, 0755, -, /usr/sbin/crda)
 	@$(call install_copy, crda, 0, 0, 0755, -, /usr/sbin/regdbdump)
 	@$(call install_copy, crda, 0, 0, 0644, -, \
@@ -107,6 +108,8 @@ $(STATEDIR)/crda.targetinstall:
 		/usr/lib/crda/pubkeys)
 	@$(call install_alternative, crda, 0, 0, 0644, \
 		/usr/lib/crda/regulatory.bin)
+endif
+
 	@$(call install_alternative, crda, 0, 0, 0644, \
 		/lib/firmware/regulatory.db)
 	@$(call install_alternative, crda, 0, 0, 0644, \
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-21 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19  9:51 [ptxdist] [PATCH] crda+regdb: Bump. crda 3.18 -> 4.14, regdb 2019.06.03 -> 2021.08.28 Christian Melki
2022-01-21 14:24 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox