ADD: [wireless-regdb] add wireless-regdb to meta layer
BugzId: 65179
This commit is contained in:
parent
558e34b455
commit
9e1b967276
|
|
@ -0,0 +1,16 @@
|
|||
--- a/db.txt 2020-03-30 18:33:22.648532785 +0200
|
||||
+++ b/db.txt 2020-03-30 18:34:14.684508147 +0200
|
||||
@@ -1671,3 +1671,13 @@ country ZW: DFS-ETSI
|
||||
(5250 - 5330 @ 80), (20), DFS, AUTO-BW
|
||||
(5490 - 5710 @ 160), (27), DFS
|
||||
|
||||
+country EU: DFS-ETSI
|
||||
+ (2400 - 2483.5 @ 40), (100 mW)
|
||||
+ (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
|
||||
+ (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
|
||||
+ (5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
|
||||
+ # short range devices (ETSI EN 300 440-1)
|
||||
+ (5725 - 5875 @ 80), (25 mW)
|
||||
+ # 60 GHz band channels 1-4 (ETSI EN 302 567)
|
||||
+ (57000 - 66000 @ 2160), (40)
|
||||
+
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 2f1ed93..317d01c 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,7 +1,5 @@
|
||||
# Install prefix
|
||||
PREFIX ?= /usr
|
||||
-CRDA_PATH ?= $(PREFIX)/lib/crda
|
||||
-CRDA_KEY_PATH ?= $(CRDA_PATH)/pubkeys
|
||||
FIRMWARE_PATH ?= /lib/firmware
|
||||
|
||||
MANDIR ?= $(PREFIX)/share/man/
|
||||
@@ -31,33 +29,28 @@ REGDB_AUTHOR ?= $(shell if [ -f $(DISTRO_PRIVKEY) ]; then \
|
||||
fi)
|
||||
|
||||
REGDB_PRIVKEY ?= ~/.wireless-regdb-$(REGDB_AUTHOR).key.priv.pem
|
||||
-REGDB_PUBKEY ?= $(REGDB_AUTHOR).key.pub.pem
|
||||
REGDB_PUBCERT ?= $(REGDB_AUTHOR).x509.pem
|
||||
|
||||
REGDB_UPSTREAM_PUBKEY ?= sforshee.key.pub.pem
|
||||
|
||||
REGDB_CHANGED = $(shell $(SHA1SUM) -c --status sha1sum.txt >/dev/null 2>&1; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
- echo maintainer-clean $(REGDB_PUBKEY) $(REGDB_PUBCERT); \
|
||||
+ echo maintainer-clean $(REGDB_PUBCERT); \
|
||||
fi)
|
||||
|
||||
.PHONY: all clean mrproper install maintainer-clean install-distro-key
|
||||
|
||||
-all: $(REGDB_CHANGED) regulatory.bin sha1sum.txt regulatory.db.p7s
|
||||
+all: $(REGDB_CHANGED) regulatory.db.p7s sha1sum.txt
|
||||
|
||||
clean:
|
||||
@rm -f *.pyc *.gz
|
||||
|
||||
maintainer-clean: clean
|
||||
- @rm -f regulatory.bin regulatory.db regulatory.db.p7s
|
||||
+ @rm -f regulatory.db regulatory.db.p7s
|
||||
|
||||
mrproper: clean maintainer-clean
|
||||
- @echo Removed public key, regulatory.bin, regulatory.db* and compressed man pages
|
||||
- @rm -f $(REGDB_PUBKEY) $(REGDB_PUBCERT) .custom
|
||||
-
|
||||
-regulatory.bin: db.txt $(REGDB_PRIVKEY) $(REGDB_PUBKEY)
|
||||
- @echo Generating $@ digitally signed by $(REGDB_AUTHOR)...
|
||||
- ./db2bin.py regulatory.bin db.txt $(REGDB_PRIVKEY)
|
||||
+ @echo Removed public key, regulatory.db* and compressed man pages
|
||||
+ @rm -f $(REGDB_PUBCERT) .custom
|
||||
|
||||
regulatory.db: db.txt db2fw.py
|
||||
@echo "Generating $@"
|
||||
@@ -74,20 +67,6 @@ regulatory.db.p7s: regulatory.db $(REGDB_PRIVKEY) $(REGDB_PUBCERT)
|
||||
sha1sum.txt: db.txt
|
||||
sha1sum $< > $@
|
||||
|
||||
-$(REGDB_PUBKEY): $(REGDB_PRIVKEY)
|
||||
- @echo "Generating public key for $(REGDB_AUTHOR)..."
|
||||
- openssl rsa -in $(REGDB_PRIVKEY) -out $(REGDB_PUBKEY) -pubout -outform PEM
|
||||
-
|
||||
-$(REGDB_PUBCERT): $(REGDB_PRIVKEY)
|
||||
- @echo "Generating certificate for $(REGDB_AUTHOR)..."
|
||||
- ./gen-pubcert.sh $(REGDB_PRIVKEY) $(REGDB_PUBCERT)
|
||||
- @echo $(REGDB_PUBKEY) > .custom
|
||||
-
|
||||
-
|
||||
-$(REGDB_PRIVKEY):
|
||||
- @echo "Generating private key for $(REGDB_AUTHOR)..."
|
||||
- openssl genrsa -out $(REGDB_PRIVKEY) 2048
|
||||
-
|
||||
ifneq ($(shell test -e $(DISTRO_PRIVKEY) && echo yes),yes)
|
||||
$(DISTRO_PRIVKEY):
|
||||
@echo "Generating private key for $(LSB_ID) packager..."
|
||||
@@ -115,15 +94,7 @@ install-distro-key: maintainer-clean $(DISTRO_PRIVKEY)
|
||||
# make maintainer-clean
|
||||
# make
|
||||
# sudo make install
|
||||
-install: regulatory.bin.5.gz regulatory.db.5.gz
|
||||
- install -m 755 -d $(DESTDIR)/$(CRDA_PATH)
|
||||
- install -m 755 -d $(DESTDIR)/$(CRDA_KEY_PATH)
|
||||
- install -m 755 -d $(DESTDIR)/$(FIRMWARE_PATH)
|
||||
- if [ -f .custom ]; then \
|
||||
- install -m 644 -t $(DESTDIR)/$(CRDA_KEY_PATH)/ $(shell cat .custom); \
|
||||
- fi
|
||||
- install -m 644 -t $(DESTDIR)/$(CRDA_KEY_PATH)/ $(REGDB_UPSTREAM_PUBKEY)
|
||||
- install -m 644 -t $(DESTDIR)/$(CRDA_PATH)/ regulatory.bin
|
||||
- install -m 644 -t $(DESTDIR)/$(FIRMWARE_PATH) regulatory.db regulatory.db.p7s
|
||||
+install: regulatory.db.5.gz
|
||||
+ install -m 644 -t $(DESTDIR)/$(CRDA_PATH)/ regulatory.db
|
||||
install -m 755 -d $(DESTDIR)/$(MANDIR)/man5/
|
||||
- install -m 644 -t $(DESTDIR)/$(MANDIR)/man5/ regulatory.bin.5.gz regulatory.db.5.gz
|
||||
+ install -m 644 -t $(DESTDIR)/$(MANDIR)/man5/ regulatory.db.5.gz
|
||||
diff --git a/regulatory.db b/regulatory.db
|
||||
index b86cffa..7221523 100644
|
||||
Binary files a/regulatory.db and b/regulatory.db differ
|
||||
diff --git a/regulatory.db.p7s b/regulatory.db.p7s
|
||||
index ac6b4cc..5ae61b4 100644
|
||||
Binary files a/regulatory.db.p7s and b/regulatory.db.p7s differ
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
Remove the NO-IR flag from channels 36-48 on the World domain,
|
||||
to make it usable for AP mode.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/db.txt
|
||||
+++ b/db.txt
|
||||
@@ -16,7 +16,7 @@ country 00:
|
||||
# Channel 14. Only JP enables this and for 802.11b only
|
||||
(2474 - 2494 @ 20), (20), NO-IR, NO-OFDM
|
||||
# Channel 36 - 48
|
||||
- (5170 - 5250 @ 80), (20), NO-IR, AUTO-BW
|
||||
+ (5170 - 5250 @ 80), (20), AUTO-BW
|
||||
# Channel 52 - 64
|
||||
(5250 - 5330 @ 80), (20), NO-IR, DFS, AUTO-BW
|
||||
# Channel 100 - 144
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,41 @@
|
|||
SUMMARY = "Wireless Central Regulatory Domain Database"
|
||||
HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA"
|
||||
SECTION = "network"
|
||||
LICENSE = "ISC"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
|
||||
|
||||
DEPENDS = "openssl-native"
|
||||
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git;protocol=http \
|
||||
file://100-regdb-write-firmware-file-format-version-code-20.patch \
|
||||
file://500-world-regd-5GHz.patch \
|
||||
file://regulatory.db \
|
||||
file://0001-ADD-regdb-EU-section-with-ranges-allowed-for-all-EU-.patch \
|
||||
"
|
||||
|
||||
SRCREV = "222442d26a8ce40a3c06f31aedf8c7adcc3d5f73"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit pkgconfig allarch
|
||||
|
||||
do_compile () {
|
||||
oe_runmake regulatory.db
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db
|
||||
}
|
||||
|
||||
# Install static regulatory DB in /lib/firmware for kernel to load.
|
||||
# This requires Linux kernel >= v4.15.
|
||||
# For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass in kernel's recipe.
|
||||
PACKAGES =+ "${PN}-static"
|
||||
RCONFLICTS_${PN} = "${PN}-static"
|
||||
|
||||
FILES_${PN}-static = " \
|
||||
${nonarch_base_libdir}/firmware/regulatory.db \
|
||||
"
|
||||
|
||||
RSUGGESTS_${PN} = "crda"
|
||||
BBCLASSEXTEND = "native"
|
||||
Loading…
Reference in New Issue