airvolute / dcs-deploy

GNU General Public License v3.0
1 stars 0 forks source link

No devices to flash #17

Closed roby2014 closed 5 months ago

roby2014 commented 5 months ago
roberto@thonkpad [~/dcs-deploy] ± jp_512_20_configs ✓            [16:08:30]
> python3 dcs_deploy.py flash orin_nx 512 2.0 nvme full
identifier: ['flash', 'orin_nx', '512', '2.0', 'nvme', 'full']
prev_identifier: ['flash', 'orin_nx', '512', '2.0', 'nvme', 'full']
matched configuration: config_7
Resources for your config are already downloaded!
Binaries already prepared!. Skipping!
Images already generated! Skipping generating images!
--------------------------------------------------------------------------------
Flash images! ...
calling: sudo tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1  --network usb0 -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml --no-systemimg" airvolute-dcs2.0+p3767-0000 external
No devices to flash

Any idea what is causing this? I have a DCS1.Pilot v1.2 connected with my Orin. usb-c and power supply. branch: jp_512_20_configs

roby2014 commented 5 months ago

Also tried with this python3 dcs_deploy.py flash orin_nx 512 1.2 nvme full in branch orin_integration_test_12_brd:

*** no-flash flag enabled. Exiting now... *** 

User can run above saved command in factory environment without 
providing pkc and sbk keys to flash a device

Example:

    $ cd bootloader 
    $ sudo bash ./flashcmd.txt

Save initrd flashing command parameters to /home/roberto/.dcs_deploy/flash/orin_nx_nvme_1.2_512_full/Linux_for_Tegra/tools/kernel_flash/initrdflashparam.txt
/tmp/tmp.7kR84PdRJm /home/roberto/.dcs_deploy/flash/orin_nx_nvme_1.2_512_full/Linux_for_Tegra
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
/tmp/tmp.7kR84PdRJm/initrd /tmp/tmp.7kR84PdRJm /home/roberto/.dcs_deploy/flash/orin_nx_nvme_1.2_512_full/Linux_for_Tegra
58305 blocks
84895 blocks
/tmp/tmp.7kR84PdRJm /home/roberto/.dcs_deploy/flash/orin_nx_nvme_1.2_512_full/Linux_for_Tegra
flashimg0=boot0.img
/home/roberto/.dcs_deploy/flash/orin_nx_nvme_1.2_512_full/Linux_for_Tegra
Success
Cleaning up...
Finish generating flash package.
Put device in recovery mode, run with option --flash-only to flash device.
--------------------------------------------------------------------------------
Flash images! ...
calling: sudo tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1  --network usb0 -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml --no-systemimg" airvolute-dcs1.2+p3767-0000 external
No devices to flash
eMrazSVK commented 5 months ago

Hello, do you have force recovery pin connected to ground? And are you trying to connect the Jetson to PC with USB-C connector?

roby2014 commented 5 months ago

Yes. I also tried changing the USB to USB DEV on the board. Now i get a different error:

Entering RCM boot

[   0.0423 ] mb1_t234_prod_aligned_sigheader.bin.encrypt filename is from --mb1_bin
[   0.0423 ] psc_bl1_t234_prod_aligned_sigheader.bin.encrypt filename is from --psc_bl1_bin
[   0.0423 ] rcm boot with presigned binaries
[   0.0427 ] tegrarcm_v2 --instance 1-6 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
[   0.0431 ] BR_CID: 0x80012344705DD40A1800000019FF8200
[   0.0541 ] Sending bct_br
[   0.0641 ] ERROR: might be timeout in USB write.
Error: Return value 3
Command tegrarcm_v2 --instance 1-6 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
Cleaning up...
roby2014 commented 5 months ago

Hello, do you have force recovery pin connected to ground? And are you trying to connect the Jetson to PC with USB-C connector?

20240403_174502.jpg

![20240404_090021.jpg](https://github.com/airvolute/dcs-deploy/assets/47612455/c6a6b9b2-dda6-478a-ab0d-442ea1bef80c)

Old setup

roby2014 commented 5 months ago

20240404_090021.jpg

Setup now

roby2014 commented 5 months ago

lsbusb shows this tho:

Every 2,0s: lsusb                                                                                                                                                                                                                    
Bus 001 Device 006: ID 1bcf:0005 Sunplus Innovation Technology Inc. Optical Mouse
Bus 001 Device 113: ID 0955:7323 NVIDIA Corp. APX
roby2014 commented 5 months ago

I was able to flash with the 2 usb ports in and get in via HDMI. What is the user and password now? 20240404_093319.jpg

eMrazSVK commented 5 months ago

Hello I was just inspecting this and the error ERROR: might be timeout in USB write. is quite unusual.

I was able to flash with the 2 usb ports in and get in via HDMI.

What does this mean? You only need Micro (DEV) usb plugged in. Your lsusb output looks also correct.

roby2014 commented 5 months ago

Hello I was just inspecting this and the error ERROR: might be timeout in USB write. is quite unusual.

I was able to flash with the 2 usb ports in and get in via HDMI.

What does this mean? You only need Micro (DEV) usb plugged in. Your lsusb output looks also correct.

* How did you succeed to flash it in the end so this can serve for anyone that would come across the same issue?

* The default password after flash is `dronecore`.

IMO: This repository needs a loooooot of more documentation.

My next challenges: put a custom IP address so I can access via SSH

eMrazSVK commented 5 months ago

What would you recommend? Because in the end, the only documentation you needed was this one line - correct me if I am wrong:

python3 dcs_deploy.py flash orin_nx 512 1.2 nvme full

Everything else is not affected by this repository - putting the Jetson into Force recovery is standard NVIDIA approach, it's not custom to our board.

So, what kind of documentation would you expect?

Thank you for the info.

My next challenges: put a custom IP address so I can access via SSH

You can access via ssh with: ssh dcs_user@192.168.55.1. This is no different to Nvidia Jetson developer kits. You will not get custom IP via the Micro DEV USB, it is overridden by Nvidia. Nothing custom from us here.

roby2014 commented 5 months ago

Lots of branches. no ORIN documentation. How to setup the recovery PIN. ETC... Would turn things easier for a certain group of developers which don't have much experience

eMrazSVK commented 5 months ago

Thanks for the recommendations. I totally agree with unclear branches. We have this in our backlog (huge cleanup). I will try to update (or at least link our docs and this repo better) accordingly.

I hope the issue is no longer existing for you so I am closing it now. Feel free to open another one or re-open this one in case of need.

roby2014 commented 5 months ago

Having issues again with another carrier board...

lsusb:

Bus 001 Device 077: ID 0955:7020 NVIDIA Corp. L4T (Linux for Tegra) running on Tegra
roberto@thonkpad [~/dcs-deploy] ± jp_512_20_configs ✓                                                                                                                    [14:10:57]
> python3 dcs_deploy.py flash orin_nx 512 2.0 nvme full
identifier: ['flash', 'orin_nx', '512', '2.0', 'nvme', 'full']
prev_identifier: ['flash', 'orin_nx', '512', '2.0', 'nvme', 'full']
matched configuration: config_7
Resources for your config are already downloaded!
Binaries already prepared!. Skipping!
Images already generated! Skipping generating images!
--------------------------------------------------------------------------------
Flash images! ...
calling: sudo tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1  --network usb0 -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml --no-systemimg" airvolute-dcs2.0+p3767-0000 external
No devices to flash
roby2014 commented 5 months ago

Looks like powering off and on the power supply fixed... I don't understand why but 👍🏻