Nvidia kernel module symbol not matching after ubuntu update

using L4T : R35.5.0

I made my custom camera driver (kernel module) using nvidia kernel module driver, and works correctly.

for development of vision processing, I need to update my Ubuntu system like using ‘apt upgrade’ command.

but, after upgrade (and install some packages), my custom camera driver was not inserted with this message.

[12061.491871] max9295_voc: disagrees about version of symbol of_match_device
[12061.492073] max9295_voc: Unknown symbol of_match_device (err -22)

as i know, this message was happend when it did’t matched the kernel version.
but, “uname -r” command shows it is same version.
~$ uname -r
5.10.192-tegra

anyway, I tried to change Kernel Image which i made with kernel module first.
but if i change the kernel Image , the system not boot completely. (stopping during boot). i think the ubuntu system kernel was updated, differ from cross-built result.

Secondly, i tried build my camera driver in my Xavier Ubuntu system,
but, camera driver is not exist on kernel src, it need to nvidia custom src,
It cannot be built like any other normal kernel module.

I just copy the kernel src to xavier & build driver on xavier, but this processing use it’s own src, the same problem was happened.

I think the linux kernel would be update later again, it is better to find the way that how to build nvidia camera driver on xavier with updated kernel src.
am I correct?

How can I solve this issue?

There’s no any problem for any others module only max9295, I would suspect it could be the max9295 driver’s problem.

I would tell more detaily.

I do NOT use nvidia SDK Manager.
I did download L4T BSP & filesystem & kerenl src.
I made BSP, filesystem, build the kernel by my self.
I flashed my BSP to Xavier.

~$ sudo ./flash.sh jetson-xavier mmcblk0p1

copy kernel module to Xavier

~$ scp Linux_for_Tegra/source/public/kernel_src/out/*.ko test@192.168.xxx.xxx:/home/test

and load my camera driver. and it was success.

~$ sudo insmod max9295_voc.ko
~$ sudo insmod max9296_voc.ko
~$ sudo insmod ap1302_voc.ko
~$ lsmod | grep max
max9296_voc            20480  1 ap1302_voc
max9295_voc            16384  1 ap1302_voc
max77620_thermal       16384  0

at this time, if I load nvidia’s camera driver, this is not modified driver,
then it was success also.

~$ sudo insmod nv_imx185.ko
~$ lsmod | grep nv
nv_imx185              24576  0

but if i update xavier’s ubuntu system, kernel also updated.
this kernel update list could checked like this

~$ sudo apt update
~$ apt list --upgradable | grep kernel
nvidia-l4t-display-kernel/stable 5.10.192-tegra-35.5.0-20240613202628 arm64 [upgradable from: 5.10.192-tegra-35.5.0-20240219203809]
nvidia-l4t-kernel-dtbs/stable 5.10.192-tegra-35.5.0-20240613202628 arm64 [upgradable from: 5.10.192-tegra-35.5.0-20240219203809]
nvidia-l4t-kernel-headers/stable 5.10.192-tegra-35.5.0-20240613202628 arm64 [upgradable from: 5.10.192-tegra-35.5.0-20240219203809]
nvidia-l4t-kernel/stable 5.10.192-tegra-35.5.0-20240613202628 arm64 [upgradable from: 5.10.192-tegra-35.5.0-20240219203809]

and if i did update the kernel,
those kernel modules which was built in my BSP environment, could not load.

not only my driver, but also nvidia’s official driver, like this

~$ sudo insmod nv_imx185.ko 
insmod: ERROR: could not insert module nv_imx185.ko: Invalid parameters
~$ sudo dmesg | tail
....
[   44.721096] nv_imx185: module verification failed: signature and/or required key missing - tainting kernel
[   44.721470] nv_imx185: disagrees about version of symbol of_match_device
[   44.721643] nv_imx185: Unknown symbol of_match_device (err -22)

I think this issue was caused by kernel does not matched in my BSP source.
But, your L4T did not supply updated kernel src.

I think if I build my kernel module on Xavier with update kerenl headers, it could be run.
(This is a common occurrence in the development of kernel modules)

but, kernel module for camera, this is use your camera subsystem source code,
this is not include linux kernel source.

I want to know how to make kernel module with nvidia camera subsystem source code on Xavier ubuntu system. (or guide to me some other solution)

Please check below document if anything lost.

https://docs.nvidia.com/jetson/archives/r35.5.0/DeveloperGuide/SD/Kernel/KernelCustomization.html

I got updated source code of kernel from nvidia git repo,
and made the kernel & driver on my PC.
it works. thanks.

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