wireless-regdb: install crda files only if used
authorPeter Seiderer <ps.report@gmx.net>
Thu, 4 Oct 2018 20:48:23 +0000 (22:48 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 8 Oct 2018 16:13:45 +0000 (18:13 +0200)
Since linux-4.15 the kernel supports loading the files
regulatory.db/regulatory.db.p7s directly from the /lib/firmware
directory, for earlier versions the crda helper application
is needed.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/wireless-regdb/Config.in
package/wireless-regdb/wireless-regdb.mk

index 0c9896deb913b6fa86ec3b923247f0e6bf324960..17350a41d8b343e28bbc6a23808d3ec02252f73d 100644 (file)
@@ -3,7 +3,12 @@ config BR2_PACKAGE_WIRELESS_REGDB
        help
          Wireless regulatory database.
 
-         Wireless regulatory database for CRDA. The database lists the
+         Wireless regulatory database. The database lists the
          allowed radio frequencies for each local jurisdiction.
 
+         Since linux-4.15 the kernel supports loading the files
+         regulatory.db/regulatory.db.p7s directly from the
+         /lib/firmware directory, for earlier versions the crda helper
+         application is needed.
+
          https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb
index fcbba055acc50f4f8c115a0f439d083c6a2fff2a..9c899f973b3960ef8160e24f607cfc7d433f90ad 100644 (file)
@@ -10,11 +10,17 @@ WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb
 WIRELESS_REGDB_LICENSE = ISC
 WIRELESS_REGDB_LICENSE_FILES = LICENSE
 
-define WIRELESS_REGDB_INSTALL_TARGET_CMDS
+ifeq ($(BR2_PACKAGE_CRDA),y)
+define  WIRELESS_REGDB_INSTALL_CRDA_TARGET_CMDS
        $(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \
                $(TARGET_DIR)/usr/lib/crda/regulatory.bin
        $(INSTALL) -m 644 -D -T $(@D)/sforshee.key.pub.pem \
                $(TARGET_DIR)/etc/wireless-regdb/pubkeys/sforshee.key.pub.pem
+endef
+endif
+
+define WIRELESS_REGDB_INSTALL_TARGET_CMDS
+       $(WIRELESS_REGDB_INSTALL_CRDA_TARGET_CMDS)
        $(INSTALL) -m 644 -D -T $(@D)/regulatory.db \
                $(TARGET_DIR)/lib/firmware/regulatory.db
        $(INSTALL) -m 644 -D -T $(@D)/regulatory.db.p7s \