With the new Linux for Tegra (LT4) 21.1 release, I needed a new driver for a Intel 7260 Wireless mini PCIe card. You can read about my initial installation of that hardware here: Installing Wireless Intel 7260 Adapter on NVIDIA Jetson TK1.
WARNING NOTE: The compiled driver is for LT4 21.1 ONLY. Installing the supplied drivers on a different LT4 setup (like LT4 21.2) system will bonk things up.
In the previous article, I was using a Jetson community LT4 release called ‘Grinch‘. Grinch has built in support for several different wireless adapters, one of which is the 7260. With the new release, I decided I would build my own 7260 driver, thinking “How hard could it be?”. That attitude quickly changed to “How could that be?”, but I’ll save that for another day.
Basically I built the Intel wireless drivers, placed them on Github jetsonhacks/install7260LT4211, and wrote a shell script to move everything around on installation so that the 7260 wireless works. The installation assumes a fresh LT4 21.1 install, and that the 7260 card is installed. Looky here:
Now, I’ll say upfront that this is some pretty hard core stuff. The Linux for Tegra (LT4) 21.1 release has associated source code for the kernel. Fortunately that kernel also has the source code for the 7260 drivers, so it was a matter of configuring the kernel and building the drivers.
Originally I thought that would be straightfoward. The name of the driver is referred to as ‘iwlwifi’, there are a few of different parts to it but basically it compiles into three different files:
iwlwifi.ko
iwldvm.ko
iwlmvm.ko
stored appropriately in the ‘iwlwifi’ folder. You also need the firmware for the 7260, which is:
iwlwifi-7260-7.ucode
An alternative approach is to get the firmware for the 7260 by executing:
$ sudo apt-get install linux-firmware
(and in fact this command will get firmware for other Intel hardware, as well as a slew of other hardware). However, I chose just to put it up in the repository for simplicity.
After I built the driver, and installed the firmware there were, let’s call them issues. There were two modules that I ended up needing to rebuild:
cfg80211
mac80211
This surprised me because I thought that both of these modules would be the result of compiling the kernel source independently. They weren’t; there were a couple of missing symbols that were not being exported causing the iwlwifi driver to lie over and play dead. So I included these two rebuilt wireless modules in the repository.
In order to get the 7260 to work, the GPIO pin 191 on the Jetson must be set on. You can do this by executing:
echo 191 > /sys/class/gpio/export;
echo out > /sys/class/gpio/gpio191/direction;
echo 1 > /sys/class/gpio/gpio191/value;
Because the kernel sets this value to off when it boots, you’ll need to set it immediately thereafter. That’s where the modified /etc/rc.local comes in. If you look at that file on Github, you’ll notice that GPIO 191 is set, and then the iwlwifi module is unloaded, and then loaded again.
The Grinch, being its own kernel, took the liberty of setting the pin high so it doesn’t need that code in /etc/rc.local.
Note here that the install script just overwrites /etc/rc.local.
Certainly you may want to have a more delicate hand in the install, please modify installDrivers.sh for your situation.
Notes
These modules and drivers are built against the 3.10.40-g8c4516e kernel, and will probably only work with that version.
If you don’t have ethernet access, you can go to another machine and download the zip file from the Jetsonhacks install7260LT421 repository and sneaker net it using a SD card or USB drive over to the Jetson.
You may be able to use other Intel wireless hardware with this driver. In order to do so, you will have to acquire the firmware for the device. This can be done using:
$ sudo apt-get install linux-firmware
Good luck!