Disagrees about version of symbol tegracam_v4l2subdev_register

Hi everyone,

I’m trying to build an external kernel module on a Jetson system running:

  • JetPack 6.1

  • L4T R36.4.0

  • Kernel: 5.15.148‑tegra

  • Custom carrier board (not an NVIDIA devkit)

Here is what I do:

  1. I download the official JetPack 6.1 kernel sources from NVIDIA

  2. I apply the patch provided by the carrier board vendor

  3. I do NOT patch the kernel sources , The board vendor provides patches that must be applied inside the rootfs/ folder
    (i.e., patches for the flashed image, not for the kernel source tree)

  4. I build my module

  5. When loading it on the target, I get symbol version mismatch errors like:

in board we have

image

if the host PC

Plain Text

cat   nv_tegra/nv_tegra_release 
# R36 (release), REVISION: 4.0, GCID: 37537400, BOARD: generic, EABI: aarch64, DATE: Fri Sep 13 04:30:11 UTC 2024
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

Plain Text

cat ./rootfs/etc/nv_tegra_release 
# R36 (release), REVISION: 4.0, GCID: 37537400, BOARD: generic, EABI: aarch64, DATE: Fri Sep 13 04:36:44 UTC 2024
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

the error is:

Plain Text

<module>.ko: disagrees about version of symbol tegracam_v4l2subdev_register
<module>.ko: Unknown symbol tegracam_v4l2subdev_register (err -22)

My questions:

  • What is the recommended way to build out‑of‑tree modules on JetPack 6.1 / L4T r36.4.0 to avoid tegracam_* symbol mismatch?cat nv_tegra/nv_tegra_release

    R36 (release), REVISION: 4.0, GCID: 37537400, BOARD: generic, EABI: aarch64, DATE: Fri Sep 13 04:30:11 UTC 2024

    KERNEL_VARIANT: oot

    TARGET_USERSPACE_LIB_DIR=nvidia
    TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

thank you

*** Please note that this reply is generated by LLM automatically ***

To build an external kernel module on a Jetson system running a non-NVIDIA devkit, you need to ensure that the kernel source tree and the kernel headers match the running kernel on the target system. Here’s a step-by-step guide to help you build out-of-tree modules and avoid symbol version mismatch errors:

Option 1: Prepare the Jetson Linux kernel headers on a non-Jetson system

  1. Download the kernel source tree from NVIDIA.
  2. Apply the patches provided by the board vendor for the flashed image.
  3. Build the kernel source tree to generate the kernel headers.
  4. Install the kernel headers on your non-Jetson system.
  5. Use the installed kernel headers to build your external kernel module.

Option 2: Use a manually built kernel source tree

  1. Download the kernel source tree from NVIDIA.
  2. Apply the patches provided by the board vendor for the flashed image.
  3. Build the kernel source tree to generate the kernel headers.
  4. Use the built kernel source tree to build your external kernel module.

Option 3: Prepare a kernel source tree that is not built

  1. Download the kernel source tree from NVIDIA.
  2. Apply the patches provided by the board vendor for the flashed image.
  3. Use the kernel source tree to build your external kernel module.

In all cases, make sure that the kernel source tree and the kernel headers match the running kernel on the target system.

Comparison of options

  • Option 1 is recommended if you want to build the kernel headers on a non-Jetson system. This option allows you to use the installed kernel headers to build your external kernel module.
  • Option 2 is recommended if you want to use a manually built kernel source tree. This option allows you to use the built kernel source tree to build your external kernel module.
  • Option 3 is not recommended as it may lead to symbol version mismatch errors.

Additional tips

  • Make sure that the kernel source tree and the kernel headers match the running kernel on the target system.
  • Use the make modules_prepare command to prepare the kernel source tree for building external kernel modules.
  • Use the make M=<module_dir> command to build your external kernel module.
  • Use the modinfo command to check the symbol version of your external kernel module.

By following these steps and tips, you should be able to build out-of-tree modules and avoid symbol version mismatch errors.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi,
Looks like you have to rebuild the ko file along with upstream kernel and NVIDIA OOT modules. Would suggest strictly follow the steps in
Kernel Customization — NVIDIA Jetson Linux Developer Guide

There is a known issue and please manually copy the files:
USB controller driver bug/issue in default rootfs and kernel customization - Jetpack 6.1 L4T 36.4.3 - #24 by DaneLLL

Here is a real practice:
No data from Joystick Logitech-f710 - #10 by DaneLLL

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