Skip to contentSkip to conversation

<wireless-regdb>: Adds the option to copy "regulatory.db[.p7s]" to /lib/firmware

PATCH New noctarius 2 participants 4 messages Jul 12, 2018 – Jul 13, 2018

lore
Share & tools
lore

noctarius

author
#0 lore raw

PATCH 1/1 <wireless-regdb>: Adds the option to copy "regulatory.db[.p7s]" to /lib/firmware

Certain wireless drivers (like the Broadcom FullMac drivers" expect the regulatory.db and regulatory.db.p7s files to be available to be loadable from /lib/firmware. If not available the driver still loads but runs on a minimal subset of channels.

This newly added option gives possibility to have those files copied to the necessary directory.

---
 package/wireless-regdb/Config.in         |  8 ++++++++
 package/wireless-regdb/wireless-regdb.mk | 10 ++++++++++
 2 files changed, 18 insertions(+)
package/wireless-regdb/Config.in +8 -0
index 0c9896deb9..5c91a7d8c7 100644
@@ -7,3 +7,11 @@ config BR2_PACKAGE_WIRELESS_REGDB
 	  allowed radio frequencies for each local jurisdiction.
 
 	  https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb
+
+config BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE
+	bool "wireless-regdb-firmware"
+	depends on BR2_PACKAGE_WIRELESS_REGDB
+	help
+	  Copies the regulatory.db and regulatory.db.p7s files to
+	  /lib/firmware which is necessary for certain drivers like
+	  the Broadcom FullMac driver.
package/wireless-regdb/wireless-regdb.mk +10 -0
index e9283a00e2..e322035841 100644
@@ -10,6 +10,16 @@ WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb
 WIRELESS_REGDB_LICENSE = ISC
 WIRELESS_REGDB_LICENSE_FILES = LICENSE
 
+ifeq ($(BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE),y)
+define WIRELESS_REGDB_FIRMWARE_INSTALL
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db \
+		$(TARGET_DIR)/lib/firmware/regulatory.db
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db.p7s \
+		$(TARGET_DIR)/lib/firmware/regulatory.db.p7s
+endef
+WIRELESS_REGDB_POST_INSTALL_TARGET_HOOKS += WIRELESS_REGDB_FIRMWARE_INSTALL
+endif
+
 define WIRELESS_REGDB_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \
 		$(TARGET_DIR)/usr/lib/crda/regulatory.bin
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 <wireless-regdb>: Adds the option to copy "regulatory.db[.p7s]" to /lib/firmware

Hi Christoph,

Thank you for this patch. I have a few small remarks.

On 12-07-18 22:09, noctarius wrote:

The Author should be the same as the signed-off-by, so could you set your
user.name to Christoph Engelbert?

Quoted 33 lines

Certain wireless drivers (like the Broadcom FullMac drivers" expect the regulatory.db and regulatory.db.p7s files to be available to be loadable from /lib/firmware. If not available the driver still loads but runs on a minimal subset of channels.

This newly added option gives possibility to have those files copied to the necessary directory.

---
 package/wireless-regdb/Config.in         |  8 ++++++++
 package/wireless-regdb/wireless-regdb.mk | 10 ++++++++++
 2 files changed, 18 insertions(+)
package/wireless-regdb/Config.in +8 -0
index 0c9896deb9..5c91a7d8c7 100644
@@ -7,3 +7,11 @@ config BR2_PACKAGE_WIRELESS_REGDB
 	  allowed radio frequencies for each local jurisdiction.
 
 	  https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb
+
+config BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE
+	bool "wireless-regdb-firmware"
+	depends on BR2_PACKAGE_WIRELESS_REGDB
+	help
+	  Copies the regulatory.db and regulatory.db.p7s files to
+	  /lib/firmware which is necessary for certain drivers like
+	  the Broadcom FullMac driver.
package/wireless-regdb/wireless-regdb.mk +0 -0
index e9283a00e2..e322035841 100644

package/wireless-regdb/wireless-regdb.mk WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb · line 18

Quoted 9 lines
package/wireless-regdb/wireless-regdb.mk +6 -0
@@ -10,6 +10,16 @@ WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb
 WIRELESS_REGDB_LICENSE = ISC
 WIRELESS_REGDB_LICENSE_FILES = LICENSE
 
+ifeq ($(BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE),y)
+define WIRELESS_REGDB_FIRMWARE_INSTALL
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db \
+		$(TARGET_DIR)/lib/firmware/regulatory.db
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db.p7s \
+		$(TARGET_DIR)/lib/firmware/regulatory.db.p7s

Since these two files only add up to 6KB, I don't think it's worthwhile to make
installing them conditional.

Regards,
Arnout

Quoted 8 lines
package/wireless-regdb/wireless-regdb.mk +4 -0
+endef
+WIRELESS_REGDB_POST_INSTALL_TARGET_HOOKS += WIRELESS_REGDB_FIRMWARE_INSTALL
+endif
+
 define WIRELESS_REGDB_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \
 		$(TARGET_DIR)/usr/lib/crda/regulatory.bin
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#2 lore raw

PATCH 1/1 <wireless-regdb>: Adds the option to copy "regulatory.db[.p7s]" to /lib/firmware

Hey Arnout,

Quoted 11 lines · Arnout Vandecappelle

Hi Christoph,

Thank you for this patch. I have a few small remarks.

On 12-07-18 22:09, noctarius wrote:

The Author should be the same as the signed-off-by, so could you set your user.name to Christoph Engelbert?

Sure thing.

Quoted 37 lines
Quoted 37 lines

Certain wireless drivers (like the Broadcom FullMac drivers" expect the regulatory.db and regulatory.db.p7s files to be available to be loadable from /lib/firmware. If not available the driver still loads but runs on a minimal subset of channels.

This newly added option gives possibility to have those files copied to the necessary directory.

---
package/wireless-regdb/Config.in | 8 ++++++++
package/wireless-regdb/wireless-regdb.mk | 10 ++++++++++

2 files changed, 18 insertions(+)
package/wireless-regdb/Config.in +8 -0
index 0c9896deb9..5c91a7d8c7 100644
@@ -7,3 +7,11 @@ config BR2_PACKAGE_WIRELESS_REGDB
 	  allowed radio frequencies for each local jurisdiction.
 
 	  https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb
+
+config BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE
+	bool "wireless-regdb-firmware"
+	depends on BR2_PACKAGE_WIRELESS_REGDB
+	help
+	  Copies the regulatory.db and regulatory.db.p7s files to
+	  /lib/firmware which is necessary for certain drivers like
+	  the Broadcom FullMac driver.
package/wireless-regdb/wireless-regdb.mk +0 -0
index e9283a00e2..e322035841 100644
@@ -10,6 +10,16 @@ WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb

WIRELESS_REGDB_LICENSE = ISC
WIRELESS_REGDB_LICENSE_FILES = LICENSE

Quoted 9 lines

package/wireless-regdb/wireless-regdb.mk WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb · line 18

Quoted 6 lines
package/wireless-regdb/wireless-regdb.mk +6 -0
+ifeq ($(BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE),y)
+define WIRELESS_REGDB_FIRMWARE_INSTALL
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db \
+		$(TARGET_DIR)/lib/firmware/regulatory.db
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db.p7s \
+		$(TARGET_DIR)/lib/firmware/regulatory.db.p7s

Since these two files only add up to 6KB, I don't think it's worthwhile to make installing them conditional.

My thinking was, since nobody seems to miss it, most drivers might not need it at all and it?s specific to the likes of Broadcom. To not change the current behavior I added the condition. Obviously I can remove it, if you prefer.

Thanks,
Chris

Quoted 25 lines

Regards,
Arnout

Quoted 8 lines
package/wireless-regdb/wireless-regdb.mk +4 -0
+endef
+WIRELESS_REGDB_POST_INSTALL_TARGET_HOOKS += WIRELESS_REGDB_FIRMWARE_INSTALL
+endif
+

define WIRELESS_REGDB_INSTALL_TARGET_CMDS

	$(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \
		$(TARGET_DIR)/usr/lib/crda/regulatory.bin
Signature · 10 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#3 lore raw

PATCH 1/1 <wireless-regdb>: Adds the option to copy "regulatory.db[.p7s]" to /lib/firmware

Hey again,

Sorry for the lot of mails, I guess the last version is actually what you?re looking for. Feeling a bit stupid, but first time I?m working with this system over pull requests :(

Thanks,
Chris

Quoted 97 lines · Christoph Engelbert

Hey Arnout,

Quoted 11 lines · On 13. Jul 2018, at 10:37, Arnout Vandecappelle <arnout at mind.be…

Hi Christoph,

Thank you for this patch. I have a few small remarks.

On 12-07-18 22:09, noctarius wrote:

The Author should be the same as the signed-off-by, so could you set your user.name to Christoph Engelbert?

Sure thing.

Quoted 37 lines
Quoted 37 lines

Certain wireless drivers (like the Broadcom FullMac drivers" expect the regulatory.db and regulatory.db.p7s files to be available to be loadable from /lib/firmware. If not available the driver still loads but runs on a minimal subset of channels.

This newly added option gives possibility to have those files copied to the necessary directory.

---
package/wireless-regdb/Config.in | 8 ++++++++
package/wireless-regdb/wireless-regdb.mk | 10 ++++++++++

2 files changed, 18 insertions(+)
package/wireless-regdb/Config.in +8 -0
index 0c9896deb9..5c91a7d8c7 100644
@@ -7,3 +7,11 @@ config BR2_PACKAGE_WIRELESS_REGDB
 	  allowed radio frequencies for each local jurisdiction.
 
 	  https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb
+
+config BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE
+	bool "wireless-regdb-firmware"
+	depends on BR2_PACKAGE_WIRELESS_REGDB
+	help
+	  Copies the regulatory.db and regulatory.db.p7s files to
+	  /lib/firmware which is necessary for certain drivers like
+	  the Broadcom FullMac driver.
package/wireless-regdb/wireless-regdb.mk +0 -0
index e9283a00e2..e322035841 100644
@@ -10,6 +10,16 @@ WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb

WIRELESS_REGDB_LICENSE = ISC
WIRELESS_REGDB_LICENSE_FILES = LICENSE

Quoted 9 lines

package/wireless-regdb/wireless-regdb.mk WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb · line 18

Quoted 6 lines
package/wireless-regdb/wireless-regdb.mk +6 -0
+ifeq ($(BR2_PACKAGE_WIRELESS_REGDB_FIRMWARE),y)
+define WIRELESS_REGDB_FIRMWARE_INSTALL
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db \
+		$(TARGET_DIR)/lib/firmware/regulatory.db
+	$(INSTALL) -m 644 -D -T $(@D)/regulatory.db.p7s \
+		$(TARGET_DIR)/lib/firmware/regulatory.db.p7s

Since these two files only add up to 6KB, I don't think it's worthwhile to make installing them conditional.

My thinking was, since nobody seems to miss it, most drivers might not need it at all and it?s specific to the likes of Broadcom. To not change the current behavior I added the condition. Obviously I can remove it, if you prefer.

Thanks,
Chris

Quoted 4 lines

Regards,
Arnout

Quoted 21 lines
Quoted 8 lines
package/wireless-regdb/wireless-regdb.mk +4 -0
+endef
+WIRELESS_REGDB_POST_INSTALL_TARGET_HOOKS += WIRELESS_REGDB_FIRMWARE_INSTALL
+endif
+

define WIRELESS_REGDB_INSTALL_TARGET_CMDS

	$(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \
		$(TARGET_DIR)/usr/lib/crda/regulatory.bin
Signature · 10 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
_______________________________________________
buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot <http://lists.busybox.net/mailman/listinfo/buildroot>
Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot <http://lists.busybox.net/mailman/listinfo/buildroot>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180713/ef8f2258/attachment.html>