Driver issue on iMX7

Hi there,

I want to cross compile the driver for SparkLan WUBT-236ACN(BT) WLAN-Stick (GitHub - ulli-kroll/rtl8822bu: rtl8822bu/rtl8812bu driver for linux).

I cloned the Linuxkernel from git://git.toradex.com/linux-toradex.git
Checked out the branch toradex_4.9-2.3.x-imx (toradex_4.9-2.3.x-imx-next doesnt worked too).

I used this description (Configure Toolchain - Colibri iMX7) for configure my toolchain.

When I start to compile the driver with:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -i KSRC=~/toradex/linux-toradex/

the compilation works well. But when I try to load the driver with insmod on the Colibri then appears a lot errors like:
Unknown symbol __cfg80211_alloc_event_skb (err 0)
disagrees about version of symbol __netdev_alloc_skb

These errors should give me a clue, that the Kernelversions are not the same. Or is there another reason for these errors ?

My question is, what does do I generally wrong or when not so much, what branch from linux-toradex I should chekout ?

Thanks in advance.

As I unterstand, there

Hi @david_korm

These errors should give me a clue, that the Kernelversions are not the same. Or is there another reason for these errors ?

My question is, what does do I generally wrong or when not so much, what branch from linux-toradex I should chekout ?

Compiling kernel modules for a running system you need:

  • The exact same kernel-version (in your case 4.9.144 at commit 5758a8e648a3)
  • The exact same defconfig (copy from target /proc/config.gz)

Then you can alter the menuconfig, choose the desired driver and build/deploy it like described here:

https://developer.toradex.com/knowledge-base/build-u-boot-and-linux-kernel-from-source-code#kernel-module-deployment

Philippe