Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version with Clyde's IMX296 driver backported from 6.x kernels #2

Open
wants to merge 5 commits into
base: l4t-36.4.0/alpha
Choose a base branch
from

Conversation

amarburg
Copy link
Collaborator

No description provided.

@amarburg amarburg self-assigned this Oct 31, 2024
@amarburg
Copy link
Collaborator Author

This PR includes a half-baked attempt at an install script. It is not quite right, here's the desired outcome:

  1. On the build host:
make && make package

This creates a file install.tar.bz2 which contains:

install/install.sh
install/boot/....
install/lib/...
  1. Copy install.tar.bz2 to Jetson:
scp install.tar.bz2   jetson:~
  1. On Jetson, then:
tar xvf install.tar.bz2
cd install && ./install.sh

This will copy boot/* to /boot and lib/modules/..../updates to /lib/modules./.../updates/, chown-ed to root:root

As it stands in the MR, some of the pathing and install-ing isn't right.

Configuring extlinux.conf

Enabling the DTB overlay requires a manual step. In the file /boot/extlinux/exlinux.conf, copy the existing "default" entry, modify LABEL and MENU LABEL and add the respective FDT and OVERLAYS

Here is mine, at a minimum, you PARTUUID will be different

LABEL imx296
        MENU LABEL Custom Header Config: <Dual RP IMX296>
        LINUX /boot/Image
        FDT /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb
        INITRD /boot/initrd
        APPEND ${cbootargs} root=PARTUUID=be75d995-b892-49d6-81c5-1012d129b899 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
        OVERLAYS /boot/tegra234-p3767-camera-p3768-dual-rp-imx296.dtbo

Ensure the FDT and OVERLAYS files exist. The FDT is provided by Nvidia (not by us), but we are manually specifying it so bootloader will load it from the filesystem rather then using the version found in the a_dtb partition (it's confusing)./

At the top of the file change to DEFAULT imx296

On reboot, the bootloader should (briefly) present the option of either "Default" or "Imx296" kernels, with the latter as the default.

@clydemcqueen
Copy link
Collaborator

clydemcqueen commented Oct 31, 2024

Ah, this is super helpful! I did manage to get the dts compiling and loading by reading your script and so forth, but I missed the part about the FDT. Even with that omission, I was still able to reproduce your results:

clyde@orin:~$ sudo dmesg | grep imx296
[    8.713783] rp_imx296: module verification failed: signature and/or required key missing - tainting kernel
[    8.729619] imx296 9-001a: supply dvdd not found, using dummy regulator
[    8.729957] imx296 9-001a: supply ovdd not found, using dummy regulator
[    8.729988] imx296 9-001a: supply avdd not found, using dummy regulator
[    8.730027] imx296 9-001a: error -EBUSY: failed to get reset GPIO
[    8.741523] imx296: probe of 9-001a failed with error -16
[    8.741622] imx296 10-001a: supply dvdd not found, using dummy regulator
[    8.761381] imx296 10-001a: supply ovdd not found, using dummy regulator
[    8.761434] imx296 10-001a: supply avdd not found, using dummy regulator
[    8.761486] imx296 10-001a: error -EBUSY: failed to get reset GPIO
[    8.761628] imx296: probe of 10-001a failed with error -16

I poked around a bit to see how to fix the supply problems, though I am inclined to move carefully on that front.

I think I will add a README to the imx296 repo, then make it public.

Thanks!

@clydemcqueen
Copy link
Collaborator

I just ran through this again. A few things I noticed:

install.tar.bz2 does not include the install directory, so it takes a few more steps.

install.sh reports: install: omitting directory 'lib/modules/5.15.148-tegra/updates'. I copied the important files by hand.

I used the sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 2="CSI Camera RP_IMX296 Dual" method described in the README to update extlinux.conf. This seems to work. This is the 2nd entry, and it is the default:

LABEL JetsonIO
        MENU LABEL Custom Header Config: <CSI Camera RP_IMX296 Dual>
        LINUX /boot/Image
        FDT /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb
        INITRD /boot/initrd
        APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0
        OVERLAYS /boot/tegra234-p3767-camera-p3768-dual-rp-imx296.dtbo

I don't have an ssd. I do see that my cbootargs seems to be missing nv-auto-config.

@amarburg
Copy link
Collaborator Author

amarburg commented Nov 1, 2024

I inadvertently combined the install.sh functionality with Clyde's IMX module into a single commit. Implemented a more stable install.sh in the mainline "l4t-36.4.0/alpha" branch, and merged into this branch with a little conflict resolution.

Note to self, in future make install changes in "l4t-36.4.0/alpha".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants