Flash script hang at "Error opening sdcard-0"

I ported device driver and device tree files for Leopard Imaging IMX415 camera from L4T r32.4.3 to L4T r42.6.1. When flashing the full image to the device, the flash script stopped at “tegrarcm_v2 --isapplet” while the console output shows “Sending CMD_SD_SEND_IF_COND failed”. Both of the output from console and flash script will be uploaded.

Here is the information about my working environment and setups:
Host: Ubuntu 18.04
JetPack 4.6, L4T 32.6.1
Device: Xavier NX devkit

Any help is greatly appreciated.

–Stuart
flash-output (61.0 KB)
putty.log-02071709-failed (11.5 KB)

Hi,
We will check with Leopard and provide suggestion for porting the sensor.

@SimonZhu
Could you help on this topic.

Thanks

@stuart.xu

It looks that the issue occurs when you flash the original R32.6.1 OS image.
Which platform are you using? Is it the Nvidia official NX Developer kit or our NX carrier board?

It is the Nvidia official NX DevKit board.

Please use sdkmanager to update the system image to verify the probelm.

I updated the
console-log-0224 (753 Bytes)
JetPack to 4.6.1 and I still get the same error. Console log is attached.

Did you flash to external SD card? Could you have another SD card to try.

Yes, the board has a external SD card. I tried with other two different SD cards, the problem persists, But flashs with the official code (without the driver patch) are successful.

Hi,

Just to clarify, are you saying the “module” has sdcard slot or the “carrier board” has sdcard slot?

This is an official Nvidia Xavier NX devkit, NX module with a carrier board. The removable SD card is on the NX module. Thanks.

@stuart.xu
For the “driver patch” you mentioned, do you mean the driver patch from us? If so, please do not use that driver patch for Xavier NX Devkit since that patch is only for our own NX carrier board LI-XNX-CB-6CAM. Since our LI-IMX415-MIPI is not compatible with Xavier NX Devkit due to the incompatible MIPI connectors, we don’t have driver for this combination yet.

This is not a patch from Nvidia. It is from Leopard Imaging. They sent this driver to me for NX running with L4T r32.4.3. Since we use L4T r 32.6.1, that is why I ported it the new OS level. I think the driver is very much similar since the Linux kernel is the same version, 4.9. Since the problem is in the flashing part and I don’t think the issue is the device driver related, I think you guys at Nvidia could be able to help. Does the device tree change cause the problem, I really don’t know. I have very limited knowledge about the device tree.

@stuart.xu
I am not sure if you notice that SimonZhu who just replied you here is from Leopard Imaging…

Please follow his suggestion first since you are using their product/software patch.

Yes, I noticed that SimonZhu is from LI. But their SW support team keeps telling me that is working driver. I thought it should work by porting it to a new OS level. From the console log, can you see what is issue to cause the flash stop in the middle?

Hi,

Why you are not listening to Leopard’s comment here? They already told you this patch is not working with NX developer kit. Then you should use a compatible hardware first.

NVIDIA has no idea about what kind of patch you are using here.

If you really want me to help,

You can try to flash the whole board with our sdkmanager first. If sdkmanager can flash your board, then it means the hardware is still ok.

Then, apply the Leopard image one by one and see which change is causing the problem.

@stuart.xu
I think it’s better that you can try the driver on LI-XNX-CB-6CAM board first to narrow down the possible causes of the issue. If the camera works fine with the driver on LI-XNX-CB-6CAM, and you still would like to use the Devkit, you can try porting the driver for Devkit.

@WayneWWW and @SimonZhu , Thank you for your time and support. I am providing some history of the problem to make thing clear, hopefully.

  1. LI made an OEM Camerer for us based on IMX415 sensor. With the camera, LI delivered a driver patch file for me to run the camera on Xavier NX. The driver patch is based on L4T R32.4.3. ( LI did not mention which carrier board to use. )
  2. My NX devkit runs with L4T R32.6.1. I applied the patch to the source tree of L4T R32.6.1. ( I said “porting”, may not be accurate. ). Then compiled the source. When flashing, I hit this error. I feel this error is in the JetPack utility instead of in the driver. So I turn to you guys for help.
  3. The NX devkit and the SD card with it should have no problem since I can flash the Nvidia official image without error.

As for trying the drier on LI-XNX-CB-6CAM board, I don’t think this is an option for me because I don’t have that board. And I have no knowledge about the board either.
LI will deliver a new driver based on L4T R32.6.1 for NX devkit. I did this porting while waiting for the new driver because my project deadline is approaching. And this is also a learning experience for me. If this problem is out of your support scope because of it is not an officially released product, it is perfectly fine to me.

Again, I thank you for your time and your support.

I can only tell you that sometimes the patch will also cause flash problem. It is rare, but still happened.

Long time ago there was once a user also hits flash problem due to pinmux change. However, not same sdcard-0 error as your case.

If you want to find out what is going on, you can only change binaries one by one and see which one is causing the problem.

Do you know where the sdcard-0 is checked? I may start from the flash script.