mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] crda+regdb: Bump. crda 3.18 -> 4.14, regdb 2019.06.03 -> 2021.08.28
Date: Wed, 19 Jan 2022 10:51:09 +0100	[thread overview]
Message-ID: <20220119095109.3661113-1-christian.melki@t2data.com> (raw)

* 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


             reply	other threads:[~2022-01-19  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19  9:51 Christian Melki [this message]
2022-01-21 14:24 ` [ptxdist] [APPLIED] " Michael Olbrich

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=20220119095109.3661113-1-christian.melki@t2data.com \
    --to=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.de \
    /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