Trouble Adding Missing Drivers to Jetson Orin NX 16GB (Kernel 5.15.136-tegra)

I flashed a Jetson Orin NX 16GB using Nvidia SDK Manager. The installation through JetPack 6.0 (rev. 1) provided Ubuntu 22.04 and Kernel 5.15.136-tegra.

However, the board doesn’t recognize some of the peripherals, which led me to inspect the drivers more closely. Some necessary drivers, like qmi_wwan, iwlwifi, and mt7601u, are absent in /lib/modules/5.15.136-tegra.

As an alternative, I decided to build the modules on my laptop, following the Nvidia Kernel Customization documentation (Kernel Customization — Jetson Linux Developer Guide documentation), ensuring to modify “make ARCH=arm64 O=$TEGRA_KERNEL_OUT menuconfig” to add the modules of interest. (1)

At “JetPack_6.0_Linux_JETSON_ORIN_NX_TARGETS” used previously to flash, there were no source files. Using “Jetson Linux 36.3”, the version of “kernel_src.tbz2” extracted from “public_sources.tbz2” at “/public_sources/Linux_for_Tegra/source_downloaded” was “kernel-jammy-src”, while previous versions (Jetson Linux Archive | NVIDIA Developer) led me to kernel-5.10. Thus, it seemed more appropriate to proceed with the 5.10 version. (2)

I built the modules on my laptop

$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$PWD/modules

and copied the “.ko” files to their respective folders at “/lib/modules/5.15.136-tegra” on the Orin board. Afterwards:

$ file qmi_wwan

> qmi_wwan.ko: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), BuildID[sha1]=87d899d5bc901656f250110bfff62e38ddad715e, with debug_info, not stripped

$ sudo depmod -a
$ sudo modprobe qmi_wwan

> modprobe: ERROR: could not insert 'qmi_wwan': Exec format error

This error suggests an incompatibility between the module and the current kernel version, what makes sense since 5.15 != 5.10.

  • Is this the proper solution, or is there a more straightforward way to install only specific modules?
  • Is it necessary to use source files described as 5.15.136-tegra or can I proceed with a more generic version (maybe a 5.15)? Where can I find those?

I’m a beginner, please pardon any obvious mistakes.

Thanks in advance.

I’m not sure how you came up with this solution, but of course you need to use 5.15, which is the kernel-jammy-src.
That Exec format error exactly means the kernel version between your module and kernel image is imcompatible.

It’s the 5.15.136 that really matters.
-tegra is just a suffix that we use on kernels for L4T, which can be configured with LOCALVERSION=tegra during building.

Thank you @DaveYYY for the prompt reply! Things worked out using “kernel-jammy-src” and “defconfig” adding “LOCALVERSION=-tegra”.
In case someone comes across the same issue, here’s how I proceeded:

On Ubuntu-Laptop

aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-ld --version

export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
export ARCH=arm64

tar -xjf public_sources.tbz2 -C ~/nvidia/kernel_sources
tar -xjf kernel_src.tbz2 -C ~/nvidia/kernel_sources

cd ~/nvidia/kernel_sources/kernel/kernel-jammy-src

--------------------
kernel-jammy-src/arch/arm64/configs$ ls
>  defconfig               
    tegra_prod_defconfig
    defconfig_debug.config  
    tegra_recovery_chain_defconfig
--------------------

make ARCH=arm64 LOCALVERSION=-tegra defconfig

make ARCH=arm64 LOCALVERSION=-tegra menuconfig
    <add modules>

make ARCH=arm64 LOCALVERSION=-tegra modules -j$(nproc)

make ARCH=arm64 LOCALVERSION=-tegra modules_install INSTALL_MOD_PATH=$PWD/modules

On Jetson Orin:

sudo depmod -a $(uname -r)
sudo modprobe <mod_name>
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.