Compiled custom kernel from TX2 source doesn't have wifi


We setup the TX2 using JetPack 3.3 and it has working wifi (wlan0 connected to network).

Then, we compiled a custom kernel using TX2 R28.2.1 sources. Only additional v4l2 sensor drivers were included in this custom kernel. Compilation was done using the following commands:

export LDK_ROOTFS_DIR=<home>/Linux_for_Tegra/rootfs
export CROSS_COMPILE=<home>/install/bin/aarch64-unknown-linux-gnu-
export TEGRA_KERNEL_OUT=<home>/kernel_out
export ARCH=arm64
make mrproper
make O=$TEGRA_KERNEL_OUT tegra18_defconfig
make -B -j8 O=$TEGRA_KERNEL_OUT zImage
make -B -j1 O=$TEGRA_KERNEL_OUT dtbs

The compiled kernel and device tree are transferred to /Linux_for_Tegra/kernel/
The kernel image (Image) and compressed image (zImage) are both copied to /boot directory of TX2. Then, device tree is flashed using the command:

sudo ./ -r -k kernel-dtb jetson-tx2 mmcblk0p1

The v4l2 sensor works properly after flashing. However, wifi is no longer working. We only see a bridge connection automatically created (l4tbr0) and there is no wlan0.

Can anyone help us? How do we properly compile a custom kernel with enabled wifi/wlan0?

Thank you.


I guess this issue comes from the mismatch name of kernel version so that “lsmod” should have no bcmdhd driver.

If you compiled your own kernel image, you could check the kernel tag with command “uname -r”, and it should be 4.4.38.

However, original kernel version should be “4.4.38-tegra”. This difference would make modprobe to search different path of *.ko files.

That is, if you use your own kernel image, it would go searching /lib/module/4.4.38, which does not exist in rootfs at all.

You could firstly check my assumption by using “lsmod” and see if bcmdhd is there or not.
If there is no modules, please try below method

  1. You could add version suffix “tegra” during building kernel image.
  2. Or you could just follow the L4T document to build your own kernel modules as well. This time it would create /lib/module/4.4.38 and modprobe would able to load it automatically.

Hi WayneWWW,

Thanks for the help.

The “lsmod” command showed that there are no modules included.

I tried your suggestion to add version suffix “tegra” during kernel build. However, I get the following error when running menuconfig:

make O=$TEGRA_KERNEL_OUT menuconfig
make[1]: Entering directory '/home/hostpc/nvidia/tx2/kernel'
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/mconf.o
In file included from /home/hostpc/nvidia/source/kernel/kernel-4.4/scripts/kconfig/mconf.c:23:0:
/home/hostpc/nvidia/source/kernel/kernel-4.4/scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory
compilation terminated.
scripts/ recipe for target 'scripts/kconfig/mconf.o' failed
make[2]: *** [scripts/kconfig/mconf.o] Error 1
/home/hostpc/nvidia/source/kernel/kernel-4.4/Makefile:542: recipe for target 'menuconfig' failed
make[1]: *** [menuconfig] Error 2
make[1]: Leaving directory '/home/hostpc/nvidia/tx2/kernel'
Makefile:150: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

Is there any other way in setting the version suffix?

Does it work if you add CONFIG_LOCALVERSION="-tegra" inside defconfig?
Is it a clean build?

Hi WayneWWW,

I was able to run the menuconfig by installing libncurses5-dev.

I successfully flashed my custom kernel with wifi enabled using your first suggestion. I added -tegra as local version suffix.

Thanks for you help!

Should CONFIG_LOCALVERSION="-tegra" go in defconfig or tegra18_defconfig?

Hi blauder,

For TX2, it should go inside tegra18_defconfig.

When I do this I end up with the name 4.4.38-tegra+ instead of 4.4.38-tegra.
This creates 2 folders in my /lib/modules directory on the jetson.
It did fix my wifi which is nice but now I can’t modprobe anything.

How do I get rid of the plus to only have one kernel inside modules folder?


Basically you look in the kernel source “scripts/setlocalversion” file. Find the function “scm_version()”. Change it to force return with nothing done (insert this near the top will do the trick):

        local short

If you look closer you will find this appends from a file “.scmversion”. You could alternately remove that file.