Installed IMX708 Driver, but No cameras available

I have two Raspberry Pi Camera Module 3s that I am attempting to connect to my Orin Nano via its CSI ports.

Previously saw a video claiming the RPv3 camera was based on the IMX477, but as we know it is actually an IMX708. Luckily the folks over at RidgeRun have code and decently well-documented instructions to build an IMX708 driver, which I completed with (almost) no issues.

Sadly, after the process seems to go smoothly, when I attempt any of the Example Pipelines at the bottom of that page, I get an error:

nano@orin-nano-1:~$ gst-launch-1.0 nvarguscamerasrc num-buffers=1 sensor_id=0 ! 'video/x-raw(memory:NVMM), width=4608, height=2592, framerate=14/1, format=NV12' ! nvjpegenc ! filesink location=RidgeRun_test.jpg
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:794 No cameras available
Redistribute latency...
Got EOS from element "pipeline0".
Execution ended after 0:00:00.016291065
Setting pipeline to NULL ...
Freeing pipeline ...

After reading over some related posts (here and here), I am not able to proceed but have collected a device tree and logs from the argus-daemon to see if that will help (attached).

extracted_proc_dts.txt (320.6 KB)
argus-output.log (3.3 KB)

The logs certainly do show an error of sorts, but I am not knowledgeable enough to make heads or tails of it:

OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 111)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 725)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 455)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 382)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 554)
---- imager: No override file found. ---- 

Any tips on things other troubleshooting steps to try would be appreciated. I have experimented with two cameras plugged in, as well as only one camera plugged in (cam0 slot) and the same result.

Final side remark: I also note that after installing the driver, the helper utility /opt/nvidia/jetson-io/jetson-io.py helper utility no longer works.

What’s the v4l2-ctl --list-devices and --list-formats-ext

The results of those two commands are as follows:

$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
	/dev/media0

Cannot open device /dev/video0, exiting.

$ v4l2-ctl --list-formats-ext
Cannot open device /dev/video0, exiting.

Shortly after posting I realized a major mistake on my first attempt: the RidgeRun tutorial is built specifically for Jetpack 6.0, whereas my Orin is and has always been Jetpack 6.2. To handle this I modified the procedure to use l4t/r36_release_v4.4 instead of l4t/r36_release_v3.0 which was used for sources inside of nvidia_sdk/JetPack_6.2.1_....

Applying the 6.0_orin_nano_imx708_v0.1.0.patch to this updated SDK required some minimal hand editing, with only one apparent conflict. The only other issue I observed was that there was no nvidia-oot/device-tree/platform/generic-dts/dtbs/ directory, so one of the manual copy commands did not work. Otherwise, the make and install of both kernel and modules succeeded, and the resulting modules were placed in an appropriate 5.15.148-tegra output directory before loading on the Orin Nano.

Notwithstanding, rebuilding the driver for JetPack 6.2, it seems I the camera is still not working, but now I have more revealing errors in my argus logs:

SCF: Error ResourceError: Unable to open BW Ioctl FD (in src/services/power/PowerServiceCore.cpp, function initialize(), line 125)

Attaching updated device tree and logs:
argus-output.log (1.5 KB)
extracted_proc.dts.log (312.4 KB)

Some additional observations after attempting this patch on Jetpack 6.2:

I noticed that the new device tree does not contain any mention of IMX708 or any IMX devices, unlike my first attempt.

I suspect it may have to do with two issues I encountered following the RidgeRun instructions which I had to do some guesswork to get around. Specifically, this command:

# JetPack 6.0
make -C kernel/kernel-jammy-src/ ARCH=arm64 O=$KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${CROSS_COMPILE_AARCH64} defconfig

which I believe references two incorrect environment variables. Both KERNEL_OUT and CROSS_COMPILE_AARCH64 are only defined in the JP 5.1.1 path. So when I ran it, I omitted the O argument and used CROSS_COMPILE instead:

make -C kernel/kernel-jammy-src/ ARCH=arm64 LOCALVERSION=-tegra CROSS_COMPILE=${CROSS_COMPILE} defconfig

This works, but it generates the .config file in the current directory, and am unsure that is the correct place for it. The rest of the process works great until:

make -C kernel
sudo -E make install -C kernel

# this runs without error, but the .../dtbs folder is not created:
make dtbs
# and this step fails outright since the folder does not exist
cp nvidia-oot/device-tree/platform/generic-dts/dtbs/* $DEVDIR/kernel/dtb/

make modules
sudo -E make modules_install

Either way, it’s apparent that my first attempt with mismatched Jetpack’s won’t do, and the second attempt has no IMX708 showing up in the device tree by the end of the process; though I feel it is very close.

If anyone has any advice on how the dtbs stage should work, and where the kernel config should be actually saved, I would be happy to learn!

Me again!

So, so after some additional reading on Kernel Customization for 36.4, I was able to spot the subtle changes needed to generate a build that appears to be “mostly working” – all except the camera itself.

I have made copious notes on the process and will share once I hopefully get these cameras working.

My device tree once again shows the IMX708, but now I get a completely different error when looking at the argus logs:

=== NVIDIA Libargus Camera Service (0.99.33)=== Listening=== gst-launch-1.0[2604]: Connection established (FFFF970EB840)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 111)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 725)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 455)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 382)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 554)

extracted_proc.dts.log (320.6 KB)