Help! stucked while executing 'sudo bash flashcmd.txt'

I am trying to download the signedimage.tbz2,while executing the command ‘sudo bash flashcmd.txt’ it stucked ,the following is the log:
wangbo@ubuntu:~/Desktop/tx1_secureboot/bootloader$ sudo bash flashcmd.txt
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands

[ 0.0057 ] Parsing partition layout
[ 0.0070 ] tegraparser --pt flash.xml.tmp
[ 0.0150 ]
[ 0.0151 ] Updating BFS information
[ 0.0162 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatebfsinfo flash.xml.bin
[ 0.0266 ]
[ 0.0268 ] Boot Rom communication
[ 0.0281 ] tegrarcm --chip 0x21 --rcm rcm_1_signed.rcm
[ 0.0293 ] BR_CID: 0x32101001642897c01000000002030300
[ 0.3782 ] Boot Rom communication completed
[ 1.4234 ]
[ 1.4239 ] Updating Odmdata
[ 1.4279 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatefields Odmdata = 0x84000
[ 1.4323 ] Warning: No sdram params
[ 1.4585 ]
[ 1.4585 ] Sending BCTs
[ 1.4609 ] tegrarcm --download bct P2180_A00_LP4_DSC_204Mhz.bct
[ 1.4660 ] Applet is not running on device. Continue with Bootloader
[ 1.6392 ]
[ 1.6393 ] Retrieving storage infomation
[ 1.6411 ] tegrarcm --oem platformdetails storage storage_info.bin
Does anyone know about this?
I am using a vmc ubuntu1404 64bits, i can download code by using jetpack.

By “vmc” are you saying “VNC” (or any virtual host)? If so, then this is the cause. VMs have issues with USB. Some people have got around this, but it isn’t officially supported. You may be interested in this:
[url]https://devtalk.nvidia.com/default/topic/1002081/jetson-tx2/jetpack-3-0-install-with-a-vm/[/url]

hi, linuxdev
I borrowed an ubuntu 1404 laptop. And here is the logs:
ubuntu@ubuntu-OrionStar:~/wangbo/bootloader$ sudo bash flashcmd.txt
[sudo] password for ubuntu:
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands

[ 0.0047 ] Parsing partition layout
[ 0.0057 ] tegraparser --pt flash.xml.tmp
[ 0.0067 ]
[ 0.0067 ] Updating BFS information
[ 0.0075 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatebfsinfo flash.xml.bin
[ 0.0084 ]
[ 0.0084 ] Boot Rom communication
[ 0.0092 ] tegrarcm --chip 0x21 --rcm rcm_1_signed.rcm
[ 0.0100 ] BR_CID: 0x32101001642897c01000000002030300
[ 0.0105 ] Boot Rom communication completed
[ 1.0286 ]
[ 1.0287 ] Updating Odmdata
[ 1.0318 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatefields Odmdata = 0x84000
[ 1.0343 ] Warning: No sdram params
[ 1.0349 ]
[ 1.0349 ] Sending BCTs
[ 1.0373 ] tegrarcm --download bct P2180_A00_LP4_DSC_204Mhz.bct
[ 1.0398 ] Applet is not running on device. Continue with Bootloader
[ 1.0500 ]
[ 1.0501 ] Retrieving storage infomation
[ 1.0527 ] tegrarcm --oem platformdetails storage storage_info.bin
[ 1.0552 ] Applet is not running on device. Continue with Bootloader
[ 1.0778 ]
[ 1.0807 ] tegradevflash --oem platformdetails storage storage_info.bin
[ 1.0831 ] Cboot is not running on device.
[ 1.0937 ]
Error: Return value 4
Command tegradevflash --oem platformdetails storage storage_info.bin
ubuntu@ubuntu-OrionStar:~/wangbo/bootloader$

There is an error here.

Are you trying to directly execute "bootloader/flashcmd.txt?? Or is this just from the flash.sh log?

FYI, I won’t be able to help with secure boot, I lack the knowledge.

I was following the sample in the document Jetson_Device_Secure_Boot_and_Fuse_Burning.pdf.
which is included in the package that can be download here :

with the name Jetson Platform Fuse Burning and Secure Boot Documentation and Tools .

I was testing the sample in page 13 ,named Example: Flashing Signed Images in a Factory Environment
use “sudo ./flash.sh --no-flash -x 0x21 -y PKC -u jetson-tx1 mmcblk0p1”
to generate the signed images.
using “sudo bash flashcmd.txt” to flesh them to the TX1 board.

hello wangbo,

may i know which JetPack release you’re using?
please also refer to this tutorial video: [url]Jetson Security and Secure Boot
thanks

hi JerryChang,
I am using SecureBoot Package for r24.2.1,and the L4T 24.2.1.
I have tried to flash the Tegra device with clear binaries, execute:
sudo ./flash.sh jetson-tx1 mmcblk0p1
but may be lacking of system.img ,the Tx1 board reboot over and over again.

so I download the newest Jetpack 3.1 and choose to install the 24.2.1 OS.I can reflash the board correctly.
and i can also use the command :sudo ./flash.sh jetson-tx1 mmcblk0p1
in the exract folders of JetPack to download and reboot the Tx1 board correctly.

But I cannot execute the command “sudo bash flashcmd.txt” correctly in either of the folder.
I mean the Jetpack extract folder and the made up folder by SecureBoot Package for r24.2.1,and the L4T 24.2.1.

hello wangbo,

the “flashcmd.txt” file included flash commands.
please try to copy and paste to flash the board instead running with “sudo bash flashcmd.txt”
waiting for your result.
thanks

choose JetPack L4T 2.3.1
choose to only install Linux for Tegra and Flash OS in Post Install.
and the exract folder is 64_TX1/Linux_for_Tegra_64_tx1
The files in the folder is the same as the ones in the Linux_for_Tegra
exracted by SecureBoot Package for r24.2.1,and the L4T 24.2.1.

hi JerryChang,
I have tried using the command:
sudo ./flash.sh -x 0x21 -y PKC -u …/rsa_priv.pem jetson-tx1 mmcblk0p1
without the parameter " --no-flash",it will start to flash to the TX1 board but stucked at
Retrieving storage infomation
[ 1.6411 ] tegrarcm --oem platformdetails storage storage_info.bin
.
this result is in VMs. I will try it again on the ubuntu laptop.

hi JerryChang,
I have just tried the command:
sudo ./flash.sh -x 0x21 -y PKC -u …/rsa_priv.pem jetson-tx1 mmcblk0p1
on the ubuntu laptop.

the result remain the same error:
[ 1.0807 ] tegradevflash --oem platformdetails storage storage_info.bin
[ 1.0831 ] Cboot is not running on device.
[ 1.0937 ]
Error: Return value 4

I also tried to execute the tegraflash.py command in the shell.
the tegraflash.py command is in the flashcmd.txt file.
but got the same error result:

[ 1.0807 ] tegradevflash --oem platformdetails storage storage_info.bin
[ 1.0831 ] Cboot is not running on device.
[ 1.0937 ]
Error: Return value 4

hello wangbo,

please note that the secureboot package you downloaded is for 28.1,
please upgrade your release to JetPack-3.1.
thanks

hi JerryChang,
I was using SecureBoot Package for r24.2.1.zip
which was downloaded form https://partners.nvidia.com/

but i cannot find the instruction document ,so i searched and found the "Jetson Platform Fuse Burning and Secure Boot Documentation and Tools ".It’s for 28.1, but i didn’t use it ,just followed the instruction document.

hello wangbo,

i would suggest you working with JetPack-3.1(r28.1) release to verify the secureboot.
thanks

Also consider that R24.2.1 uses a 3.x kernel, and R28.1 uses a 4.x kernel. Boot flow and what gets set prior to the kernel taking over (along with what gets passed to the kernel) will differ between R24.2.1 and R28.1. I don’t know if this would have an effect on SecureBoot, but it does mean that if you mix the wrong R28.1 and R24.2.1 steps you won’t be able to boot correctly even if SecureBoot is correct. Unless you have a reason to prefer an older 3.x Linux kernel there is an advantage to migrating to the newer kernel.

hi linuxdev and JerryChang,
The reason why I choose to use version 24.2.1 is that our team 's work is based on it.
But i will try it on the version R28.1,to find out whether it’s the cause or not .
Thank you all!