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:
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?
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
You could add version suffix “tegra” during building kernel image.
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.
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):
scm_version()
{
local short
short=false
**return**
If you look closer you will find this appends from a file “.scmversion”. You could alternately remove that file.