Is there an uncomplicated method to support USB to Serial adapters using a PL-2303 chipset?

Since your version is 5.15.148-tegra, then keep in mind that for any kernel build, if you use the same source code release and same base configuration, then you would be able to build a module which loads correctly on that running kernel. The configuration consists of any integrated feature (“=y” in a configuration), and CONFIG_LOCALVERSION is also considered. If those parts of a build do not match, then you can expect problems loading modules you’ve built separately. Restated, if you start with the original kernel configuration which is currently running, including setting “CONFIG_LOCALVERSION” to “-tegra” (which is what “uname -r” output was for determining), then you can add a module (such as “CONFIG_USB_SERIAL_PL2303”) and that module should work in the existing kernel without need to install everything. That’s basically a simple file copy to the right location.

For kernels prior to the one in L4T R36.x a default config of “make tegra_defconfig” is the start point; for your kernel in R36.x a default config is “make defconfig” (these are kernel make arguments); one would then use something like “make nconfig” or “make menuconfig” to change the symbol CONFIG_LOCALVERSION to “-tegra”, and add “CONFIG_USB_SERIAL_PL2303=m”. Or you could copy and decompress “/proc/config.gz” and use that as the starting config (which works even if you are not using the default config). Lots of ways to do this, just ask which method you want to use.

Download the sources for that L4T release, get all of the kernel related sources within that group of sources (it is a tar archive within a tar archive, and there may be more than one kernel source whereby one is the public main source, and other out of tree source could be in a separate package). You can build natively since your NVMe has a lot of spare space, but do not install with any make install type of command. Or cross compile on your host PC.

More specifically, to extract just the kernel packages:

  • To see kernel packages:
    tar -jtvf ./public_sources.tbz2 | grep kernel
  • To extract a specific source within the sources (example for Linux_for_Tegra/source/kernel_src.tbz2):
    tar xjf public_sources.tbz2 Linux_for_Tegra/source/kernel_src.tbz2
  • Then extract kernel_src.tbz2:
    tar xvf public_sources.tbz2
  • You might be extracting others as well, e.g., Linux_for_Tegra/source/kernel_oot_modules_src.tbz2. Each will unpack into a “Linux_for_Tegra/source/...” subdirectory. The flash software (if you are compiling on the host PC and not on the Jetson) is actually all in a “~/nvidia/nvidia_sdk/JetPack...version.../Linux_for_Tegra/” subdirectory, and so if you extract with Linux_for_Tegra/ as a child directory, then the content will “just be in the right place” for any documented cross compile information. You won’t care about this if you build directly on your Jetson; you’ll still end up extracting yet more files from “Linux_for_Tegra/sources/” (do this for any “kernel” file that isn’t a sha1sum):
    • tar xvf kernel_src.tbz2
      (it is yet another tar archive within an archive)
    • You now have “Linux_for_Tegra/source/kernel/kernel-jammy-src/”, and this is where most work will be from.

More specifically for actual build configuration (after configuration actual build changes depending on where you compile from: natively on the Jetson versus PC cross compile). Assuming you have all of the build requirements in place, then this sets default configuration (there may be variations depending on build platform, so this is just a summary…add in this thread if you want to compile from Jetson versus from PC to get proper details, this is just to get an idea of steps):

  • make defconfig (if you were using L4T R35.x or earlier it would be tegra_defconfig)
  • make nconfig, search for symbol (F8 searches when using nconfig build target) “CONFIG_LOCALVERSION” or “LOCALVERSION”, which shows it is in “General Setup”, then hit the enter key for () Local version - append to kernel release, and set it to “-tegra”.
  • Now search for symbol CONFIG_USB_SERIAL_PL2303. You will find it here (IMPORTANT: The manufacturer of this serial UART is Prolific; the name within this configuration to look for is “USB Prolific 2303 Single Port Serial Driver”:
      -> Device Drivers
        -> USB support (USB_SUPPORT [=y])
          -> USB Serial Converter support (USB_SERIAL [=m])
  • Use the “m” key to enable this as a module.
  • Configuration is now complete if Save. There will be a .config file generated, you can keep this somewhere safe, maybe rename the copy to “config-5.15.148-tegra-pl2303”. Depending on where you plan to compile this file can simply be dropped in place and used as your config without going through all of the above steps. If you do this once it is actually far more simple than this explanation, and having the config already makes it even simpler.

Where will you compile from, native or cross compile?