Kernel Compilation for supporting AR9462 wireless mini-PCIe card in L4T R21.4.0

Kernel Compilation for supporting AR9462 wireless mini-PCIe card in L4T R21.4.0

a) download the kernel source:
unpack to /usr/src

b) Install dependencies for menuconfig:
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install libncurses5-dev

c) Add the Atheros ATH9K modules:
sudo su -
cd /usr/src/kernel
zcat /proc/config.gz > .config
make menuconfig
(you can midify the kernel local version)
enable below options:

[x] Networking support --->
    -*- Wileless ---->
        <M> cfg80211 - wireless configuration API
        <M> Generic IEEE 802.11 Networking Stack (mac80211)
        [x] cfg80211 wireless extensions compatibility
Device Drivers
    [] Network device support --->
        [x] Wileless LAN --->
            <M> Atheros Wireless Cards --->
                (I select the Atheros 5xxx wireless cards support and Atheros 802.11n wireless cards support)

d) Compile the kernel:
check this thread:
thanks Santyago

e) Install the new kernel to TK1.
As Santyago said: sudo ./ -k 6 jetson-tk1 mmcblk0p1, but it does not work for me in L4T R21.4.0. The kernel version is unchanged (‘unamn -a’). I have to reflash all kernel and rootfs, and compile the modules in TK1 again. It works!
I donn’t know why? If someone know the solution, please tell me.

You can add your compiled kernel directly to the file system, in /boot/
If you have a running L4T version, here is how you can do:

  1. copy the new zImage in /boot/zImage_custom
  2. add a new entry to /boot/extlinux/extlinux.conf (just duplicate from LABEL to the end, change the LABEL, MENU LABEL and LINUX lines). You can also change the DEFAULT to point to your new entry.
  3. At boot, you will have a menu to choose the kernel you want to use

FYI, the “-k 6” parameter is for much older systems using fastboot. This should be left out when flashing a system that uses u-boot.

Yes I used the fastboot. Since when I used the u-boot mode to refresh the official image(L4T R21.4.0), the system fail to boot, the fan is running and the screen of monitor is black. I don’t know what’s wrong with the device. Is my device too old? Thanks!

All Jetsons support all existing L4T version R19.2 and up. Issues are usually related to permissions during unpack of sample rootfs or other install procedures (flash can be picky to small details).

First note is that unpack on the host used for flash should be done as root or with root authority (sudo). Second, you can simplify flash by just using the L4T flash directly (without JetPack). Remember, unpack L4T R21.4, unpack L4T sample rootfs, Then the flash via:

sudo -S 14580MiB jetson-tk1 mmcblk0p1

What was your actual flash command line?

And if you want to log flash for later posting:

sudo -S 14580MiB jetson-tk1 mmcblk0p1 2>&1 | tee log_flash.txt

NOTE: Even if flash succeeds video issues (unrelated to flash) might leave that black screen, e.g., you can’t use a 15-pin VGA adapter. Describe your video connection. If you can, use a NULL-modem cable and view the serial console (115200 8N1), this works even when video is missing.