IMX519 driver installation fails on Jetson Xavier NX 16GB with Arducam kernel package

Hi everyone, I’m trying to get the IMX519 drivers installed on my Jetson Xavier NX 16GB but the install keeps dying. I’m running the arducam-nvidia-l4t-kernel package, version 5.10.120-tegra-35.4.1-20230807055858, and it fails during the post-installation script when it’s trying to install the dtoverlays. The package setup just errors out. Any ideas what’s going wrong?

Can you paste the full output from the dpkg install step? The postinst script is failing, but the full traceback will show exactly where it’s dying. Also, which Python are you running and what’s your L4T version? Just want to match the environment to the package.

Sure. Python here is 3.8 (the one under /usr/lib/python3.8). Here’s the output when I run the install:

Unpacking arducam-nvidia-l4t-kernel (5.10.120-tegra-35.4.1-20230807055858) over (5.10.120-tegra-35.4.1-20230807055858) ...
Setting up arducam-nvidia-l4t-kernel (5.10.120-tegra-35.4.1-20230807055858) ...

Traceback (most recent call last):
  File "/opt/arducam/jetson-io/config-by-hardware.py", line 125, in <module>
    main()
  File "/opt/arducam/jetson-io/config-by-hardware.py", line 121, in main
    generate_dtb(jetson, dtbos)
  File "/opt/arducam/jetson-io/config-by-hardware.py", line 44, in generate_dtb
    fn = jetson.create_dtb_for_headers(dtbos)
  File "/opt/arducam/jetson-io/Jetson/board.py", line 389, in create_dtb_for_headers
    shutil.copyfile(dtb, os.path.join(self.appdir, dtb[1:]))
  File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/boot/arducam/dts/kernel_tegra194-p3668-0001-p3509-0000-user-custom.dtb'

An unknown error occurred while installing dtoverlays.
dpkg: error processing package arducam-nvidia-l4t-kernel (--install):
 installed arducam-nvidia-l4t-kernel package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
 arducam-nvidia-l4t-kernel

Thanks, that’s the key part. The traceback shows the postinst script calls /opt/arducam/jetson-io/config-by-hardware.py, which goes main() → generate_dtb() → create_dtb_for_headers(). Inside board.py at line 389 it’s doing a shutil.copyfile() and the source file doesn’t exist:

FileNotFoundError: [Errno 2] No such file or directory: ‘/boot/arducam/dts/kernel_tegra194-p3668-0001-p3509-0000-user-custom.dtb’

So it’s not a Python error per se — the script expects a compiled device tree blob to already be present in /boot/arducam/dts and it isn’t. Because of that, dpkg reports exit status 255 and leaves the package in a broken state.

Can you run ls -l /boot/arducam/dts/ and post what’s actually in there?

I checked and the user-custom.dtb file definitely isn’t there. The /boot/arducam/dts directory exists, but kernel_tegra194-p3668-0001-p3509-0000-user-custom.dtb is missing. This is a fairly fresh JetPack image, but I did have an earlier copy of the same arducam package installed before — the log says it was “unpacked over” the same version. I’m not sure how that .dtb is supposed to get generated.

That matches the error. The postinst step assumes the compiled dtb for your board already exists in /boot/arducam/dts, then tries to copy it over. If it was never generated, shutil.copyfile() fails exactly like this.

The fact that dpkg says “Unpacking … over (same version)” just means you’re reinstalling the same package version on top of itself — the unpack stage is fine, but the postinst still fails because that dtb is absent. Have you built or flashed a custom dtb/kernel on this unit, or is it a stock JetPack image with the arducam package added?

It’s stock JetPack as far as I know, other than the arducam package. I haven’t manually compiled any dtb. The earlier install of the same package also errored the same way, so it looks like that user-custom.dtb was never created in the first place. What would generate it normally?

Normally that dtb should be produced/generated as part of the arducam kernel setup, but on your unit the file was never created, so the postinst copy step fails and dpkg records the error (exit status 255). That leaves the package unpacked but not configured.

At this point I don’t have a final fix yet — I’ve sent you a private message asking for a few clear photos of the board so we can confirm the hardware/carrier board revision, which should help us work out whether the correct dtb can be generated for your setup. For now, the install remains blocked on the missing /boot/arducam/dts/kernel_tegra194-p3668-0001-p3509-0000-user-custom.dtb file.