Return error, while using the flash.sh script to flash the rootfs for AGX

We are trying to flash the sample filesystem on AGX, using flash.sh.
Each time it failed with a ‘error 8’ returned.

Here is the sectional log:

[ 6.3826 ] tegrahost_v2 --chip 0x19 --align /home/leopard/31.1/Xavier/Linux_for_Tegra/bootloader/19963/tmprxJrVP1_1.bct
[ 6.3833 ]
[ 6.3839 ] tegrahost_v2 --chip 0x19 0 --magicid MEMB --appendsigheader tmprxJrVP1_1.bct zerosbk
[ 6.3845 ] adding BCH for tmprxJrVP1_1.bct
[ 6.3858 ]
[ 6.3866 ] tegrasign_v2 --key None --list tmprxJrVP1_1_sigheader.bct_list.xml
[ 6.3872 ] Assuming zero filled SBK key
[ 6.3874 ]
[ 6.3884 ] tegrahost_v2 --chip 0x19 0 --updatesigheader tmprxJrVP1_1_sigheader.bct.encrypt tmprxJrVP1_1_sigheader.bct.hash zerosbk
[ 6.3892 ]
[ 6.3892 ] Copying signatures
[ 6.3899 ] tegrahost_v2 --chip 0x19 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[ 7.1827 ]
[ 7.1827 ] Boot Rom communication
[ 7.1835 ] tegrarcm_v2 --chip 0x19 0 --rcm rcm_list_signed.xml
[ 7.1841 ] BR_CID: 0x880219116420f0c82400000008010200
[ 7.1847 ] RCM version 0X190001
[ 7.1979 ] Boot Rom communication completed
[ 8.2133 ]
[ 9.2153 ] tegrarcm_v2 --isapplet
[ 9.2163 ] Applet version 01.00.0000
[ 9.2383 ]
[ 9.2384 ] Sending BCTs
[ 9.2402 ] tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt --download bct_mem tmprxJrVP1_1_sigheader.bct.encrypt
[ 9.2421 ] Applet version 01.00.0000
[ 9.2784 ] Sending bct_bootrom
[ 9.2786 ] […] 100%
[ 9.2829 ] Sending bct_mb1
[ 9.2875 ] […] 100%
[ 10.3172 ]
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 tmprxJrVP1_1_sigheader.bct.encrypt
Failed flashing t186ref.

Same error while using JetPack-L4T-4.1.1-linux-x64_b57.run

Anyone konw how to fix this issue?
Thanks in advance

hello tobleronwater,

it seems you got failure by sending BCTs, we would like to have more details.
for example,

  1. had you have your customization?
  2. may I know your whole process, could you please also share the commands.
    thanks

Hi Jerry,

Thanks for your responding.

  1. had you have your customization?
    I am working at Leopard, currently I just want to bring up any sensor on XGA.
  1. The whole process
    leopard@leopard-Aspire-TC-705:~/31.1/Xavier/Linux_for_Tegra$ sudo ./flash.sh jetson-xavier mmcblk0p1
    [sudo] password for leopard:
    ###############################################################################

L4T BSP Information:

R31 (release), REVISION: 1.0, GCID: 13194883, BOARD: t186ref, EABI: aarch64,

DATE: Wed Oct 31 22:26:16 UTC 2018

###############################################################################

Target Board Information:

Name: jetson-xavier, Board Family: t186ref, SoC: Tegra 194,

OpMode: production, Boot Authentication: ,

###############################################################################
copying soft_fuses(/home/leopard/31.1/Xavier/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg)… done.
./tegraflash.py --chip 0x19 --applet “/home/leopard/31.1/Xavier/Linux_for_Tegra/bootloader/mb1_t194_prod.bin” --skipuid --soft_fuses tegra194-mb1-soft-fuses-l4t.cfg --bins “mb2_applet nvtboot_applet_t194.bin” --cmd “dump eeprom boardinfo cvm.bin;reboot recovery”
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.0025 ] Generating RCM messages
[ 0.0033 ] tegrahost_v2 --chip 0x19 0 --magicid MB1B --appendsigheader /home/leopard/31.1/Xavier/Linux_for_Tegra/bootloader/mb1_t194_prod.bin zerosbk
[ 0.0039 ] Header already present for /home/leopard/31.1/Xavier/Linux_for_Tegra/bootloader/mb1_t194_prod.bin
[ 0.0070 ]
[ 0.0077 ] tegrasign_v2 --key None --getmode mode.txt
[ 0.0082 ] Assuming zero filled SBK key

… …

4229: SKP: 33554432( 8192 blks) ==> 3783882328:12
4230: RAW: 5963776( 1456 blks) ==> 3783882340:5963788
4231: SKP: 1940193280( 473680 blks) ==> 3789846128:12
– Total: ---------------------------------------------------
4232 CHUNK 30064771072(7340032 blks) ==> 3789846140(925243 blks)

done.
system.img built successfully.
Existing tbcfile(/home/leopard/31.1/Xavier/Linux_for_Tegra/bootloader/cboot_t194.bin) reused.

… …

[ 3.3096 ] Packing sdram param for instance[12]
[ 3.3096 ] Packing sdram param for instance[13]
[ 3.3096 ] Packing sdram param for instance[14]
[ 3.3096 ] Packing sdram param for instance[15]
[ 3.3096 ]
[ 3.3104 ] tegrahost_v2 --chip 0x19 --align /home/leopard/31.1/Xavier/Linux_for_Tegra/bootloader/8948/tmpibiQR31_1.bct
[ 3.3110 ]
[ 3.3116 ] tegrahost_v2 --chip 0x19 0 --magicid MEMB --appendsigheader tmpibiQR31_1.bct zerosbk
[ 3.3122 ] adding BCH for tmpibiQR31_1.bct
[ 3.3135 ]
[ 3.3143 ] tegrasign_v2 --key None --list tmpibiQR31_1_sigheader.bct_list.xml
[ 3.3149 ] Assuming zero filled SBK key
[ 3.3152 ]
[ 3.3161 ] tegrahost_v2 --chip 0x19 0 --updatesigheader tmpibiQR31_1_sigheader.bct.encrypt tmpibiQR31_1_sigheader.bct.hash zerosbk
[ 3.3168 ]
[ 3.3169 ] Copying signatures
[ 3.3175 ] tegrahost_v2 --chip 0x19 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[ 3.8497 ]
[ 3.8498 ] Boot Rom communication
[ 3.8505 ] tegrarcm_v2 --chip 0x19 0 --rcm rcm_list_signed.xml
[ 3.8511 ] BR_CID: 0x880219116420f0c82400000008010200
[ 3.8518 ] RCM version 0X190001
[ 3.8644 ] Boot Rom communication completed
[ 4.8798 ]
[ 5.8823 ] tegrarcm_v2 --isapplet
[ 5.8833 ] Applet version 01.00.0000
[ 5.9009 ]
[ 5.9010 ] Sending BCTs
[ 5.9025 ] tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt --download bct_mem tmpibiQR31_1_sigheader.bct.encrypt
[ 5.9041 ] Applet version 01.00.0000
[ 5.9448 ] Sending bct_bootrom
[ 5.9450 ] […] 100%
[ 5.9493 ] Sending bct_mb1
[ 5.9537 ] […] 100%
[ 6.9854 ]
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 tmpibiQR31_1_sigheader.bct.encrypt
Failed flashing t186ref.

There was too many log, so I skiped some log.

BTW, what is the BCT meaning

it is “Boot Configuration Table”, you may also refer to Jetson AGX Xavier Mass Storage Partitions Configuration for details.
thanks

hello tobleronwater,

are you able to connect your host PC with Jetson-Xavier to gather early bootloader logs.
you may connect Jetson-Xavier via port J501 and enter UART console.
for example,

$ picocom -b 11520 /dev/ttyUSB3

Hello Jerry,

Sorry for my late reply.
I can see 4 com console from Jetson-Xavier, but there is no output after I put it power on.
I know it used work ok.

I also forgot mention that the host Ubuntu PC I used crashed two days ago. I rebuild it yesterday.
The flash.sh script always worked ok before the Ubuntu crashed.
Is there any necessary lib I should install previously?

Thanks.

hello tobleronwater,

  1. may I know your ubuntu version.
  2. could you please download JetPack release again for installation.
  3. please also check development guide for BSP Customization chapter if you need to build your own image.

Hi Jerry,

1.my ubuntu version is 18.04 (before the ubuntu crashed I used 14.04)

2.I retried to download JetPack and flash the Jetson-Xavier, it got exactly the same error log.
here I grabbed some log from Xavier console during the flashing, may you get something from that?

[0058.888] I> MB1 (prd-version: 1.0.0.0-t194-41334769-a3872862)
[0058.893] I> Boot-mode: Platform RCM
[0058.896] I> chip revision : A02
[0058.899] I> Bootrom patch version : 7 (correctly patched)
[0058.905] I> ATE fuse revision : 0x200
[0058.908] I> Ram repair fuse : 0x0
[0058.911] I> Ram Code : 0x0
[0058.914] I> rst_source : 0x0
[0058.916] I> rst_level : 0x0
[0058.920] I> USB configuration success
[0060.909] I> Command received is 1
[0060.953] I> Command received is 1
[0061.001] I> Command received is 1
[0061.006] I> Command received is 2
[0061.018] I> mb2 image downloaded
[0061.041] I> Command received is 1
[0061.046] I> Command received is 10
[0061.049] I> Recovery boot mode 0
[0061.052] I> Boot-device: SATA
[0061.057] I> UPHY full init done
[0061.061] I> MTS carveout BOM: 0x0
[0061.064] I> WP-0 triggered
[0061.067] I> MB1 done

[0061.072] W> Profiler not initialized
[0061.075] I> Welcome to MB2(TBoot-BPMP) Applet
[0061.080] W> Profiler not initialized
[0061.083] E> DEVICE_PROD: Invalid value data = 0, size = 0.
[0061.089] W> Device prod registration failed
[0061.093] W> Profiler not initialized
[0061.138] I> sdmmc DDR50 mode
[0061.142] E> QSPI Flash: Insufficient flash size (0 MB)
[0061.147] I> QSPI Flash is not present.
[0061.199] E> Link startup dme_set failed
[0061.202] E> UFS initialization failed
[0061.206] I> UFS is not present
[0061.209] W> Profiler not initialized
[0061.215] I> Found 15 partitions in SDMMC_BOOT (instance 3)
[0061.223] I> Found 36 partitions in SDMMC_BOOT (instance 3)
[0061.229] W> Profiler not initialized
[0061.232] I> Entering 3p server
[0061.235] I> USB configuration success
[0062.189] I> Populate eeprom info
[0062.193] I> Populate eeprom info for module cvm
[0062.286] I> Rebooting : reboot-recovery

[006ÿ
[0203.962] I> MB1 (prd-version: 1.0.0.0-t194-41334769-a3872862)
[0203.967] I> Boot-mode: L1 RCM
[0203.970] I> chip revision : A02
[0203.973] I> Bootrom patch version : 7 (correctly patched)
[0203.978] I> ATE fuse revision : 0x200
[0203.982] I> Ram repair fuse : 0x0
[0203.985] I> Ram Code : 0x0
[0203.987] I> rst_source : 0xb
[0203.990] I> rst_level : 0x1
[0203.994] I> USB configuration success
[0205.985] I> Command received is 1
[0206.029] I> Command received is 1
[0206.034] I> Command received is 2
[0206.038] I> bct_bootrom image downloaded
[0206.043] I> Command received is 2
[0206.050] E> No fuse-bypass data
[0206.053] E> MB1_PLATFORM_CONFIG: device prod data is empty in MB1 BCT.
[0206.059] E> MB1_PLATFORM_CONFIG: Failed to initialize device prod.
[0206.067] I> temperature = 19500
[0206.069] W> Skipping boost for clk:bpmp_cpu_nic
[0206.074] W> Skipping boost for clk:bpmp_apb
[0206.078] W> Skipping boost for clk:axi_cbb
[0206.082] W> Skipping boost for clk:aon_cpu_nic
[0206.086] W> Skipping boost for clk:aon_can0
[0206.090] W> Skipping boost for clk:aon_can1
[0206.095] I> Boot-device: SATA
[0206.097] I> Boot-device: SATA
[0206.100] W> MB1_PLATFORM_CONFIG: Module 25.0 not found in device config table.
[0206.107] I> sata params source = safe params
[0206.986] E> SATA: Timeout while polling for phy ready. Last value 0x00000000.
[0206.993] I> Device presence not detected and Phy communication not established
[0207.000] I> Device not present or communication not established
[0207.006] E> SATA: Failed to reset ahci host.
[0207.010] E> SATA: Failed to initialize ahci link.
[0207.014] E> SATA: Failed to open sata 0.
[0207.018] C> Failed to open device4(0)
[0207.021] C> ERROR: device 4(0) init failed
[0207.025] C> storage init failed
[0207.028] E> task 27 failed (err: 0x10101806)
[0207.032] E> top caller module: SATA, error module: SATA, reason: 0x06, aux_info: 0x18
[0207.040] I> MB1(1.0.0.0-t194-41334769-a3872862) BIT boot status dump :
1111111111110000111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
[0207.070] I> Reset to recovery mode

  1. since I cant bootup my Xavier, I thinks I need flashing a sample kernel and filesystem first.
    after that I will build and use my own image.

Thanks.