OVERLAYS mechanism cannot be used to dynamically add the camera's dtbo on JP6.0

As mentioned in this link,I successfully added the camera’s dtbo dynamically under the Jetpack 6.0 system by adding the FDT and OVERLAYS fields in the /boot/extlinux/extlinux.conf file.

However, when I tried the same method on AGX Orin, I encountered failure.

FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0000-nv.dtb
OVERLAYS /boot/tegra234-p3737-camera-mycamera-overlay.dtbo

There are no hints now that would allow me to debug further. Is there any way to carry out troubleshooting of the problem?

@JerryChang

hello xumm_td,

just double check your steps To Create and Apply a DTB Overlay File.
since Orin NX/Nano series they’re using different device tree with AGX Orin.

Of course I know this.

To verify my idea, I made a small modification to the source code provided by the official tegra234-p3737-camera-e3333-overlay.dts and attempted to modify /boot/extlinux/extlinux.conf by adding the following two lines:

FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0000-nv.dtb
OVERLAYS /boot/tegra234-p3737-camera-e3333-overlay.dtbo

Specifically, my modification is as follows:
Changed

sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9548@77/i2c@0/ov5693_a@36";

to

sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9548@77/i2c@0/ov5693_aaa@36";

If the OVERLAYS mechanism is effective, I should see changes in the sysfs. However, there are no changes at all.

Therefore, I am seeking your help. How can I confirm that the OVERLAYS mechanism is effective on AGX Orin@JP6.0? Are there any better debugging methods or tools available?

hello xumm_td,

did you confirm you’re choosing correct boot options for loading those FDT/OVERLAYS entries?
you may also sharing your extlinux.conf for reference.

anyways,
we could confirm it’s worked normally on AGX Orin since we’ve using Jetson-IO to toggle CSI connector as following.
for instance,

LABEL JetsonIO
        MENU LABEL Custom Header Config: <CSI Jetson Camera Dual-IMX274>
        ...
        FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0005-nv.dtb
        OVERLAYS /boot/tegra234-p3737-camera-dual-imx274-overlay.dtbo

extlinux.zip (748 Bytes)

Please check attachment.

@JerryChang

I did not use any of my own code but attempted to enable the e3333 camera using the jetson-io mechanism. The /boot/extlinux/extlinux.conf file is as follows:

$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT JetsonIO

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} root=PARTUUID=261d21c9-15e9-4998-8423-5fdb14dc5ea3 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config 

LABEL JetsonIO
        MENU LABEL Custom Header Config: <CSI Jetson Camera E3333 module>
        LINUX /boot/Image
        FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0000-nv.dtb
        INITRD /boot/initrd
        APPEND ${cbootargs} root=PARTUUID=261d21c9-15e9-4998-8423-5fdb14dc5ea3 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
        OVERLAYS /boot/tegra234-p3737-camera-e3333-overlay.dtbo

According to the tegra234-p3737-camera-e3333-overlay.dts source code, a series of configurations related to ov5693 are enabled. However, this is not the case in reality.

$ cat /sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9548@77/i2c@0/ov5693_a@36/status 
disabled

I connected to the debug serial port of the AGX Orin and saw the following information, which lacks the messages indicating loading the dtb and dtbo from the rootfs.

L4TLauncher: Attempting Direct Boot
L4T boot options
0: primary kernel
1: Custom Header Config: <CSI Jetson Camera E3333 module>
Press 0-1 to boot selection within 3.0 seconds.
Press any other key to boot default (Option: 1)
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services...

In this case, how do I confirm that OVERLAYS setting is in effect?

I am at my wit’s end. Please help me, thank you!

hello xumm_td,

do you have e3333 camera module mounted for testing?
re-cap from [Release Notes (r36.3)].

This line causes the following tasks to completed:
● If a specific camera board is found when the kernel boots, the override data is
applied to that camera board’s tree nodes.
● The tree nodes are made available for the system to use.

hello xumm_td,

according to UEFI code snippet as following.

STATIC
EFI_STATUS
ProcessOverlayDeviceTree (...)
..

  TargetName = fdt_getprop (FdtOverlay, 0, "overlay-name", &TargetLen);
  if ((TargetName != NULL) && (TargetLen != 0)) {
    DEBUG ((DEBUG_ERROR, "Processing \"%a\" DTB overlay\n", TargetName));
  }

you may enable debug flags for checking all dtbo files loaded by UEFI.
please see-also Home · NVIDIA/edk2-nvidia Wiki · GitHub to rebuilt UEFI.

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