alliedvision / linux_nvidia_jetson

Allied Vision CSI-2 camera driver for NVIDIA Jetson Systems.
104 stars 41 forks source link

./deploy stage failure - jetson xavier NX developer kit #7

Open Benzez opened 4 years ago

Benzez commented 4 years ago

During stage 8 I'm getting to following issue:

[ 4.6720 ] tegrahost_v2 --chip 0x19 0 --blocksize 512 --magicid MEMB --addsigheader_multi /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_1.bct /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_2.bct /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_3.bct /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_4.bct [ 4.6724 ] adding BCH for /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_1.bct [ 4.6743 ] [ 4.6749 ] tegrahost_v2 --chip 0x19 --align mem_coldboot.bct [ 4.6754 ] [ 4.6760 ] tegrahost_v2 --chip 0x19 0 --magicid MEMB --appendsigheader mem_coldboot.bct zerosbk [ 4.6765 ] Header already present for mem_coldboot.bct [ 4.6767 ] [ 4.6774 ] tegrasign_v2 --key None --list mem_coldboot_sigheader.bct_list.xml [ 4.6779 ] Assuming zero filled SBK key [ 4.6782 ] [ 4.6789 ] tegrahost_v2 --chip 0x19 0 --updatesigheader mem_coldboot_sigheader.bct.encrypt mem_coldboot_sigheader.bct.hash zerosbk [ 4.6797 ] [ 4.6798 ] Generating recovery mem-bct [ 4.6803 ] tegrabct_v2 --chip 0x19 0 --sdram /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1.cfg --membct /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_1.bct /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_2.bct /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_3.bct /home/baseline/Downloads/linux_nvidia_jetson/work_dir/Linux_for_Tegra/bootloader/16022/tmpfdjryT1_4.bct [ 4.6808 ] Packing sdram param for instance[0] [ 4.7111 ] Packing sdram param for instance[1] [ 4.7112 ] Packing sdram param for instance[2] [ 4.7114 ] Packing sdram param for instance[3] [ 4.7115 ] Packing sdram param for instance[4] [ 4.7115 ] Packing sdram param for instance[5] [ 4.7115 ] Packing sdram param for instance[6] [ 4.7115 ] Packing sdram param for instance[7] [ 4.7115 ] Packing sdram param for instance[8] [ 4.7115 ] Packing sdram param for instance[9] [ 4.7115 ] Packing sdram param for instance[10] [ 4.7115 ] Packing sdram param for instance[11] [ 4.7115 ] Packing sdram param for instance[12] [ 4.7115 ] Packing sdram param for instance[13] [ 4.7115 ] Packing sdram param for instance[14] [ 4.7115 ] Packing sdram param for instance[15] [ 4.7115 ] [ 4.7122 ] tegrahost_v2 --chip 0x19 --align mem_rcm.bct [ 4.7128 ] [ 4.7134 ] tegrahost_v2 --chip 0x19 0 --magicid MEMB --appendsigheader mem_rcm.bct zerosbk [ 4.7139 ] adding BCH for mem_rcm.bct [ 4.7148 ] [ 4.7155 ] tegrasign_v2 --key None --list mem_rcm_sigheader.bct_list.xml [ 4.7161 ] Assuming zero filled SBK key [ 4.7162 ] [ 4.7170 ] tegrahost_v2 --chip 0x19 0 --updatesigheader mem_rcm_sigheader.bct.encrypt mem_rcm_sigheader.bct.hash zerosbk [ 4.7180 ] [ 4.7181 ] Sending BCTs [ 4.7186 ] tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt --download bct_mem mem_rcm_sigheader.bct.encrypt [ 4.7191 ] Applet version 01.00.0000 [ 4.9404 ] Sending bct_bootrom [ 4.9405 ] [................................................] 100% [ 4.9416 ] Sending bct_mb1 [ 4.9466 ] [................................................] 100% [ 4.9501 ] Sending bct_mem [ 5.0130 ] [................................................] 100% [ 5.1472 ] Error: Return value 8 Command tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt --download bct_mem mem_rcm_sigheader.bct.encrypt Failed to flash/read t186ref.

real 0m16.107s user 0m4.080s sys 0m2.071s

[d]...Could not flash files to ... Failed...

Jakob1-5 commented 3 years ago

I'm having the exact same issue... Have you figured it out?

The first couple of lines of output when I run the script are as follows:

cat: /home/jakob/Alvium/Binaries_NVidia_Jetson_L4T_32.2.1_1a850e1/kerneltree/kernel/kernel-4.9/include/config/kernel.release: No such file or directory
>> [i]...Running script for flashing Linux4Tegra setup...
>> [d]...dedicated for L4T: 32.2.1 and Jetson ...
>> [i]...Device tree blob will be flashed to target board...

Is it the same for you?

Edit: I tried building from source instead of using the precompiled binaries. That solved/removed the first output line, but the flash still fails

BernardoLuck commented 3 years ago

Hello @Jakob1-5, from your description I see that you are trying the version L4T 32.2.1 from the master branch instead of the branch "nx-beta-release", which is has the correct L4T 32.4.2

I have noticed that when you run apt-get upgrade and after that you install driver, then the driver will not work. I recommend not to run apt-get upgrade, until the issue has been solved.

Jakob1-5 commented 3 years ago

Thanks @BernardoLuck, I didn't notice that I was on the wrong branch.

The flash still fails, this time with a new error code: Error: Return value 13 (instead of 8)

Below is the beginning of the output when I run the script. It says it will flash a TX2 board, but later correctly identifies the board.

>> [i]...Running script for flashing Linux4Tegra setup...
>> [d]...dedicated for L4T: 32.4.2 and Jetson ...
>> [i]...Device tree blob will be flashed to TX2 board...
[sudo] password for jakob: 
###############################################################################
# L4T BSP Information:
# R32 , REVISION: 4.2
###############################################################################
# Target Board Information:
# Name: jetson-xavier-nx-devkit, Board Family: t186ref, SoC: Tegra 194, 
# OpMode: production, Boot Authentication: NS, 
###############################################################################

On the board I checked /etc/nv_tegra_release and it says that the version is 32.4.3, even though above it says 32.4.2

Otherwise the console output does not give any clear messages about what is wrong

Edit: The part about the TX2 board is hard-coded in the script, so it was a red herring

BernardoLuck commented 3 years ago

Did you reflashed your NX with the Jetpack 4.4? This contains the version 32.4.2. If you used the Nvidia SDK,. then it will try to install the latest Jetpack, which contains the L4T 32.4.3 and not L4T 32.4.2. You need to select the correct version from the Nvidia SDK, then the driver will work.

Jakob1-5 commented 3 years ago

Ahh.... I had flashed with L4T 32.4.3. Thanks for pointing that out. "JetPack 4.4" and "JetPack 4.4 Developer Preview" contain different versions of L4T (look here)

I also noticed that the ./deploy.sh stage (steps 6 to 9) can be skipped on the NX. From step 5 in README: Nano and Xavier NX users: Reboot the board. Now you can use the driver.

The drivers appear to be installed properly now.

Jakob1-5 commented 3 years ago

Never mind. Now I have the same issue as here.

I didn't mention it in my previous comment, but running the install script on the NX board broke the OS (the board got stuck during boot). I'm not sure if this is a reproducible error, and I'm not keen on finding out because I had to flash the board again. My workaround was to do all the copy operations that the install script does on my host computer. That way, when I flashed the board, it should (in theory) include the Alvium drivers.

Everything seems fine, except that the camera isn't listed as a device (same problem as in the referenced issue).

BernardoLuck commented 3 years ago

Hi Jakob, here it is important that you do not run the script "apt-get upgrade", if you do it, the driver stops working and the OS may brake. Our R&D is working on this and should have a solution very soon.

Jakob1-5 commented 3 years ago

I was careful not to run apt-get upgrade, and I expect to be prompted if the OS tries to do it for me.

The OS broke again after a reboot, so my workaround probably wasn't that clever. Do you have an ETA on when the fix might be ready?

BernardoLuck commented 3 years ago

Hi, there is still not ETA. But we have identify the elements that need to be hold. Here's the list of the packages that need to be marked as "hold" in apt (apt-mark hold):

libdrm-tegra0 nvidia-l4t-bootloader nvidia-l4t-kernel nvidia-l4t-kernel-dtbs xserver-common xserver-xephyr xserver-xorg-core

01shf commented 1 year ago

ERROR: might be timeout in USB write. Error: Return value 3 Command tegrarcm_v2 --instance 1-10.1 --chip 0x23 0 --pollbl --download bct_mem mem_rcm_sigheader.bct.encrypt --download blob blob.bin Hi,I have some questions I would like to consult about. What could be the reason for constantly receiving this error? I have already tried several different USB cables, but it still doesn't work.

01shf commented 1 year ago

The issue occurs during the system backup process for the Jetson Orin NX.