Installing the iwlwifi driver on a Jetson Nano Dev Kit

I had an extra Intel AC 9260 wireless module and decided it should be simple matter to plug it into my Jetson Nano Developer Kit to enable WiFi connectivity. A quick Net search shows others thought the same thing. We we're all wrong.

This post wouldn't be necessary if NVIDIA supplied a current kernel/image for the Jetson Nano Dev Kit. At worst, it should be as simple as grabbing the backport-iwlwifi code and doing the build/install as shown below. However, NVIDIA borked the kernel config used in their image so, before you do the following you will first have to build and install a custom kernel. Honestly, I would strongly suggest simply buying a different WiFi module that's known to be supported. However, if you enjoy a challenge, you can see my other post on Building a custom Jetson Nano kernel to enable module support

Once you've done that you can do the following on the dev kit to build and install this module to use the hardware.

Getting and building the module

On the dev kit, as the default user

cd ~
git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git
cd ~/backport-iwlwifi
make mrproper
make defconfig-iwlwifi-public
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config
make -j4

Installing the module

Note that we're using sudo to do the actual install.

tegra@localhost:~/backport-iwlwifi$ sudo make install
[sudo] password for tegra:
  Building modules, stage 2.
  MODPOST 6 modules
WARNING: "verify_pkcs7_signature" [/home/tegra/backport-iwlwifi/net/wireless/cfg80211.ko] undefined!
  INSTALL /home/tegra/backport-iwlwifi/compat/compat.ko
  INSTALL /home/tegra/backport-iwlwifi/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
  INSTALL /home/tegra/backport-iwlwifi/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko
  INSTALL /home/tegra/backport-iwlwifi/drivers/net/wireless/intel/iwlwifi/xvt/iwlxvt.ko
  INSTALL /home/tegra/backport-iwlwifi/net/mac80211/mac80211.ko
  INSTALL /home/tegra/backport-iwlwifi/net/wireless/cfg80211.ko
  DEPMOD  4.9.253-tegra
depmod will prefer updates/ over kernel/ -- OK!
Note:
You may or may not need to update your initramfs, you should if
any of the modules installed are part of your initramfs. To add
support for your distribution to do this automatically send a
patch against "update-initramfs.sh". If your distribution does not
require this send a patch with the '/usr/bin/lsb_release -i -s'
("Ubuntu") tag for your distribution to avoid this warning.

Your backported driver modules should be installed now.
Reboot.

tegra@localhost:~/backport-iwlwifi$ modprobe --show-depends iwlwifi
insmod /lib/modules/4.9.253-tegra/updates/compat/compat.ko
insmod /lib/modules/4.9.253-tegra/updates/net/wireless/cfg80211.ko
insmod /lib/modules/4.9.253-tegra/updates/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko

tegra@localhost:~/backport-iwlwifi$ sudo make install

At this point you can mange the network using the standard tools.