What is nvgpu.ko file?

Hello,

I have two questions about nvgpu.ko file

First, According to the build kernel of kernel customization in the Jetson Linux Developer Guide, it is guided to replace nvgpu.ko. What changes if I replace it?

link : Kernel Customization — Jetson Linux Developer Guide documentation

Is it similar in function to installing the L4T 32.7.x version of the module on the rootfs after building, as demonstrated in the following command?

$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install
INSTALL_MOD_PATH=/Linux_for_Tegra/rootfs/

Second, Why is there a significant difference in size between the nvgpu.ko file generated after running apply_binary.sh on the sample rootfs provided by Jetson Linux 35.4.1 and the nvgpu.ko file generated after building the default kernel source?

For your first question, yes, it is similar thing as what you did on rel-32.7.x. You can forget about just nvgpu.ko and install all of the ko files.

For your 2nd issue, it has answer in rel-32 document too. The built out file didn’t get strip.

1 Like

Thank you very much for your kind reply.

I understand the second question.
But in the first question, I didn’t understand for sure because I lacked knowledge.
Could you tell me exactly what file “nvgpu.ko” is?

It is just one of the ko file built out from nvidia driver source code. Rel-32 install every ko files (including nvgpu.ko) to the rootfs. Rel-35 only gives simplified steps.

Kernel has form as kernel image and kernel modules (.ko files). Ko files are also part of the kernel drivers.

1 Like

Thank you !
I’m really sorry, but let me check one last time, the nvgpu.ko file contains all the drivers from the kernel build, not the module type driver for gpu, right?

If not, is there a separate command to install all drivers from kernel build like Rel-32?
$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install
INSTALL_MOD_PATH=/Linux_for_Tegra/rootfs/

Of course it does not include all the driver. It is just one file from one source code.

$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=/Linux_for_Tegra/rootfs/

this shall still work.

1 Like

I thought it wouldn’t work because only the Real Time kernel was written in the manual. Thank you very much for your answers.

1 Like

That’s because building real-time kernel changes the kernel suffix, which would definitely cause kernel modules to fail to load because the version/name does not match. Otherwise, you usually don’t need to replace/re-install kernel modules after re-building kernel images if the kernel suffix is the same.

2 Likes

You might find this of use:
https://forums.developer.nvidia.com/t/topic/262647/12

Note that the RT kernel is a modification of the existing kernel, and so this counts as needing both the base kernel Image and the modules to all need install, preferably with a new CONFIG_LOCALVERSION.

1 Like

I’m thankful to each and every one of you for your support. Based on what you’ve all shared, I will give it a try.

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