Can`t recover Jeston after update to L4T 21.1 (DeleteAll failed)

I have a problem with recovering the board after unsuccessful update with JetPack1-1.0 from July version. During the update I had this:

......
sudo ./flash.sh jetson-tk1 mmcblk0p1
copying bctfile(/home/grid/JetPackTK1-1.0/Linux_for_Tegra/bootloader/ardbeg/BCT/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.cfg)... done.
copying bootloader(/home/grid/JetPackTK1-1.0/Linux_for_Tegra/bootloader/ardbeg/u-boot.bin)... done.
	populating kernel to rootfs... done.
	populating jetson-tk1_extlinux.conf.emmc to rootfs... done.
done.
Making system.img... 
	populating rootfs from /home/grid/JetPackTK1-1.0/Linux_for_Tegra/rootfs ... done.
	Sync'ing system.img ... done.
	Converting RAW image to Sparse image... 

---- Raw to Sparse Image Converter v1.0 ----------------------------
  0: RAW:     3706880(    905 blks) ==>          28:3706892
  1: SKP:       32768(      8 blks) ==>     3706920:32780
  2: RAW:       24576(      6 blks) ==>     3706932:24588
  3: SKP:       40960(     10 blks) ==>     3731520:40972
  4: RAW:    10969088(   2678 blks) ==>     3731532:10969100
  5: SKP:    22585344(   5514 blks) ==>    14700632:22585356
  6: RAW:    28696576(   7006 blks) ==>    14700644:28696588
  7: SKP:    68161536(  16641 blks) ==>    43397232:68161548
  8: RAW:        8192(      2 blks) ==>    43397244:8204
///////////////////
///////////////////
1823: SKP:        4096(      1 blks) ==>  2266289552:4108
1824: RAW:     5369856(   1311 blks) ==>  2266289564:5369868
1825: SKP:        4096(      1 blks) ==>  2271659432:4108
1826: RAW:        8192(      2 blks) ==>  2271659444:8204
1827: SKP:       49152(     12 blks) ==>  2271667648:49164
1828: RAW:        4096(      1 blks) ==>  2271667660:4108
1829: SKP:       61440(     15 blks) ==>  2271671768:61452
1830: RAW:    15159296(   3701 blks) ==>  2271671780:15159308
1831: SKP:  1317978112( 321772 blks) ==>  2286831088:1317978124
-- Total: -----------------------------------------------------------
1832 CHUNK 15032385536(3670016 blks) ==>  2286831100(558303 blks)

done.
system.img built successfully. 
copying dtbfile(/home/grid/JetPackTK1-1.0/Linux_for_Tegra/kernel/dtb/tegra124-jetson_tk1-pm375-000-c00-00.dtb)... done.
copying cfgfile(/home/grid/JetPackTK1-1.0/Linux_for_Tegra/bootloader/ardbeg/cfg/gnu_linux_fastboot_emmc_full.cfg) to flash.cfg... done.
creating gpt(ppt.img)... 

*** GPT Parameters ***
device size -------------- 15766388736
bootpart size ------------ 8388608
userpart size ------------ 15758000128
Erase Block Size --------- 2097152
sector size -------------- 4096
Partition Config file ---- flash.cfg
Visible partition flag --- GP1
Primary GPT output ------- PPT->ppt.img
Secondary GPT output ----- GPT->gpt.img
Target device name ------- none

*** PARTITION LAYOUT(20 partitions) ***
[     BCT] BH            0        16383       8.0MiB 
[     PPT] UH            0         4095       2.0MiB ppt.img
[      PT] UH         4096         8191       2.0MiB 
[     EBT] UH         8192        16383       4.0MiB u-boot.bin
[     LNX] UH        16384        49151      16.0MiB 
[     SOS] UH        49152        61439       6.0MiB 
[     NVC] UH        61440        65535       2.0MiB 
[     MPB] UH        65536        77823       6.0MiB 
[     MBP] UH        77824        90111       6.0MiB 
[     GP1] UH        90112        94207       2.0MiB 
[     APP] UV        94208     29454335   14336.0MiB system.img
[     DTB] UV     29454336     29462527       4.0MiB tegra124-jetson_tk1-pm375-000-c00-00.dtb
[     EFI] UV     29462528     29593599      64.0MiB 
[     USP] UV     29593600     29601791       4.0MiB 
[     TP1] UV     29601792     29609983       4.0MiB 
[     TP2] UV     29609984     29618175       4.0MiB 
[     TP3] UV     29618176     29626367       4.0MiB 
[     WB0] UV     29626368     29630463       2.0MiB 
[     UDA] UV     29630464     30773247     558.0MiB 
[     GPT] UH     30773248     30777343       2.0MiB gpt.img
copying flasher(/home/grid/JetPackTK1-1.0/Linux_for_Tegra/bootloader/ardbeg/fastboot.bin)... done.
Existing flashapp(/home/grid/JetPackTK1-1.0/Linux_for_Tegra/bootloader/nvflash) reused.
*** Flashing target device started. ***
./nvflash --bct PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.cfg --setbct --configfile flash.cfg  --create --bl fastboot.bin --odmdata 0x6009C000 --go
Nvflash 4.13.0000 started
BR_CID: 0x340010017408f0420400000019fe0580
rcm version 0X400001
Skipping BoardID read at miniloader level
System Information:
   chip name: unknown
   chip id: 0x40 major: 1 minor: 1
   chip sku: 0x0
   chip uid: 0x000000017408f0420400000019fe0580
   macrovision: disabled
   hdcp: disabled
   jtag: disabled
   sbk burned: false
   board id: 0
   warranty fuse: 0
   dk burned: false
   boot device: emmc
   operating mode: 3
   device config strap: 0
   device config fuse: 0
   sdram config strap: 0

RCM communication completed
BCT sent successfully
sending file: tegra124-jetson_tk1-pm375-000-c00-00.dtb
- 52986/52986 bytes sent
tegra124-jetson_tk1-pm375-000-c00-00.dtb sent successfully
odm data: 0x6009c000
downloading bootloader -- load address: 0x83d88000 entry point: 0x83d88000
sending file: fastboot.bin
- 594363/594363 bytes sent
fastboot.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
ML execution and Cpu Handover took 2 Secs
Partition backup took 0 Secs
setting device: 2 3
deleting device partitions
deleteall failed
command failure/warning: create failed (bad data)
bootloader status: fatal failure to read / write to mass storage (code: 9) message: nverror:0x5 (0x5) DeleteAll 1350 flags: 0

Failed flashing ardbeg.

Log from UART:

[0000.000] [TegraBoot] (version UNDEF_BUILD)
[0000.004] Reset reason: power on reset
[0000.007] Processing in recovery mode
[0000.011] Established communication link with host                          
[0000.084] Downloaded bct successfully                                       
[0000.094] No Battery Present                                                
[0000.097] Sdram initialization is successful                                
[0000.138] Downloaded DTB successfully                                       
[0000.176] No Battery Present                                                
[0000.577] Downloaded bootloader successfully                                
[0000.581] CPU-bootloader entry address: 0x83d88000                          
[0000.585] BoardId: 375                                                      
[0000.587] Vpr Carveout Base=0x0f4600000 Size=0x00ba00000                    
[0000.592] Tsec Carveout Base=0x0f2600000 Size=0x002000000                   
[0000.598] Lp0 Carveout Base=0x0f25ff000 Size=0x000001000
[0000.603] Xusb Carveout Base=0x0f2300000 Size=0x000200000
[0000.608] Platform-DebugCarveout: 0    
[0000.635] CPU power rail is up         
[0000.638] Performing RAM repair        
[0000.641] CPU clock init successful 
[0000.644] Starting CPU & Halting co-processor
NVRM Initialized shmoo database
NVRM CLOCKS: PLLX0:      696000 Khz
NVRM CLOCKS: PLLM0:      924000 Khz
NVRM CLOCKS: PLLC0:      0 Khz
NVRM CLOCKS: PLLP0:      408000 Khz
NVRM CLOCKS: PLLA0:      11289 Khz
NVRM CLOCKS: CPU:        696000 Khz
NVRM CLOCKS: AVP:        48000 Khz
NVRM CLOCKS: System Bus: 48000 Khz
NVRM CLOCKS: Memory Controller: 924000
NVRM CLOCKS: External Memory Controller: 924000
EEPROM instance-5: No slave at this instance.
EEPROM instance-0: No slave at this instance.
EEPROM instance-0: Querying board info from BCT.
EEPROM instance-0: Board info present in BCT is invalid.
EEPROM instance-1: No slave at this instance.
EEPROM instance-1: Querying board info from BCT.
EEPROM instance-1: Board info present in BCT is invalid.
EEPROM instance-2: No slave at this instance.
EEPROM instance-2: Querying board info from BCT.
EEPROM instance-2: Board info present in BCT is invalid.
EEPROM instance-3: No slave at this instance.
EEPROM instance-3: Querying board info from BCT.
EEPROM instance-3: Board info present in BCT is invalid.
EEPROM instance-4: No slave at this instance.
EEPROM instance-4: Querying board info from BCT.
EEPROM instance-4: Board info present in BCT is invalid.
EEPROM instance-5: No slave at this instance.
EEPROM instance-5: Querying board info from BCT.
EEPROM instance-5: Board info present in BCT is invalid.
EEPROM instance-6: BoardInfo: 0x0001:0x0007:0375:0000:03:E:00:0xff:0xff:0xff:0xff:0xff:0xff
EEPROM instance-7: No slave at this instance.
EEPROM instance-7: Querying board info from BCT.
EEPROM instance-7: Board info present in BCT is invalid.
Final BoardID: proc: 375 and pmu 375
ADJUSTED CLOCKS:
MC clock is set to 924000 KHz
EMC clock is set to 924000 KHz (DDR clock is at 924000 KHz)
PLLX0 clock is set to 696000 KHz
PLLC0 clock is set to      0 KHz
CPU clock is set to 696000 KHz
System and AVP clock is set to  48000 KHz
GraphicsHost clock is set to 163200 KHz
MSENC clock is set to  92400 KHz
Vde clock is set to 204000 KHz

Bootloader-Cpu Init at (time stamp): 504597084 us

Pinmux changes applied in kernel way

[bootloader] (version UNDEF_BUILD)
Platform Pre Boot configuration...
NvDdkUsbhBlockDevInit..
Initializing Display
The proc BoardInfo: 0x0177:0x0000:0x03:0x45:0x00
The proc BoardInfo: 0x0177:0x0000:0x03:0x45:0x00
This Pmu Module is not present.
The best display mode is 2560x1600/60Hz, pclk: 268627Khz

DSI PAD calibration done

DSI PAD calibration done

DSI PAD calibration done

DSI PAD calibration done
Entering NvFlash recovery mode / Nv3p Server

Nv3pServer Version 4.13.0000
SDIO_DDK polling read timeout Instance[3]
ReadExtCSD :Error 0x5
MmcIdentifyCard :Error 0x5
IdentifyCard :Error 0x5
SdOpen: Error 0x5

DeleteAll failed. NvError 5 NvStatus 9

Now I have the same anyway. Sometimes I have hang on line “NvFlash starting…” when I experiment with “-S XXXX MiB” option. Tried nvidia usb cable with diff ports. No result.

I have not used JetPack. What I’m wondering though is if just flash directly to L4T R19.3 or 21.1 works? It could narrow down software versus hardware issues.

I wasn`t fully correct - first time I flashed directly to 21.1 (without JetPack suite as I have Linux Mint) with the fail “DeleteAll failed” result. Then I tried JetPack from Ubuntu 14.04.
Now I trying different versions and different OSes (have also Ubuntu 14.04) with 2 conditions of stop: “delete all” and sometimes “NvFlash starting…” hang.

P.S. Found close problem (based on nverror:0x5) on younger Tegra - on A500 ([Q] A500 - Can't create BCT partition | XDA Forums). They still don`t have solution

R21.1 is relatively new, and seems to cut down send time via conversion of the file system image to a sort of “compressed” version. Thus, R19.3 only had a system.img in the bootloader directory, and starting with R21.1 the flash script moves system.img to system.img.raw, and then creates the alternate smaller send file as system.img. I suspect the simpler R19.3 variant would be good to test with despite having longer download times to the eMMC. Does flash specifically to R19.3 work? If this works it might be revealing a weakness in the “.raw” variant of system.img.

for R19.3 I have the same on clean Ubuntu 14.04 in Virtualbox:

deleteall failed
command failure/warning: create failed (bad data)
bootloader status: fatal failure to read / write to mass storage (code: 9) message: nverror:0x5 (0x5) DeleteAll 1330 flags: 0

Ahh! Bingo! VirtualBox. This is very likely why. Or rather having a non-linux filesystem underneath would be a more precise answer.

The issue is that some file types are not understood by all filesystems. For example, device special files are really an extension of kernel drivers…something like windows NTFS does not support linux kernel drivers. Sometimes permissions are only partially preserved as well. Is your VirtualBox running entirely on something like an ext4 filesystem?

Yes, its working on Mint 17 (ext4). I tried all in host Mint 17 and in virtual Ubuntu 14.04 (on Mint host) -- both R19.3 and R21.1 get this error. In nearest hours Ill make dedicated machine with “real” Ubuntu and will write the result here.

Usually it is the underlying filesystem, but there have been multiple users with problems while running VirtualBox. A dedicated machine would likely simplify life (or at least multiboot on the same machine). I still suspect VirtualBox, but unfortunately until trying a true linux install you won’t know.

What I’m curious about is how many users have tested using VirtualBox, and how many had success versus failure…if success, what kind of special details had to be overcome? Anyone who can report on this?

No, clean Ubuntu 14.04.1 gave me the same 0x5 result.
Maybe bad blocks?

Was the clean Ubuntu 0x5 result R19.3? I just want to make sure that the new system with moving system.img to system.img.raw and then creating a smaller system.img is not getting in the way…it’s relatively new.

You said you’ve tried the nVidia USB cable with different ports, which I assume to mean a USB HUB, so cable seating is probably checked…the mini-A/B can sometimes be harder to seat correctly. Do make sure nothing extra/unnecessary is plugged into USB during flash (including at the HUB, not just Jetson), as there is a very minor possibility that another device is causing issues.

Bad blocks would be a possibility…these are eMMC though, so it would mean that possibly it is time to talk to nVidia about RMA.

No dedicated hub, no direct connection, no R19.3 and other combinations - nothing helped.
No way, RMA.
Thanks for assistance)

This problem is solved? Please can some body comment? Can you tel us how did you solve the problem ?

I am getting this error

RCM communication completed
downloading bootloader – load address: 0x83d88000 entry point: 0x83d88000
download command failed NvError 0x120002
command failure/warning: bootloader download failed (bad data)

Failed to flash ardbeg.

Which L4T version? What was the exact flash.sh command? Was everything unpacked as root or sudo?

RCM communication completed
BCT sent successfully
odm data: 0x6009c000
downloading bootloader – load address: 0x80108000 entry point: 0x80108000
sending file: fastboot.bin

  • 900492/900492 bytes sent
    fastboot.bin sent successfully
    waiting for bootloader to initialize

I am trying to flash new Image but nothing happens after this.
It is stuck here in loop. I did everything with sudo privilege. Also, the Jetson boots if I am using an external sd card but does not boot without it.

I have the problem as described above. Has this problem been solved?

Thanks

*** Flashing target device started. ***
./nvflash --bct PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.cfg --setbct --configfile flash.cfg --create --bl fastboot.bin --odmdata 0x6009C000 --go
Nvflash 4.13.0000 started
BR_CID: 0x340010017408f0421000000018ff03c0
rcm version 0X400001
Skipping BoardID read at miniloader level
System Information:
chip name: unknown
chip id: 0x40 major: 1 minor: 1
chip sku: 0x0
chip uid: 0x000000017408f0421000000018ff03c0
macrovision: disabled
hdcp: disabled
jtag: disabled
sbk burned: false
board id: 0
warranty fuse: 0
dk burned: false
boot device: emmc
operating mode: 3
device config strap: 0
device config fuse: 0
sdram config strap: 0

RCM communication completed
BCT sent successfully
sending file: tegra124-jetson_tk1-pm375-000-c00-00.dtb

  • 59637/59637 bytes sent
    tegra124-jetson_tk1-pm375-000-c00-00.dtb sent successfully
    odm data: 0x6009c000
    downloading bootloader – load address: 0x83d88000 entry point: 0x83d88000
    sending file: fastboot.bin
  • 594363/594363 bytes sent
    fastboot.bin sent successfully
    waiting for bootloader to initialize
    bootloader downloaded successfully
    ML execution and Cpu Handover took 1 Secs
    Partition backup took 0 Secs
    setting device: 2 3
    deleting device partitions
    deleteall failed
    command failure/warning: create failed (bad data)
    bootloader status: fatal failure to read / write to mass storage (code: 9) message: nverror:0x42004 (0x42004) DeleteAll 1350 flags: 0

Failed flashing ardbeg.

I should mention that I’m am using a fresh install (2016 March 10) of the latest Ubuntu (14.04.4 amd64), and latest NVidia package I could find (JetPack-L4T-2.1-linux-x64).

If you told the install configuration to use mmcblk1p1 instead of mmcblk0p1 then it installs the boot loader on the SD card and not eMMC. Without the SD card you would have no boot loader. Is there any chance you told it to boot to SD card or manually entered the mmcblk1p1 device as install location?

No, I’m using the JetPack installer, not doing it manually. If the eMMC is dead, can I manually flash an SD card on the host PC, and boot from that. Or, is the eMMC required for booting any device?

I’m not sure, but JetPack probably is able to install to SD card. I don’t have an Ubuntu host, so I can’t be sure. Sometimes people have also reported accidentally not picking TX1 or TK1 correctly (JetPack has both sets of software with it).

One has to distinguish between installing a root partition to eMMC versus SD card, and in addition installing boot loader to eMMC or SD card…they are independent. The thing is that if your SD card must be in to boot, I suspect this is where the boot loader is. If something in hardware were fried, it is possible SD card could work if and only if you specifically told it to install to SD card. So I suspect something at some point said to install boot loader to SD card…but until it is solved there is no way to know.

You can tell the boot loader and/or root file system to go to SD card…in theory if your eMMC is fried, this could be a workaround. However, by the time eMMC is fried, I would suspect that even that workaround will find issues somewhere.

What I suggest is to manually download L4T R21.4, and without JetPack run the install steps. Be sure to use sudo when unpacking, and when running apply_binaries.sh. Flash with something like this:

sudo flash.sh jetson-tk1 mmcblk0p1