Missing linux header files

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.10.0
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
2.1.0
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Issue Description
Hello, I’m currently trying to make custom linux modules in order to ensure my device is fully operational.
The problem is that the tegra kernel is missing its headers and workarounds with copying or installing generic linux headers didnt lead to success.

I tried:

sudo apt-get install linux-headers-$(uname -r)

but I’ve got:

E: Unable to locate package linux-headers-5.10.120-rt70-tegra
E: Couldn't find any package by glob 'linux-headers-5.10.120-rt70-tegra
E: Couldn't find any package by regex 'linux-headers-5.10.120-rt70-tegra

Is there a way to either build a custom kernel with own modules OR to get the linux headers.
I understand that the ORIN AGX is using a custom kernel but there should be a solution how we can use make i guess.

Dear @deniz.braun,
Did you check Compiling the Kernel (Kernel 5.15) | NVIDIA Docs ?

Hello @SivaRamaKrishnaNV i received the jetson orin AGX in the meantime and was able to build the modules on the jetson so i thought it would be a viable option to port the headers to the DRIVE and try to make the modules but still receive an error: could not insert module invalid module format which indicates a kernel/header mismatch (the only difference between jetson and drive is the term “rt” but they share the same 5.10.120 tegra kernel.

I was running into some issues for recompiling the drive kernel on the host machine so i was trying to get around this but seems like i need to fix this…

Is this a wanted behaviour that we cannot make modules on the DRIVE? I understand you want to keep the kernel as small as possible but i dont get the idea of not including the headerfiles even after a new flash via the NVIDIA SDK

Hi, I successfully compiled the kernel but i cannot find any header files. Can you please help me?

Dear @deniz.braun,

By following the shared link you could compile kernel? Are looking for tegra kernel header files path on docker?

Hello @SivaRamaKrishnaNV

Yes i was able to compile the kernel with the shared link and the NVIDIA SDK Manager.
However, there are no header files included unlike with the NVIDIA Jetpack from Jetson.

Both are kernel versions 5.10.120 but DRIVE OS has rt-patches.
Now im looking into cross compiling the modules on my host machine with the kernel source and transfer them to the DRIVE ORIN.

Would it be also possible to flash the DRIVE ORIN without RT-patches? Im currently trying to figure out what is possible since i havent been able to compile the modules against the kernel source on my host machine.

Deniz