1,首先下载Laird的Yocto recipe压缩包。
2,修改本地Yocto的位于imx-yoctoe-bsp/build路径的bblayers.conf,将Laird的layer加进去。
BBLAYERS = " \
${BSPDIR}/sources/poky/meta \
${BSPDIR}/sources/poky/meta-yocto \
\
${BSPDIR}/sources/meta-openembedded/meta-oe \
${BSPDIR}/sources/meta-openembedded/meta-multimedia \
\
${BSPDIR}/sources/meta-fsl-arm \
${BSPDIR}/sources/meta-fsl-arm-extra \
${BSPDIR}/sources/meta-fsl-demos \
${BSPDIR}/sources/meta-summit-radio/meta-summit-radio-pre-3.4 \
最后一行就是。
3,将下载的Laird的recipe压缩包解压到上面添加的路径。
${BSPDIR}/sources/meta-summit-radio/
因为我本地Yocto版本是3.2,低于3.4版本,所以使用pre-3.4的文件夹。
4,修改Kernel config。
#Rebuild kernel with proper configuration.
cd ~/imx-yocto-bsp/
source setup-environment build/
bitbake -c menuconfig virtual/kernel
修改如下配置:
CONFIG_ARCH_BERLIN need to be disabled
Platform Selection -->
[ ] Marvell Berlin SoC Family
Networking support --> Wireless
[ ] cfg80211
Device Driver -->
[*] LED support
<*> LED Class Support
<*> LED Support for GPIO connected LED
[*] LED support for LEDs on system controller
-*- LED Trigger support
<*> LED Heartbeat Trigger
[*] LED CPU trigger
Cryptographic API -->
<*> CCM support
<*> GCM/GMAC support
<*> CMAC support
<*> CRC32 CRC algorithm
<*> AES cipher algorithms
<*> ARC4 cipher algorithm
Kernel hacking
<*> Kernel debugging
修改完kernel config后,重编时会生效。
5,在local.conf中,或者image.bb中,加入脚本:
IMAGE_INSTALL += "\
kernel-module-60-backports-summit \
60-radio-firmware-sdio-uart \
"
PREFERRED_RPROVIDER_wireless-regdb-static = "60-radio-firmware-sdio-uart"
6,重新构建rootfs,则相关的Laird的无线模块被集成进Linux系统中。
更新roofts后,在dmesg中可以看到相关模组信息:
[ 3.097300] Loading modules backported from Summit Linux version LRD-REL-11.39.0.18-0-g5de64d7583da
[ 3.097331] Backport generated by backports.git v11.39.0.18
[ 3.625826] lrdmwl_sdio mmc0:0001:1: <<Laird Connectivity 60 Series Wireless Network Driver version 11.39.0.18-P39-20190123>>
也可以在文件系统中查看: