Follow-up: Exact source_sync.sh tag / build workflow for PL2303 module on R36.4.7

Hi,

My system details are:

  • Jetson Orin Nano Super
  • JetPack 6.2
  • Jetson Linux R36.4.7
  • Kernel: 5.15.148-tegra

I confirmed that:

  • CONFIG_USB_SERIAL_PL2303 is not enabled in the running kernel.
  • I extracted public_sources.tbz2 and successfully built drivers/usb/serial/pl2303.ko.
  • However, the generated module has:
vermagic: 5.15.148 SMP preempt mod_unload modversions aarch64

while the running kernel expects:

5.15.148-tegra

I also noticed that building from the extracted source tree reports that Module.symvers is missing during modpost, even though the installed kernel build tree (/lib/modules/5.15.148-tegra/build) contains a valid Module.symvers.

My goal is not to rebuild or flash the kernel. I only want to enable:

CONFIG_USB_SERIAL_PL2303=m

and build/install only pl2303.ko for the existing kernel.

Could you please advise:

  1. What is the correct source_sync.sh release tag for Jetson Linux R36.4.7 (kernel 5.15.148-tegra)?
  2. What is the NVIDIA-recommended workflow to build only the in-tree pl2303 module so that it matches the installed kernel (5.15.148-tegra)?
  3. Is there a supported method to build this single module against the installed kernel build tree without rebuilding or reflashing the entire kernel?

Thank you.

Hi,

For Jetson Linux R36.4.7, the matching source tag is:

cd <install-path>/Linux_for_Tegra/source
./source_sync.sh -k -t jetson_36.4.7

The source at this tag is kernel 5.15.148. However, the raw source tree is not the same as the prepared build tree for the installed kernel. The R36.4.7 nvidia-l4t-kernel-headers package provides the matching .config, Module.symvers, and 5.15.148-tegra kernel release metadata.

Before building, please confirm that the installed kernel and header packages are both from R36.4.7:

uname -r
dpkg-query -W nvidia-l4t-kernel nvidia-l4t-kernel-headers
cat /lib/modules/$(uname -r)/build/include/config/kernel.release

The first and third commands should report 5.15.148-tegra, and both NVIDIA packages should report an R36.4.7 version.

To build only pl2303.ko natively on the Jetson, use the installed build tree as the kbuild base and the tagged source directory as the module source:

cd <install-path>/Linux_for_Tegra/source/kernel/kernel-jammy-src

make -C /lib/modules/$(uname -r)/build \
    M="$PWD/drivers/usb/serial" \
    CONFIG_USB_SERIAL_PL2303=m \
    pl2303.ko

modinfo -F vermagic drivers/usb/serial/pl2303.ko

The resulting vermagic should begin with 5.15.148-tegra and include the running kernel’s module flags.

If the vermagic matches, install and load the module with:

sudo install -D -m 0644 \
    drivers/usb/serial/pl2303.ko \
    /lib/modules/$(uname -r)/extra/pl2303.ko
sudo depmod -a
sudo modprobe pl2303

Recommendation: build against /lib/modules/$(uname -r)/build rather than directly in the unpacked source tree. This uses the exact prepared configuration and symbol versions from the installed R36.4.7 kernel. It does not replace the kernel Image and does not require reflashing.

The Jetson Linux Developer Guide documents source synchronization and the complete in-tree kernel/module build workflow:

The single-module command above uses the standard Linux kbuild external-module interface:

Hope this helps!