Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643520 - net-wireless/wireless-regdb regulatory.db firmware required for linux 4.15
Summary: net-wireless/wireless-regdb regulatory.db firmware required for linux 4.15
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
: 646018 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-05 10:13 UTC by Mike Lothian
Modified: 2018-01-29 17:56 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wireless-regdb-20171223.ebuild (wireless-regdb-20171223.ebuild,1.02 KB, text/plain)
2018-01-07 23:20 UTC, cyrillic
Details
wireless-regdb-20171223.ebuild (wireless-regdb-20171223.ebuild,1.05 KB, text/plain)
2018-01-21 19:45 UTC, cyrillic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2018-01-05 10:13:23 UTC
As of kernel 4.15 the wireless stack now complains if regulatory.db isn't provided:

platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
cfg80211: failed to load regulatory.db

This file can be generated through a new wireless-regdb package

https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2017.12.23.tar.xz

The resulting file needs to go in /lib/firmware

the following kernel options need to be enabled to use it

CFG80211_CERTIFICATION_ONUS=y
CFG80211_REQUIRE_SIGNED_REGDB=n

in order to load the file without a signature

Not setting those meant I had to also include regulatory.db.p7s which the kernel then complained about not being trusted as the make file in wireless-regdb just self signs
Comment 1 cyrillic 2018-01-07 23:20:10 UTC
Created attachment 513728 [details]
wireless-regdb-20171223.ebuild

Try this on for size.

All I did was bump the ebuild, and copy those 2 files to the /lib/firmware directory (without rebuilding the database).
Comment 2 cyrillic 2018-01-21 19:45:05 UTC
Created attachment 515752 [details]
wireless-regdb-20171223.ebuild

Fixed typo and added bug number.
Comment 3 cyrillic 2018-01-29 02:58:50 UTC
This bug blocks #646018
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2018-01-29 07:02:03 UTC
*** Bug 646018 has been marked as a duplicate of this bug. ***
Comment 5 Larry the Git Cow gentoo-dev 2018-01-29 09:55:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2dfb50194b70d205c86c8c4809a1e45a46b0f7a

commit a2dfb50194b70d205c86c8c4809a1e45a46b0f7a
Author:     Tony Vroon <chainsaw@gentoo.org>
AuthorDate: 2018-01-29 09:55:12 +0000
Commit:     Tony Vroon <chainsaw@gentoo.org>
CommitDate: 2018-01-29 09:55:12 +0000

    net-wireless/wireless-regdb: regulatory.db support
    
    As reported by Mike Lothian in bug #643520 and implemented
    by "Cyrillic", 4.15 kernels require both regulatory.db and
    the corresponding PKCS#7 signature.
    Straight to stable as per the precedent set by previous
    commits from Richard "Zero-Chaos" Farina.
    
    Closes: https://bugs.gentoo.org/643520
    Package-Manager: Portage-2.3.19, Repoman-2.3.6
    RepoMan-Options: --force

 .../wireless-regdb-20171223-r1.ebuild              | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
Comment 6 Mike Lothian 2018-01-29 09:57:12 UTC
The signature isn't required if these options are set:

CFG80211_CERTIFICATION_ONUS=y
CFG80211_REQUIRE_SIGNED_REGDB=n
Comment 7 Mike Lothian 2018-01-29 09:59:08 UTC
Currently this is what the ebuild installs:

equery f wireless-regdb
 * Searching for wireless-regdb ...
 * Contents of net-wireless/wireless-regdb-20171223:
/etc
/etc/wireless-regdb
/etc/wireless-regdb/pubkeys
/etc/wireless-regdb/pubkeys/sforshee.key.pub.pem
/usr
/usr/lib
/usr/lib/crda
/usr/lib/crda/regulatory.bin
/usr/share
/usr/share/doc
/usr/share/doc/wireless-regdb-20171223
/usr/share/doc/wireless-regdb-20171223/README.bz2
/usr/share/doc/wireless-regdb-20171223/db.txt.bz2
/usr/share/man
/usr/share/man/man5
/usr/share/man/man5/regulatory.bin.5.bz2

So no /lib/firmware/regulatory.db
Comment 8 Tony Vroon (RETIRED) gentoo-dev 2018-01-29 10:03:51 UTC
(In reply to Mike Lothian from comment #6)
> The signature isn't required if these options are set:
> CFG80211_CERTIFICATION_ONUS=y
> CFG80211_REQUIRE_SIGNED_REGDB=n

Which is a non-standard setup. What is installed should cope with an untweaked kernel.
Comment 9 Mike Lothian 2018-01-29 14:46:40 UTC
Sorry my comment was in relation to net-wireless/wireless-regdb-20171223 not net-wireless/wireless-regdb-20171223-r1, all files now in place

Thanks
Comment 10 Konstantinos Smanis 2018-01-29 15:04:48 UTC
I still get the following output with wireless-regdb-20171223-r1, is there any relevant kernel config option that should be switched on as well?

[    1.398297] Loading compiled-in X.509 certificates
[    1.399866] rtc_cmos 00:03: setting system clock to 2018-01-29 14:59:26 UTC (1517237966)
[    1.399956] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.400753] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.400784] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.400785] cfg80211: failed to load regulatory.db
Comment 11 Konstantinos Smanis 2018-01-29 15:25:58 UTC
Never mind, I had cfg80211 built into the kernel. Either the firmware should be embedded as well, or cfg80211 should be built as a module.
Comment 12 Rick Farina (Zero_Chaos) gentoo-dev 2018-01-29 17:56:09 UTC
thanks Tony!