Apalis T30, Custom Kernel and Backports

Hi,

I’m very much a linux n00b so please excuse my questions or general linux ignorance.

We have a custom baseboard based around the Ixora design and we are using an Apalis T30. I’ve recently taken over our custom linux kernel build from a former developer who has previously left the company and I’m fighting a battle to get the Wi-Fi backports working in our custom kernel.

I have had the Wi-Fi working however since yesterday, I cannot for the life of me figure out what is going wrong. Having followed the steps in both the “compiling kernel + uboot” and “kernel backport integration” with no success, I’m lost.

The platform is already configured to use the arm-angstrom-linux-gnueabi toolchain.

I’ve managed to successfully compile and deploy the backports to my deployment folder as follows:

export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
export KLIB=~/dev/build_iwlwifi
export KLIB_BUILD=~/dev/linux-toradex

make -j4
make install

I copy them across to the deployment folder:

sudo cp -r ~/dev/build_iwlwifi/lib/modules/ ~/dev/deploy/linux-v0.1/rootfs/lib/modules/wifi

The deploy them to the SD card ready for updating the kernel/rootfs as follows:

sudo ./update.sh -o /media/dev/BOOT_SD

Having updated the target during uboot:

run setupdate
run update

I find that when the new kernel runs, the Wi-Fi modules are not loaded. If I try to “insmod” the modules manually and in the correct order, when I get to the “iwlwifi” module, an error occurs:

*Failed to load module iwlmvm (error 256) - is dynamic loading enabled?*

Previously when this was working, all of the modules had loaded successfully and I was able to perform a “connmanctl scan wifi” and “connmanctl services” to bring up the available network SSID’s. Also, the RF_KILL feature seems to have disappeared.

To my knowledge, I have not changed the kernel .config file but to clarify regarding the Wi-Fi:

  • CONFIG_WLAN=n
  • CONFIG_CFG80211=n

Is this the correct set-up for the backports or should they be “m” to indicate modules?

Thanks in advance for any help!
Kind regards,
Kevin

Does the deployment folder for backports show the following?

ls build_iwlwifi/lib/modules/3.1.10-g838e10d/                                  
modules.alias      modules.builtin.bin  modules.dep.bin  modules.softdep  modules.symbols.bin
modules.alias.bin  modules.dep          modules.devname  modules.symbols  updates/

ls build_iwlwifi/lib/modules/3.1.10-g838e10d/updates/           
compat/  drivers/  net/

Did you really check the article here? The cp command seems odd. Why specify wifi under /lib/modules?

I chose to use scp as follows:

scp -r build_iwlwifi/lib/modules/3.1.10-g838e10d/ root@10.18.0.125:/lib/modules/

Can you check if your .config has CONFIG_MODULES=y? CONFIG_WLAN and CONFIG_CFG80211 should be disabled as mentioned in the article.

Hi Sanchayan,

Yes, the backports folder has those modules inside and I really really did check that article which you linked to - I’ve managed to get it working once having followed that article many times, yet I cannot now get it working.

I specified the “wifi” folder beneath “/lib/modules” otherwise they backport files would overwrite the existing files generated by the:

make -j3 modules
sudo -E make INSTALL_MOD_PATH=~/dev/deploy/linux-v0.1/rootfs/ modules_install

The above already puts in the various “modules.alias”, etc, files - surely I don’t want to overwrite them with the backports? Or is this the trick I’m missing??

I can confirm that:

CONFIG_MODULES=y
CONFIG_WLAN=n
CONFIG_CFG80211=n

Kind regards,
Kevin

Also, each time I rebuild the kernel - do I also need to rebuild the kernel modules + backports?

Kind regards,
Kevin

Have just tried another back-ports rebuild exactly as per the instructions - however I copied them to the ~/dev/deploy/linux-v0.1/rootfs/lib/modules/ folder rather than the wifi sub-folder.

The Wi-Fi is still not available when I update the entire target.

if I try again to manually “insmod” the modules, when I try:

cd /lib/modules/3.1.10-g34c5824-dirty/updates/net/wireless
insmod cfg80211.ko

The following error occurs:

cfg80211: exports duplicate symbol __ieee80211_get_channel (owned by kernel)
insmod: ERROR: could not insert module cfg80211.ko: Invalid module format

This is using the following export:

export CROSS_COMPILE=~/gcc-linaro/bin/arm-linux-gnueabihf-

Another build of the backports and now I’m presented with this error:

 insmod compat.ko
 insmod: ERROR: could not insert module compat.ko: Invalid parameters
 
 dmesg | tail
 
 compat: disagrees about version of symbol skb_put
 compat: unknown symbol skb_put (err -22)
 compat: disagrees about version of symbol __alloc_skb
 compat: unknown symbol __alloc_skb (err -22)

Please can someone help?

Ok, I’ve managed to get this working in a fashion having followed a slightly different backports tutorial from a different website. I believe the key is to disable ALL Wi-Fi support - not just the CONFIG_CFG80211 and CONFIG_WLAN options.

Having compiled the backports, I’m still unable to get the modules to load on boot but I have put together a simple startup bash script which brings these modules in. It works. I’m happy.