This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62x - How to include cfg80211 module support as part of the eMMC image?

Part Number: PROCESSOR-SDK-AM62X

I am trying to evaluate NXP's Wi-Fi module over SDIO (using SD card slot) with AM62x-SK. Since SDIO card is interfaced over the SD slot, i am trying to boot from eMMC. 

1. I have installed ti-processor-sdk-linux-rt-am62xx-evm-09.01.00.08 and have cross compiled the NXP's driver sources successfully.  I also have configured the kernel using defconfig to include cfg80211 as a module under networking support.

make ARCH=arm64 CROSS_COMPILE=aarch64-oe-linux- menuconfig

2. Then I compiled the kernel and the modified device tree as follows

make ARCH=arm64 CROSS_COMPILE=aarch64-oe-linux- Image

make ARCH=arm64 CROSS_COMPILE=aarch64-oe-linux- dtbs

3. Copied the kernel image and the device tree to the rootfs/boot partition in the eMMC.

Question: Board successfully boots from eMMC and on trying to install the wlan drives, insmod is complaining about unknow symbols as follows. Insmod cfg80211 also complains about the module not being present in /lib/modules. How do i include cfg80211 module support as part of my image running in eMMC ? 

root@am62xx-evm:~/NXP88W9098# ls
mlan.ko moal.ko
root@am62xx-evm:~/NXP88W9098# insmod moal.ko fw_serial=1 fw_name=nxp/sdio9098_wlan_v1.bin
[ 4431.829300] moal: Unknown symbol cfg80211_sched_scan_results (err -2)
[ 4431.835832] moal: Unknown symbol cfg80211_mgmt_tx_status_ext (err -2)
[ 4431.842305] moal: Unknown symbol cfg80211_rx_assoc_resp (err -2)
[ 4431.848355] moal: Unknown symbol regulatory_set_wiphy_regd_sync (err -2)
[ 4431.855142] moal: Unknown symbol cfg80211_scan_done (err -2)
[ 4431.860858] moal: Unknown symbol cfg80211_sched_scan_stopped (err -2)
[ 4431.867342] moal: Unknown symbol cfg80211_remain_on_channel_expired (err -2)
[ 4431.874391] moal: Unknown symbol cfg80211_cac_event (err -2)
[ 4431.880055] moal: Unknown symbol cfg80211_register_netdevice (err -2)
[ 4431.886524] moal: Unknown symbol regulatory_hint (err -2)
[ 4431.891969] moal: Unknown symbol cfg80211_new_sta (err -2)
[ 4431.897463] moal: Unknown symbol cfg80211_disconnected (err -2)
[ 4431.903421] moal: Unknown symbol wiphy_new_nm (err -2)
[ 4431.908561] moal: Unknown symbol cfg80211_ready_on_channel (err -2)
[ 4431.914839] moal: Unknown symbol cfg80211_classify8021d (err -2)
[ 4431.920853] moal: Unknown symbol cfg80211_rx_mlme_mgmt (err -2)
[ 4431.926790] moal: Unknown symbol wiphy_register (err -2)
[ 4431.932106] moal: Unknown symbol __cfg80211_alloc_reply_skb (err -2)
[ 4431.938482] moal: Unknown symbol __cfg80211_alloc_event_skb (err -2)
[ 4431.944932] moal: Unknown symbol cfg80211_put_bss (err -2)
[ 4431.950424] moal: Unknown symbol cfg80211_roamed (err -2)
[ 4431.955821] moal: Unknown symbol cfg80211_ch_switch_notify (err -2)
[ 4431.962104] moal: Unknown symbol ieee80211_get_channel_khz (err -2)
[ 4431.968370] moal: Unknown symbol __cfg80211_radar_event (err -2)
[ 4431.974379] moal: Unknown symbol cfg80211_tdls_oper_request (err -2)
[ 4431.980738] moal: Unknown symbol cfg80211_find_elem_match (err -2)
[ 4431.986918] moal: Unknown symbol __cfg80211_send_event_skb (err -2)
[ 4431.993296] moal: Unknown symbol cfg80211_michael_mic_failure (err -2)
[ 4431.999836] moal: Unknown symbol wiphy_apply_custom_regulatory (err -2)
[ 4432.006624] moal: Unknown symbol cfg80211_del_sta_sinfo (err -2)
[ 4432.012659] moal: Unknown symbol wiphy_unregister (err -2)
[ 4432.018200] moal: Unknown symbol cfg80211_get_bss (err -2)
[ 4432.023718] moal: Unknown symbol ieee80211_freq_khz_to_channel (err -2)
[ 4432.030332] moal: Unknown symbol cfg80211_pmksa_candidate_notify (err -2)
[ 4432.037116] moal: Unknown symbol cfg80211_vendor_cmd_reply (err -2)
[ 4432.043448] moal: Unknown symbol cfg80211_unregister_wdev (err -2)
[ 4432.049632] moal: Unknown symbol cfg80211_rx_mgmt_ext (err -2)
[ 4432.055502] moal: Unknown symbol ieee80211_channel_to_freq_khz (err -2)
[ 4432.062123] moal: Unknown symbol ieee80211_hdrlen (err -2)
[ 4432.067627] moal: Unknown symbol cfg80211_report_wowlan_wakeup (err -2)
[ 4432.074238] moal: Unknown symbol cfg80211_ft_event (err -2)
[ 4432.079832] moal: Unknown symbol cfg80211_inform_bss_data (err -2)
[ 4432.086038] moal: Unknown symbol ieee80211_bss_get_elem (err -2)
[ 4432.092052] moal: Unknown symbol cfg80211_connect_done (err -2)
[ 4432.097968] moal: Unknown symbol cfg80211_unlink_bss (err -2)
[ 4432.103715] moal: Unknown symbol wiphy_free (err -2)
[ 4432.108704] moal: Unknown symbol cfg80211_cqm_rssi_notify (err -2)
[ 4432.114901] moal: Unknown symbol cfg80211_auth_timeout (err -2)
insmod: ERROR: could not insert module moal.ko: Unknown symbol in module

  • Hi Kousik,

    Whenever you work on kernel and it modules, you need to compile all of them and install them to the rootfs. That means you need to rebuild kernel image, modules, and out-of-tree modules (are mlan and moal out-of-tree modules?). Otherwise, you would get such "unknown symbol" errors.

  • Hello Bin Liu,

    Thanks for your immediate response. Yes mlan and moal are out-of-tree modules which i have cross compiled separately using the SDK toolchain.  I could only find the following command for SD card.

    sudo make ARCH=arm64 INSTALL_MOD_PATH=/media/rootfs modules_install 

    Could you guide me how do i install the modules in rootfs (eMMC) ?

  • Hi Kousik,

    sudo make ARCH=arm64 INSTALL_MOD_PATH=/media/rootfs modules_install 

    You SD card is mounted to /media/rootfs/, right?

    Before this command, please run the following to command to compile kernel modules.

    make ARCH=arm64 CROSS_COMPILE=aarch64-oe-linux- modules

  • No, I wanted to copy it to eMMC. Currently the board is booting from eMMC. How to copy the compiled modules to eMMC storage? 

  • Firstly you need to ensure all the kernel components (kernel Image, dtbs, modules, off-tree wifi module drivers) are compiled against to the same kernel source tree;

    Secondly depending on how you initially populated the rootfs to eMMC, you would need to repeat the same procedure to update all the kernel binaries to eMMC.

  • Good day. Thanks for offering to help.

    For initial testing i have used the default rootfs image (tisdk-default-image-am62xx-evm.tar.xz) provided in the installed SDK under folder filesystem/. I have extracted the above tar image into /dev/mmcblk0p1 partition of the eMMC. 

    I have cross compiled the kernel image, modified dtbs, modules and also off-tree module against the same kernel source. 

    Now how do it package all together into a single rootfs image (tar file),  that can be copied to eMMC?   Any reference to the same is appreciated. 

  • Hi Kousik,

    I have cross compiled the kernel image, modified dtbs, modules and also off-tree module against the same kernel source. 

    Then run command 'make modules_install INSTALL_MOD_PATH=<a_tmp_dir>', this command copies all the kernel modules to the <a_tmp_dir> folder and updates the module data.

    I have extracted the above tar image into /dev/mmcblk0p1 partition of the eMMC. 

    By doing this, you must have had booted the board from other boot interface (SD card?). Then now you would have to do the same, copy the <a_tmp_dir> to somewhere in the rootfs of the alternative boot interface, boot the board from the alternative boot interface, then mount /dev/mmcblk0p1. Next:

    - copy the kernel Image to the 'boot/' folder of the eMMC;

    - copy <a_tmp_dir> in the rootfs to '/' folder of the eMMC;

    - copy your off-tree module to the eMMC.

    Now you can boot the board from eMMC.

  • Thanks. That solved my issue!