Multiple CSI cameras on Tx2

Hi Folks

We need two CSI cameras for our Tx2 project. We purchased IMX274, based on our resolution/fps/FoV requirements, from Leopard.

Leopard Imaging, currently do not support concurrent operation of IMX274 on Tx2. I would like to check with TX2 community if there are other CSI camera options for Tx2 in market ? Concurrent camera operation of two cameras (each 1080p , 60 fps, 80 deg horizontal FoV) is important for us. As long as vendor provides Tx2 driver for concurrent operation of two cameras, we will be fine.

Thanks

Hi Nvidia Folks,
Could one of you please help ?
Thanks

@dumbogeorge
It’s better to get this information from the scaling partner.

Hi dumbogeorge,

We have the TX2 IMX274 driver for our own carrier board right now. You can download the driver patch from link below if needed. It can support 3 cameras.
We are working on the TX2 IMX274 driver on Nvidia EVA kit and will have it soon.
https://www.dropbox.com/s/sjqi5ke457skaia/IMX274_R28.1_TX2_CB_20170925.txt?dl=0

Hi Simon,
Thanks for your response. Would you happen to have an ETA for Nvidia EVA kit driver ? We need to plan our project accordingly.
Thanks,

Hi dumbogeorge,
We should be able to get the TX2 IMX274 driver ready in two weeks.

Hi dumbogeorge,
Please download the setup guide of the IMX274 TX2 driver for Nvidia EVA kit from link below.
https://www.dropbox.com/s/ii57a3cqj5dheo5/IMX274_R28.1_TX2_NV_20171018.txt?dl=0

Thanks Simon, for the new driver.

Folks, would anybody happen to know how to install a driver on ubuntu without having to reflash eMMC ? We have SD card on our Tx2, how easy would it be to install this driver on SD card ? Currently the driver requires you to reflash R28.1, for its own installation.

Any thoughts Linuxdev ?

Thanks,

If a driver is compiled as a module (and not all drivers can be modules, but most can be), then you can simply copy it as a file. Assuming the kernel was configured to match the running system (such as via “/proc/config.gz”), and that CONFIG_LOCALVERSION matches (usually “-tegra”), then “uname -r” would be something like “4.4.38-tegra”, and the module would be put somewhere in:

/lib/modules/$(uname -r)/kernel/drivers/...

…the subdirectory within this to use would be the same subdirectory where the kernel source has the driver under its “driver/” subdirectory.

If this must be added as an integrated feature you still need to match config and “uname -r” and CONFIG_LOCALVERSION with the current system, but then you can just add the kernel to “/boot/Image” (I’d suggest renaming this to preserve the original kernel, and adding a second boot entry to “/boot/extlinux/extlinux.conf”).

Whether it is module format or integrated feature, you could copy the file to the correct location via SD card or scp.

Hi Linuxdev,

I am following, instructions given by Leopard below (although they have not tested, installing the driver directly on SD card).

Do you see any issue with these steps ?

Thanks ,

  1. Copy Image, zImage to TX2 /boot, and copy tegra186-quill-p3310-1000-c03-00-base.dtb to TX2 /boot/dtb

  2. copy 4.4.38-tegra-leopard.tgz to TX2 /lib/modules

    sudo cp 4.4.38-tegra-leopard.tgz /lib/modules

    cd /lib/modules

    sudo tar zxvf 4.4.38-tegra-leopard.tgz

  3. Edit /boot/extlinux/extlinux.conf, add below content following “LINUX /boot/Image”:
    FDT /boot/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb

  4. reboot

zImage is a compressed version of Image (Image is used on TX1s and TX2s…zImage is used on TK1s). This form of compression is not supported with the U-Boot from L4T.

Should you use Image, this will replace your entire kernel…it needs to match the modules used, so you would have to install modules as well. This is what the modules step is probably doing. The question is what the base config change was which prompted an entirely new kernel.

The extlinux.conf edit of FDT no longer works if you are using a base R28.1 install. This is probably the install the update is based on since this matches a 4.4.38 kernel, and prior versions were all a 3.x series.

So I do not believe those steps will work, they are mixing older instructions with a newer release. The use of a zImage is common on 32-bit products, such as the TK1, so I’m wondering what those instructions were based on (and if they are out of date). Something seems odd with those instructions.

FDT is said to be no use on TX2, could that be the reason?

I do not know enough about all this. It will be big help if you could read the instructions give by Simon here

https://www.dropbox.com/s/ii57a3cqj5dheo5/IMX274_R28.1_TX2_NV_20171018.txt?dl=0

Here is relevant instructions from their readme, to install the driver. Leopard has never tested installation of driver without having to reflash R28.1 on eMMC. What would be great is if you could understand the components (Image, *.dtb) of their driver and tell me a way to put those components directly on SD card (/boot area) to get driver working.

------Setup the driver on TX2

1. Download the L4T R28.1 for TX2 from link below.
https://www.dropbox.com/sh/8p3kgws42csrulu/AADYMwGXYE2_qKjtPLVDawgta?dl=0

and follow below steps to flash the R28.1 image the TX2.

Set the TX2 to recovery mode

sudo tar xpf Tegra186_Linux_R28.1.0_aarch64.tbz2

cd Linux_for_Tegra/rootfs/

sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R28.1.0_aarch64.tbz2

cd ..

sudo ./apply_binaries.sh

Copy and replace the tegra186-quill-p3310-1000-c03-00-base.dtb under Linux_for_Tegra/kernel/dtb

sudo ./flash.sh jetson-tx2 mmcblk0p1

Note: You can also download the Jetpack 3.1 (which includes the L4T R28.1) from Nvidia website and install it to TX2 if needed.

2. After boot up, Copy Image, zImage to TX2 /boot.

3. copy 4.4.38-tegra-leopard.tgz to TX2 /lib/modules

   sudo cp 4.4.38-tegra-leopard.tgz /lib/modules

   cd /lib/modules

   sudo tar zxvf 4.4.38-tegra-leopard.tgz

4. Copy camera_overrides.isp to TX2 /var/nvidia/nvcam/settings (if there is

   sudo chmod 664 /var/nvidia/nvcam/settings/camera_overrides.isp

   sudo chown root:root /var/nvidia/nvcam/settings/camera_overrides.isp

5. Reboot the TX2

6. Open a terminal and do u1.0”. You can will get live video output.

Note: Please make sure there is a camera on J1.

Hi Linuxdev,

Could you please check if I can install the driver on SD card with some modifications of aforesaid instructions from Leopard ?

Thanks

Hi,

In case you want to boot from SD, these instructions should work for building the TX2 Kernel (they are made for 27.1 but they should work also for 28.1):

You have two options on the first step (Downloading the code) :

1- Use the 28.1 L4T sources from https://developer.nvidia.com/embedded/downloads . Create a set of patches with the relevant changes to support the driver , a few hints on how to create a patch here:
http://developer.ridgerun.com/wiki/index.php?title=Quilt_Patching_Hints
And then follow the steps to build and get it on the TX2.

2- If you already have the source code for the kernel with the relevant changes (the driver in question) Skip the first step and build the code you already have following the instructions.

If you end up using the steps in the tutorial, let me know any comments you might have or if something is not clear enough.

Regards,
JJ

FDT entry is no longer supported when you use R28.1. This information is instead flashed to a hidden partition. Using FDT for device tree update could invalidate the intended device tree.

Note that when it says to “make zImage”, you can instead “make Image”. The zImage target builds both zImage and Image, but only the Image is used on a TX2. It doesn’t hurt to build zImage, it just takes more time and disk space for something you won’t use.

This step is mentioned as needing to occur prior to flash, and this is critical:

Copy and replace the tegra186-quill-p3310-1000-c03-00-base.dtb under Linux_for_Tegra/kernel/dtb

Note that the flash command given flashes everything, not just the dtb, but it is possible to flash the dtb without overwriting everything else (you’d still need that dtb in place prior to running this command):

sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

If you have modified the kernel itself, then you would copy the Image file to “/boot”. I’d recommend giving it a name change so you can leave the original kernel in place, e.g., “Image-tegra-custom” (then add an alternate boot entry in extlinux.conf).

Note that when you build Image or zImage some configuration is added to the build tree, so even if you don’t need a new Image file you may still want to build Image prior to doing other steps, e.g., prior to “make dtbs”. The “.config” still needs to match your running system if you want anything built for that kernel to be compatible. I always try to remind people that even if the kernel config is from “/proc/config.gz” that the CONFIG_LOCALVERSION still has to match and needs to be set manually to the suffix of “uname -r” of the current system (e.g., if “uname -r” is “4.4.38-tegra”, then CONFIG_LOCALVERSION needs to be “-tegra”). If you have installed a new Image file, be sure to check that “uname -r” remains the same after using the new kernel, else kernel modules might not be found.

Thanks linuxdev and JJ for your repsponses.

I tried using each of your methods - got to good distance - started getting images from camera but they both seem to have corruptions in them (dark/black spots in different parts of image, or chroma corruption).

In interest of time I gave up - and tried to install driver all over gain using eMMC flashing instructions from Leopard. I was able to get corruption free images from camera this way, but driver still seem to have issues (which are probably bugs in driver and not installation issues). Just FYI, for other readers who are using IMX274 from Leopard). The driver wouldn’t work until you connect a camera to J3. Furthermore the driver currently does not seem to run two cameras concurrently.

Thanks

We have a new IMX274 driver for R28.1 TX2 on Nvidia EVA board. It will fix the argus software issue when only connect one or two cameras. Please download it below.
https://www.dropbox.com/s/pnuft1ptojjh9ed/IMX274_R28.1_TX2_NV_20171027.txt?dl=0

For this driver, the J3 camera is video0, so when you do nvgstcapture-1.0 command, please make sure there is a camera on J3.