Bug 12712

Summary: [beagleboneblack] demsage error: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
Product: [Build System, Metadata & Runtime] BSPs Reporter: Yi Zhao <yi.zhao>
Component: bsps-meta-yoctoAssignee: Kevin Hao <kexin.hao>
Status: RESOLVED NOTABUG QA Contact: Yi Zhao <yi.zhao>
Severity: normal    
Priority: Medium+ CC: ee.peng.yeoh, randy.macleod, stephano
Version: 2.5   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
dmesg none

Description Yi Zhao 2018-04-25 18:43:09 UTC
Created attachment 4285 [details]
dmesg

Git rev: sumo/da3625c52e1ab8985fba4fc3d133edf92142f182
Image Location: http://autobuilder.yoctoproject.org/pub/releases/yocto-2.5.rc1/machines/beaglebone-yocto/

When boot the board, there are some error messages in dmesg:

Apr 25 23:55:24 beaglebone-yocto user.warn kernel: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
Apr 25 23:55:24 beaglebone-yocto user.info kernel: cfg80211: failed to load regulatory.db

This issue only happens on kernel 4.15 and doesn't happen on 4.12.

See attachment for the full dmesg.
Comment 1 Kevin Hao 2018-04-26 20:04:08 UTC
This is not a bug. The kernel has changed to load the regulatory database as a firmware since commit 007f6c5e6eb4:
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Oct 15 11:22:58 2015 +0200

    cfg80211: support loading regulatory database as firmware file
    
    As the current regulatory database is only about 4k big, and already
    difficult to extend, we decided that overall it would be better to
    get rid of the complications with CRDA and load the database into the
    kernel directly, but in a new format that is extensible.
    
    The new file format can be extended since it carries a length field
    on all the structs that need to be extensible.
    
    In order to be able to request firmware when the module initializes,
    move cfg80211 from subsys_initcall() to the later fs_initcall(); the
    firmware loader is at the same level but linked earlier, so it can
    be called from there. Otherwise, when both the firmware loader and
    cfg80211 are built-in, the request will crash the kernel. We also
    need to be before device_initcall() so that cfg80211 is available
    for devices when they initialize.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Since cfg80211 is a builtin module, we should put the regulatory.db into the /lib/firmware of the initramfs in order to suppress this load error message. But since we can always reload the regulatory database in userspace, so this load error should have no harm at all.
Comment 2 Kevin Hao 2018-04-26 20:09:24 UTC
Talked with Yi, this should not be a bug.