Collected errors while installing driver ipk

I’m trying to install this driver for a Wi-Fi and bluetooth adapter on my Apalis-iMX6. I added the layer to my image build directory, built the recipe using bitbake rtl8723bu, and transferred two IPKs to the module.
Once there I use the package manager to install:

opkg install kernel-module-8723bu-4.9.166-2.8.6+gd899927_1.0-git-r0_apalis_imx6.ipk
opkg install rtl8723bu_1.0-git-r0_apalis_imx6.ipk

And the response I get is the following:

Installing rtl8723bu (1.0-git) on root
Configuring rtl8723bu.
Configuring alsa-state.
No state is present for card imx6qapalissgtl
Found hardware: "imx6q-apalis-sg" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card imx6qapalissgtl
No state is present for card imxspdif
Found hardware: "imx-spdif" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card imxspdif
No state is present for card imxhdmisoc
Found hardware: "imx-hdmi-soc" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card imxhdmisoc
Collected errors:
 * pkg_run_script: package "alsa-state" postinst script returned status 99.
 * opkg_configure: alsa-state.postinst returned 99.

After this, the module recognizes the device but it is not working yet. The boot sequence shows this:

[    6.388569] 8723bu: disagrees about version of symbol cfg80211_remain_on_channel_expired
[    6.388582] 8723bu: Unknown symbol cfg80211_remain_on_channel_expired (err -22)
[    6.389096] 8723bu: disagrees about version of symbol cfg80211_michael_mic_failure
[    6.389102] 8723bu: Unknown symbol cfg80211_michael_mic_failure (err -22)
[    6.389138] 8723bu: disagrees about version of symbol cfg80211_mgmt_tx_status
[    6.389143] 8723bu: Unknown symbol cfg80211_mgmt_tx_status (err -22)
[    6.389156] 8723bu: disagrees about version of symbol cfg80211_ready_on_channel
[    6.389160] 8723bu: Unknown symbol cfg80211_ready_on_channel (err -22)
[    6.389200] 8723bu: Unknown symbol __ieee80211_get_channel (err 0)
[    6.389230] 8723bu: disagrees about version of symbol cfg80211_inform_bss_frame_data
[    6.389234] 8723bu: Unknown symbol cfg80211_inform_bss_frame_data (err -22)
[    6.389246] 8723bu: disagrees about version of symbol cfg80211_put_bss
[    6.389250] 8723bu: Unknown symbol cfg80211_put_bss (err -22)
[    6.389262] 8723bu: disagrees about version of symbol cfg80211_get_bss
[    6.389265] 8723bu: Unknown symbol cfg80211_get_bss (err -22)
[    6.389277] 8723bu: disagrees about version of symbol cfg80211_ibss_joined
[    6.389281] 8723bu: Unknown symbol cfg80211_ibss_joined (err -22)
[    6.389293] 8723bu: disagrees about version of symbol cfg80211_roamed
[    6.389297] 8723bu: Unknown symbol cfg80211_roamed (err -22)
[    6.389315] 8723bu: Unknown symbol cfg80211_connect_bss (err 0)
[    6.389328] 8723bu: disagrees about version of symbol cfg80211_disconnected
[    6.389332] 8723bu: Unknown symbol cfg80211_disconnected (err -22)
[    6.389344] 8723bu: disagrees about version of symbol cfg80211_scan_done
[    6.389348] 8723bu: Unknown symbol cfg80211_scan_done (err -22)
[    6.389359] 8723bu: disagrees about version of symbol cfg80211_unlink_bss
[    6.389363] 8723bu: Unknown symbol cfg80211_unlink_bss (err -22)
[    6.389374] 8723bu: disagrees about version of symbol cfg80211_new_sta
[    6.389377] 8723bu: Unknown symbol cfg80211_new_sta (err -22)
[    6.389388] 8723bu: disagrees about version of symbol cfg80211_del_sta_sinfo
[    6.389392] 8723bu: Unknown symbol cfg80211_del_sta_sinfo (err -22)
[    6.389403] 8723bu: disagrees about version of symbol cfg80211_rx_mgmt
[    6.389407] 8723bu: Unknown symbol cfg80211_rx_mgmt (err -22)
[    6.389421] 8723bu: disagrees about version of symbol wiphy_new_nm
[    6.389424] 8723bu: Unknown symbol wiphy_new_nm (err -22)
[    6.389435] 8723bu: disagrees about version of symbol wiphy_register
[    6.389438] 8723bu: Unknown symbol wiphy_register (err -22)
[    6.389448] 8723bu: disagrees about version of symbol wiphy_unregister
[    6.389452] 8723bu: Unknown symbol wiphy_unregister (err -22)
[    6.389462] 8723bu: disagrees about version of symbol wiphy_free
[    6.389466] 8723bu: Unknown symbol wiphy_free (err -22)
[    6.389476] 8723bu: disagrees about version of symbol wiphy_apply_custom_regulatory
[    6.389480] 8723bu: Unknown symbol wiphy_apply_custom_regulatory (err -22)
[    6.394959] Bluetooth: hci0: RTL: rtl: examining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver=8723
[    6.394959] 
[    6.395981] Bluetooth: hci0: RTL: rom_version status=0 version=1
[    6.395981] 
[    6.395996] Bluetooth: hci0: RTL: rtl: loading rtl_bt/rtl8723b_fw.bin
[    6.395996] 
[    6.447292] Bluetooth: hci0: RTL: rtl: loading rtl_bt/rtl8723b_config.bin
[    6.447292] 
[    6.447454] bluetooth hci0: Falling back to user helper

I have searched for this error online and I haven’t been able to find a solution or a reference of what could be wrong

Hi @AlexPG

I tried the same thing on the LXDE image and the installation of the driver worked fine.

I cannot test, if this works, since I don’t have the device you are using.

In general, you should backport this driver to kernel as explained here and check if the driver work before doing a openembedded build.

Best regards,
Jaski

Hi @AlexPG ,

8723bu: Unknown symbol cfg80211_remain_on_channel_expired (err -22)

Something is not right with kernel configuration. Perhaps CONFIG_CFG80211=y or =m is missing.

hi @Edward
This are the cfg80211 lines of my .conf

CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_CRDA_SUPPORT=y
# CONFIG_CFG80211_WEXT is not set

Should I enable any of those? I’m fairly new at configuring linux kernel

Hi, Could you check the output of lsmod?
If CFG80211 is not present, then try to load it by typing insmod cfg80211.

Perhaps CONFIG_CFG80211_WEXT=y is required as well, at least I have it set and 8723bu is working.

To configure kernel try

make menuconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

from kernel sources root, where you see .config file. You may try editing .config to enable CONFIG_CFG80211_WEXT=y. Once you exit from config make sure CONFIG_CFG80211_WEXT is still set enabled. If it’s not then this is one of settings which can be enabled only if used by at least one driver from kernel tree. So either find and enable driver which uses this setting or try integrating 8723bu sources to kernel tree. I don’t remember which driver from kernel tree helped enabling required settings, after making driver working I integrated driver sources to kernel tree.

To avoid bitbake you may build kernel zImage

make zImage ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

make modules

make modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

install modules to specified folder

make modules_install  INSTALL_MOD_PATH=__path_to_modules__ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

It is present on lsmod but in the Used by column says 0

Hey thanks for the answer,

In this documentation about kernel compilation it is written that for the apalis iMX6 I should be using uImage instead of zImage. See this line:

make -j3 uImage LOADADDR=10008000 2>&1 | tee build.log
make imx6q-apalis-eval.dtb

What is the difference?

Using uImage as it says in the uboot that is reading the uImage:

Apalis iMX6 # run update_kernel 
reading apalis_imx6/zImage
5410560 bytes read in 279 ms (18.5 MiB/s)
writing zImage
5410560 bytes written

The changes on the kernel are obviously not being applied and I was wondering if I should use make zImage instead or if I should try to configure uboot to read uImage instead?

How should I do this?

Hi @AlexPG

In this documentation about kernel compilation it is written that for the apalis iMX6 I should be using uImage instead of zImage. See this line

A while ago, we change the kernel from uImage to zImage. So you should build zImage. We will correct the Documentation. We are sorry about the inconvenience.

Instead of updating the kernel from uboot, you can also mount the two partitions of eMMC Flash of Apalis iMX6 using the command: ums 0 mmc 0. Note, you also need to do a connection between the OTG Port of Ixora and your host.

Best regards,
Jaski

zImage works fine, I’ve been able to update the kernel and add the respective modules. But there is one small problem, the build and source files of the new modules directory are a symlink to the kernel source directory. ls -la /lib/modules/4.9.166/

lrwxrwxrwx    1 root     root            37 Sep 18 07:24 build -> /home/alex.pujol/kernel/linux-toradex
lrwxrwxrwx    1 root     root            37 Sep 18 07:24 source -> /home/alex.pujol/kernel/linux-toradex

is this due to an error I made in the building process? or is it normal?

Perfect that it works.

Regarding symlinks. Yes, this is an Error. Usually you don’t need the sources and build folders flashed on the SoM. Have you tried this to deploy the modules?

Best regards,
Jaski