启动 wifi 界面时出错:加载失败 regulatory.db

error when starting wifi interface: failed to load regulatory.db

bitbake 使用了我的 yocto 图像,但是当我在目标上启动我的 wifi 接口时,我看到一个错误,例如:

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

我该如何解决这个问题?

您需要添加 wireless-regdb:

 IMAGE_INSTALL_append = " wireless-regdb-static"

请注意 static,其中将包含必要的固件文件。 如果问题仍然存在,您可能遇到了已讨论的错误 this thread。也可以在此线程中找到解决方案,即

Download wireless-regdb 2017.12.23, untar, and copy regulatory.db and regulatory.db.p7s to /lib/firmware;.

[参见 gerardo diaz 的回复]。在我的例子中,这使得错误在引导过程中消失了。

此外,确保内核模块已启用,正如 Cleiton Bueno 指出的那样。

注意:我发布这个是为了文档,希望这也能帮助其他人。

看看你的内核有没有设置:

CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y

您可以通过以下方式确认:

zcat /proc/config.gz | grep CONFIG_CFG80211