Search by Tags

Kernel Driver Backports Integration

Applicable for

Compare with Revision

Subscribe for this article updates

For many off-the-shelf devices to work a suitable driver needs to be compiled into a custom Linux kernel. Not all such drivers are available in custom downstream Linux kernels in which case one can use the driver backports package including suitable drivers available from later Linux kernel versions.

Driver backports are available for the following subsystems:

  • Ethernet
  • Wireless
  • Bluetooth
  • NFC
  • ieee802154 (ZigBee & 6LoWPAN)
  • Media
  • Regulator

The L4T Linux kernel from NVIDIA is not based on top of a clean 3.1 kernel but rather some pre 3.2 version with further Android additions.

Not all the driver backports packages will work with that L4T kernel version. So far the driver backports package v3.11.8-1 has been tested with the L4T Linux kernel.

An Example to Show How to Cross-Compile the Backports Iwlwifi Drivers:

To enable support for iwlwifi a custom Linux kernel is required. Please refer to the following article concerning setup/compilation of the same:

Build U-Boot and Linux Kernel from Source Code

Before cross-compiling driver backports one needs to disable the drivers/dependencies enabled in the L4T Linux kernel to avoid conflicts. For cross-compiling iwlwifi one needs to disable the following configs in the L4T Linux kernel:

  • CONFIG_CFG80211

Then just compile and deploy the custom kernel as explained in above mentioned article.

Cross-Compiling Backports Iwlwifi Drivers

To avoid errors with EXPORT_SYMBOL_GPL while compiling driver backports change the KERNEL_VERSION to (3,1,0) in backports-include/linux/export.h:

$ export ARCH=arm
$ export CROSS_COMPILE=~/gcc-linaro/bin/arm-linux-gnueabihf-
$ export KLIB=~/build_iwlwifi
$ export KLIB_BUILD=~/linux-toradex

One can use nconfig/menuconfig to configure the driver backports package. Default configuration files are also available which can be used to build the drivers/subsystems. If to use this option just use the 'make defconf-option' in replacement for make menuconfig.

$ make defconfig-help
Driver or subsystem configuration targets:

For example to compile iwlwifi drivers:

$ make defconfig-iwlwifi
$ make -j4

The 'make install' target isn't currently sane for cross-builds. Comment out the scripts backport_firmware_install, update-initramfs etc from being run out of the Makefiles.

$ make install

Copy the compiled modules to target:

$ scp -r ~/build_iwlwifi/lib/modules/3.1.10-g54d69d3 root@


Most Wi-Fi hardware uses specific firmware to operate properly. Certain such firmware can easily be installed as follows:

# opkg update
# opkg --force-depends install linux-firmware

Intel 7260 mini-PCIe Wi-Fi module with backported iwlwifi driver on Apalis T30.

During boot one gets the following kernel messages:

[   13.801594] Loading modules backported from Linux version v3.11.8-0-g02709ef                                                                                      
[   13.849714] Backport generated by backports.git v3.11.8-1-0-gb22d1cd                                                                                              
[   14.638853] cfg80211: Calling CRDA to update world regulatory domain                                                                                              
[   15.068568] Intel(R) Wireless WiFi driver for Linux, in-tree:d                                                                                                    
[   15.076809] Copyright(c) 2003-2013 Intel Corporation                                                                                                              
[   15.171085] iwlwifi 0000:04:00.0: loaded firmware version op_mode iwlmvm                                                                                 
[   16.786565] iwlwifi 0000:04:00.0: Detected Intel(R) Wireless N 7260, REV=0x144                                                                                    
[   16.800739] iwlwifi 0000:04:00.0: L1 Disabled; Enabling L0S                                                                                                       
[   16.809894] iwlwifi 0000:04:00.0: L1 Disabled; Enabling L0S                                                                                                       
[   17.038502] Registered led device: phy0-led                                                                                                                       
[   18.410483] ADDRCONF(NETDEV_UP): enp7s0: link is not ready                                                                                                        
[   18.425138] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'                                                                                          
[   18.493031] iwlwifi 0000:04:00.0: L1 Disabled; Enabling L0S                                                                                                       
[   18.498950] iwlwifi 0000:04:00.0: L1 Disabled; Enabling L0S                                                                                                       
[   18.544093] ADDRCONF(NETDEV_UP): wlp4s0: link is not ready                             
root@apalis-t30:~# uname -a
Linux apalis-t30 3.1.10-g54d69d3 #23 SMP PREEMPT Wed Jun 10 17:46:46 IST 2015 armv7l GNU/Linux
root@apalis-t30:~# ls /lib/modules/3.1.10-g54d69d3/
modules.alias        modules.dep          modules.softdep      updates
modules.alias.bin    modules.dep.bin      modules.symbols
modules.builtin.bin  modules.devname      modules.symbols.bin
root@apalis-t30:~# lsmod
Module                  Size  Used by
iwlmvm                150786  0 
mac80211              477632  1 iwlmvm
iwlwifi               153573  1 iwlmvm
cfg80211              439297  3 iwlwifi,mac80211,iwlmvm
compat                 24552  4 cfg80211,iwlwifi,mac80211,iwlmvm