Now unable to flash Jetson TK1

It seems after a few months of successful re-flashing my Tk1 board it now seems it will not re-flash any more.

The last testing I was doing was some SATA drive read/write testing of the drive.

I was using R21.2 and when it failed to boot I tried to re-flash with 21.3 which failed with the following serial output.

[0000.000] [TegraBoot] (version UNDEF_BUILD)
[0000.004] Reset reason: power on reset
[0000.008] Processing in recovery mode
[0000.011] Established communication link with host
[0000.125] Downloaded bct successfully 
[0000.129] No Battery Present
[0000.133] Sdram initialization is successful 
[0000.143] Downloaded DTB successfully 
[0000.169] No Battery Present
[0000.240] Downloaded bootloader successfully 
[0000.244] CPU-bootloader entry address: 0x83d88000 
[0000.249] BoardId: 375
[0000.251] Vpr Carveout Base=0x0f4600000 Size=0x00ba00000
[0000.256] Tsec Carveout Base=0x0f2600000 Size=0x002000000
[0000.261] Lp0 Carveout Base=0x0f25ff000 Size=0x000001000
[0000.266] Xusb Carveout Base=0x0f2300000 Size=0x000200000
[0000.271] Platform-DebugCarveout: 0
[0000.299] NvTbootI2cWrite(): error code 0x00045100 Error while starting write transaction
[0000.307] NvTbootI2cDeviceWrite(): error code 0x00045001 Error while writing
[0000.314] NvTbootI2c: Read failed for slave 0x80, offset 0x00 with error code 0x00045001
[0000.322] FAILURE in NvTbootConfigureCpu
[0000.325] Error is 45001

The output from the serial port with just a reset is as follows :

U-Boot SPL 2014.10-rc2-00001-g9f88c9e (Dec 01 2014 - 14:29:15)

I have not been able to find any information on the error codes at the point.

Anybody been here before?

Bob.

What method did you use to flash 21.3? Manual command line or JetPack?

Thanks for the prompt reply.

My host system is Fedora 20 and the re-flashing is implemented using the console command from the host Fedora machine :-

./flash.sh jetson-tk1 mmcblk0p1
and
./flash.sh -S 15GiB jetson-tk1 mmcblk0p1

All giving the same result

Is the Fedora machine the same one that you have been flashing the Jetson with previously?

Yes the same machine same method. I have even tried to go back to R19.3 with the same results.

It appears to me that both bct and dtb have gone down successfully and there is a problem with the I2c write within the Tk1. I cant seem to find the reference to the error codes for :-
NvTbootI2cWrite(): error code 0x00045100
This may point to the reason for the problem.

Has some software over written something in the flash boot loader of the Tk1?

Does the jetson show up via lsusb when put into recovery mode?

[xxxx@Fedora11 Linux_for_Tegra] lsusb |grep NVidia Bus 001 Device 004: ID 0955:7140 NVidia Corp. [xxxx@Fedora11 Linux_for_Tegra]

The serial output above shows that the ./flash succeeds in downloading bct and DTB then fails with error code, so the recovery port is communicating.

So the Tk1 cpu has control over the serial port in that the uboot prompt is written out after a reset, and the recovery port in that the flash process starts as above after putting the Tk1 into recovery mode.

I don’t seem to be able to get the uboot to break to its command prompt by entering a character to the serial port.

I would suspect eMMC failure, but it’s hard to say. One thing that does stick out as a possible issue is that the flash parameter “-S 15GiB” is too large for the eMMC. However, running with no option should have worked. FYI, the largest flash size should be “-S 14580MiB”, unless something changed in the partitioning scheme I’m not aware of. Just as a test though, could you try flashing again with:

sudo flash.sh -S 14580MiB jetson-tk1 mmcblk0p1

…and for testing purposes, make sure no other peripherals or devices are connected to the Jetson during flash other than the micro USB cable used in the actual flash, keyboard, mouse, and monitor. Especially do not have any external memory connected.

Thanks linuxdev I think you may be correct. Below results of requested tests.

[fc007@Fedora11 Linux_for_Tegra]$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 005 Device 002: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0955:7140 NVidia Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[fc007@Fedora11 Linux_for_Tegra]$ sudo flash.sh -S 14580MiB jetson-tk1 mmcblk0p1
[sudo] password for fc007: 
sudo: flash.sh: command not found
[fc007@Fedora11 Linux_for_Tegra]$ sudo ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1
copying bctfile(/home/fc007/tk1_reflash/Linux_for_Tegra/bootloader/ardbeg/BCT/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.cfg)... done.
copying bootloader(/home/fc007/tk1_reflash/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/fc007/tk1_reflash/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:     3772416(    921 blks) ==>          28:3772428
  1: SKP:        4096(      1 blks) ==>     3772456:4108
  2: RAW:        4096(      1 blks) ==>     3772468:4108
  3: SKP:       24576(      6 blks) ==>     3776576:24588
  4: RAW:       16384(      4 blks) ==>     3776588:16396
  5: SKP:       49152(     12 blks) ==>     3792984:49164
  6: RAW:     7897088(   1928 blks) ==>     3792996:7897100
  7: SKP:    25657344(   6264 blks) ==>    11690096:25657356
  8: RAW:    38928384(   9504 blks) ==>    11690108:38928396
  9: SKP:    57864192(  14127 blks) ==>    50618504:57864204
 10: RAW:        8192(      2 blks) ==>    50618516:8204
snip ---------------------------------------------------------

1750: RAW:    35627008(   8698 blks) ==>  2299974180:35627020
1751: SKP:     6455296(   1576 blks) ==>  2335601200:6455308
1752: RAW:    26910720(   6570 blks) ==>  2335601212:26910732
1753: SKP:        4096(      1 blks) ==>  2362511944:4108
1754: RAW:     6639616(   1621 blks) ==>  2362511956:6639628
1755: SKP:  1778384896( 434176 blks) ==>  2369151584:1778384908
1756: RAW:        8192(      2 blks) ==>  2369151596:8204
1757: SKP:   255844352(  62462 blks) ==>  2369159800:255844364
-- Total: -----------------------------------------------------------
1758 CHUNK 15288238080(3732480 blks) ==>  2369159812(578403 blks)

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

*** GPT Parameters ***
Device Sector Size ------- 512
device size -------------- 15766388736
bootpart size ------------ 8388608
userpart size ------------ 15758000128
Erase Block Size --------- 2097152
FS Buffer 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     29954047   14580.0MiB system.img
[     DTB] UV     29954048     29962239       4.0MiB tegra124-jetson_tk1-pm375-000-c00-00.dtb
[     EFI] UV     29962240     30093311      64.0MiB 
[     USP] UV     30093312     30101503       4.0MiB 
[     TP1] UV     30101504     30109695       4.0MiB 
[     TP2] UV     30109696     30117887       4.0MiB 
[     TP3] UV     30117888     30126079       4.0MiB 
[     WB0] UV     30126080     30130175       2.0MiB 
[     UDA] UV     30130176     30773247     314.0MiB 
[     GPT] UH     30773248     30777343       2.0MiB gpt.img
copying flasher(/home/fc007/tk1_reflash/Linux_for_Tegra/bootloader/ardbeg/fastboot.bin)... done.
Existing flashapp(/home/fc007/tk1_reflash/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: 0x34001001740970422400000003fd0100
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: 0x00000001740970422400000003fd0100
   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
- 57167/57167 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 failed NvError 0x0
command failure/warning: bootloader download failed (bad data)
bootloader status: device failure (code: 2) message:  flags: 0

Failed flashing ardbeg.
[fc007@Fedora11 Linux_for_Tegra]$

I looked for the code based on the NVIDIA NvHost interface in order to see if I could carry out further tests on the tk1, but had no luck chasing “nvhost” as discussed in PLATFORM ADAPTATION FOR THE TEGRA LINUX DRIVER PACKAGE application notes under the heading “VALIDATING PLATFORM COMPONENTS”.

So where to from here?

Bob4xv

I see something that looks very very odd. Your command line did not specify boot loader, yet it is defaulting to fastboot.bin. All of the R21.x series defaults to u-boot. And of course fastboot requires the -k 6 option for partition or it would fail [obsolete]. I’m not near my development machine to check old logs to see how it should look (some fastboot configuration is correctly still used when specifying u-boot, but the boot loader itself should not say fastboot.bin), but are you absolutely sure you are not using an R19.x series? Would you be willing to download a completely new version of R21.3 and unpack and try with that?

Yes no problem. I downloaded R21.3 into a new folder extracted the files from both .tbz2, applied binaries and then re-flashed with the same results. I checked the sha1sum of the freshly downloaded files and they are the same as those published on the web. I did a ls -la from the Linux_for_Tegra directory and the …/ directory. The only odd thing I noticed is that the owner/group of some folders in the ./ dir are “1001 rtlsdr”. the rtlsdr group is associated with another project on my system.

Below is a copy of all of the command line output of the whole process in the hope other eyes spot something I have missed.

[fc007@Fedora11 NV_Downloads]$ sha1sum Tegra124_Linux_R21.3.0_armhf.tbz2
d3740d753ad8f139d22f2eec1008156f05a249ba  Tegra124_Linux_R21.3.0_armhf.tbz2
[fc007@Fedora11 NV_Downloads]$ sha1sum Tegra_Linux_Sample-Root-Filesystem_R21.3.0_armhf.tbz2 
bf310e64336ce49a99f80b67e6b5dc8650cb16c5  Tegra_Linux_Sample-Root-Filesystem_R21.3.0_armhf.tbz2
[fc007@Fedora11 NV_Downloads]$ sudo tar xpf Tegra124_Linux_R21.3.0_armhf.tbz2
[sudo] password for fc007: 
[fc007@Fedora11 NV_Downloads]$ cd Linux_for_Tegra/rootfs/
[fc007@Fedora11 rootfs]$ sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R21.3.0_armhf.tbz2
[fc007@Fedora11 rootfs]$ cd ../
[fc007@Fedora11 Linux_for_Tegra]$ sudo ./apply_binaries.sh
Using rootfs directory of: /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs
Extracting the NVIDIA user space components to /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs
Extracting the BSP test tools to /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs
Extracting the NVIDIA gst test applications to /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs
Extracting the configuration files for the supplied root filesystem to /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs
Creating a symbolic link nvgstplayer pointing to nvgstplayer-0.10
Creating a symbolic link nvgstcapture pointing to nvgstcapture-0.10
Adding symlink /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/tegra/libcuda.so --> /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/tegra/libcuda.so.1.1
Adding symlink /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/libcuda.so --> /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/tegra/libcuda.so
Adding symlink /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/libGL.so --> /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/usr/lib/arm-linux-gnueabihf/tegra/libGL.so.1
Extracting the firmwares and kernel modules to /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs
Extracting the kernel headers to /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/usr/src
Adding symlink /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/lib/modules/3.10.40-gc017b03/build --> /usr/src/linux-headers-3.10.40-gc017b03
Installing zImage into /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/boot
Installing jetson-tk1_extlinux.conf* into /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/boot/extlinux
Installing the board *.dtb files into /home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/rootfs/boot
Success!
[fc007@Fedora11 Linux_for_Tegra]$ ls
apply_binaries.sh  bootloader  jetson-tk1.conf  laguna.conf       nv_tegra  shield.conf
ardbeg.conf        flash.sh    kernel           laguna_t124.conf  rootfs    source_sync.sh
[fc007@Fedora11 Linux_for_Tegra]$ sudo ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1
copying bctfile(/home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/bootloader/ardbeg/BCT/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.cfg)... done.
copying bootloader(/home/fc007/JetsonNotes/NV_Downloads/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/fc007/JetsonNotes/NV_Downloads/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:     3772416(    921 blks) ==>          28:3772428
  1: SKP:        4096(      1 blks) ==>     3772456:4108
  2: RAW:        4096(      1 blks) ==>     3772468:4108
  3: SKP:       24576(      6 blks) ==>     3776576:24588
  4: RAW:       16384(      4 blks) ==>     3776588:16396
  5: SKP:       49152(     12 blks) ==>     3792984:49164
  6: RAW:     7798784(   1904 blks) ==>     3792996:7798796
  7: SKP:    25755648(   6288 blks) ==>    11591792:25755660
  8: RAW:    38330368(   9358 blks) ==>    11591804:38330380
  9: SKP:    58462208(  14273 blks) ==>    49922184:58462220
 10: RAW:        8192(      2 blks) ==>    49922196:8204
snip -------------------------------------------------------
1750: RAW:       53248(     13 blks) ==>  2360361508:53260
1751: SKP:        4096(      1 blks) ==>  2360414768:4108
1752: RAW:      352256(     86 blks) ==>  2360414780:352268
1753: SKP:    34504704(   8424 blks) ==>  2360767048:34504716
1754: RAW:     8388608(   2048 blks) ==>  2360767060:8388620
1755: SKP:  1803550720( 440320 blks) ==>  2369155680:1803550732
1756: RAW:        8192(      2 blks) ==>  2369155692:8204
1757: SKP:   255844352(  62462 blks) ==>  2369163896:255844364
-- Total: -----------------------------------------------------------
1758 CHUNK 15288238080(3732480 blks) ==>  2369163908(578404 blks)

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

*** GPT Parameters ***
Device Sector Size ------- 512
device size -------------- 15766388736
bootpart size ------------ 8388608
userpart size ------------ 15758000128
Erase Block Size --------- 2097152
FS Buffer 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     29954047   14580.0MiB system.img
[     DTB] UV     29954048     29962239       4.0MiB tegra124-jetson_tk1-pm375-000-c00-00.dtb
[     EFI] UV     29962240     30093311      64.0MiB 
[     USP] UV     30093312     30101503       4.0MiB 
[     TP1] UV     30101504     30109695       4.0MiB 
[     TP2] UV     30109696     30117887       4.0MiB 
[     TP3] UV     30117888     30126079       4.0MiB 
[     WB0] UV     30126080     30130175       2.0MiB 
[     UDA] UV     30130176     30773247     314.0MiB 
[     GPT] UH     30773248     30777343       2.0MiB gpt.img
copying flasher(/home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra/bootloader/ardbeg/fastboot.bin)... done.
Existing flashapp(/home/fc007/JetsonNotes/NV_Downloads/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: 0x34001001740970422400000003fd0100
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: 0x00000001740970422400000003fd0100
   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
- 57167/57167 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 failed NvError 0x0
command failure/warning: bootloader download failed (bad data)
bootloader status: device failure (code: 2) message:  flags: 0

Failed flashing ardbeg.
[fc007@Fedora11 Linux_for_Tegra]$ 
[fc007@Fedora11 Linux_for_Tegra]$ ls -la
total 96
drwxr-xr-x  6  1001 rtlsdr  4096 Feb  3 12:02 .
drwxrwxr-x  3 fc007 fc007   4096 May 12 16:42 ..
-rwxr-xr-x  1 root  root   12183 Feb  3 12:02 apply_binaries.sh
-rw-r--r--  1 root  root    3003 Feb  3 12:02 ardbeg.conf
drwxr-xr-x  3  1001 rtlsdr  4096 May 12 17:02 bootloader
-rwxr-xr-x  1 root  root   31546 Feb  3 12:02 flash.sh
-rw-r--r--  1 root  root    3388 Feb  3 12:02 jetson-tk1.conf
drwxr-xr-x  3  1001 rtlsdr  4096 Feb  3 12:03 kernel
-rw-r--r--  1 root  root    2985 Feb  3 12:02 laguna.conf
-rw-r--r--  1 root  root    2996 Feb  3 12:02 laguna_t124.conf
drwxr-xr-x  3  1001 rtlsdr  4096 Feb  3 12:03 nv_tegra
drwxr-xr-x 20  1001 rtlsdr  4096 May 12 16:49 rootfs
-rw-r--r--  1 root  root    2972 Feb  3 12:02 shield.conf
-rwxr-xr-x  1 root  root    6644 Feb  3 12:02 source_sync.sh
[fc007@Fedora11 Linux_for_Tegra]$ ls -la ../
total 698692
drwxrwxr-x  3 fc007 fc007       4096 May 12 16:42 .
drwxrwxr-x 14 fc007 fc007       4096 May 12 17:19 ..
drwxr-xr-x  6  1001 rtlsdr      4096 Feb  3 12:02 Linux_for_Tegra
-rw-rw-r--  1 fc007 fc007   67352316 May 12 16:13 Tegra124_Linux_R21.3.0_armhf.tbz2
-rw-rw-r--  1 fc007 fc007  648084241 May 12 16:32 Tegra_Linux_Sample-Root-Filesystem_R21.3.0_armhf.tbz2
[fc007@Fedora11 Linux_for_Tegra]$ pwd
/home/fc007/JetsonNotes/NV_Downloads/Linux_for_Tegra
[fc007@Fedora11 Linux_for_Tegra]$

As you can see it still persists in sending fastboot.bin.
Looking in the dir

[fc007@Fedora11 Linux_for_Tegra]$ ls -la ./bootloader/ardbeg
total 1048
drwxr-xr-x 4 1001 rtlsdr   4096 Feb  3 12:02 .
drwxr-xr-x 3 1001 rtlsdr   4096 May 12 17:02 ..
drwxr-xr-x 2 1001 rtlsdr   4096 Feb  3 12:02 BCT
drwxr-xr-x 2 1001 rtlsdr   4096 Feb  3 12:02 cfg
-rwxr-xr-x 1 root root   594363 Feb  3 12:02 fastboot.bin
-rw-r--r-- 1 root root      813 Feb  3 12:02 jetson-tk1_extlinux.conf.emmc
-rw-r--r-- 1 root root      821 Feb  3 12:02 jetson-tk1_extlinux.conf.nfs
-rw-r--r-- 1 root root      796 Feb  3 12:02 jetson-tk1_extlinux.conf.sdcard
-rw-r--r-- 1 root root      787 Feb  3 12:02 jetson-tk1_extlinux.conf.usb
-rw-r--r-- 1 root root   439864 Feb  3 12:02 u-boot.bin
[fc007@Fedora11 Linux_for_Tegra]$

we see both fastboot.bin and u-boot.bin are there and are root root.
I will try changing all files and directories in “Linux_for_Tegra” to root root and try flashing.

All help and ideas greatly appreciated

Carried out the above and it made no difference.
Tried forcing flash to use u-boot to no avail.

sudo ./flash.sh -S 14580MiB -L ./bootloader/ardbeg/u-boot.bin jetson-tk1 mmcblk0p1
Result:-
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 failed NvError 0x0
command failure/warning: bootloader download failed (bad data)
bootloader status: device failure (code: 2) message:  flags: 0

Failed flashing ardbeg.
-------------------------------------------------------------------------

I think I need so way of proving the eMMC is being loaded at all. Can we do this with nvflash?

I’m working on verifying how the logs should look and ways to verify eMMC. Downloading fastboot.bin should not matter if u-boot.bin is actually used, but the above logs don’t allow proof one way or the other as to what stage is going bad…those logs only give strong hints. Can you verify exactly how far serial console gets while attempting to boot? Also, can you verify that serial console did work before?

Adding an update…even on correct u-boot R21.3 installs fastboot.bin is downloaded. There is no issue with fastboot.bin being downloaded, the file is simply ignored and probably simplifies the life of the maintainers. Still checking into error codes and ways to verify eMMC.

NOTE: Towards the very end of flash a u-boot install sends u-boot.bin and gpt.img; a fastboot install would instead send boot.img and fastboot.bin. It is this very last send which determines the bootloader.

Yes in the past I have been able to get into the u-boot serial console command line by hitting a key after a reset.

Below is a copy of the serial port. The first U boot prompt is following a reset. The 2nd is where I try to break into uboot command line while hitting a key immediately after doing a reset to the tk1.

I then put the tk1 into recovery mode.

The remainder is the output from the serial port following the host command
sudo ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1

[fc007@Fedora11 ~]$ cu USB0@115200
Connected.

U-Boot SPL 2014.10-rc2-00001-g9f88c9e (Dec 01 2014 - 14:29:15)

U-Boot SPL 2014.10-rc2-00001-g9f88c9e (Dec 01 2014 - 14:29:15)
[0000.000] [TegraBoot] (version UNDEF_BUILD)
[0000.004] Reset reason: power on reset
[0000.008] Processing in recovery mode
[0000.011] Established communication link with host
[0000.252] Downloaded bct successfully 
[0000.255] No Battery Present
[0000.259] Sdram initialization is successful 
[0000.270] Downloaded DTB successfully 
[0000.296] No Battery Present
[0000.367] Downloaded bootloader successfully 
[0000.371] CPU-bootloader entry address: 0x83d88000 
[0000.375] BoardId: 375
[0000.377] Vpr Carveout Base=0x0f4600000 Size=0x00ba00000
[0000.383] Tsec Carveout Base=0x0f2600000 Size=0x002000000
[0000.388] Lp0 Carveout Base=0x0f25ff000 Size=0x000001000
[0000.393] Xusb Carveout Base=0x0f2300000 Size=0x000200000
[0000.398] Platform-DebugCarveout: 0
[0000.426] NvTbootI2cWrite(): error code 0x00045100 Error while starting write transaction
[0000.434] NvTbootI2cDeviceWrite(): error code 0x00045001 Error while writing
[0000.440] NvTbootI2c: Read failed for slave 0x80, offset 0x00 with error code 0x00045001
[0000.448] FAILURE in NvTbootConfigureCpu
[0000.452] Error is 45001

May be the error codes here can give us a clue but I have not been able to find a reference to the NvTbootI2c function. It looks like there is a problem with a I2c write and or read to some device. My suspicion is that there is some left over data in the eMMC from R21.2 which was the last version I was using before all the trouble. This allows uboot to send out the prompt and then goes out to lunch. Because at one stage I tried to go back to R19.3 which should have over written the uboot with fastboot but this did not result in a change, I still got the uboot prompt.

Hope this helps.

Still checking on error codes and ways to verify eMMC content issues, but I believe you are correct about old data remaining with write errors preventing full update. Everything I see says hardware error, I’m just hoping to find a definitive “smoking gun”.

Thanks for looking into it Linuxdev, here are the bootloader error codes:

/** common error codes */
0x00000000, “success”)
0x00000001, “method or interface is not implemented”)
0x00000002, “requested operation is not supported”)
0x00000003, “method or interface is not initialized”)
0x00000004, “bad parameter to method or interface”)
0x00000005, “not completed in the expected time”)
0x00000006, “insufficient system memory”)
0x00000007, “cannot write a read-only attribute”)
0x00000008, “module is in invalid state to perform the requested operation”)
0x00000009, “invalid address”)
0x0000000A, “invalid size”)
0x0000000B, “illegal value specified for parameter”)
0x0000000E, “busy, try again”)
0x000a000E, “hw module is not peresent”)
0x0000000F, “clock, power, or pinmux resource error”)
0x00000010, “read from the device failed”)
0x00000011, “access to NULL Pointer”)
0x00000012, “Image validation failure”)
0x00000013, “Image not found failure”)
0x00000014, “Buffer is corrupted”)

/* nv3p error codes */
0x00120000, “unrecoverable protocol error”)
0x00120001, “bad packet type”)
0x00120002, “packet was nacked”)
0x00120003, “bad receive length”)
0x00120004, “bad return data”)

/** Error code related to configurations **/
0x00030007, “the configuration variable is corrupted”)

/* I2c error codes */
0x00045000, “Failed to read data through I2C”)
0x00045001, “Failed to write data through I2C”)
0x00045003, “Slave Device Not Found”)
0x00045004, “The controller reports the error during transaction like fifo overrun, underrun”)
0x00045005, “Master does not able to get the control of bus”)
0x00045100, “I2c slave not started”)
0x00045101, “I2c slave is already started on this channel”)
0x00045102, “I2c slave tx buffer full and no space for writing any new data”)
0x00045103, “I2c slave write (master read) is in progress”)
0x00045104, “I2c slave write has not been started yet”)

/* usbf error codes */
0x001D0001, “usbf tranfer failed”)
0x001D0002, “usbf endPoint not configured”)
0x001D0003, “usbf not configured”)
0x001D0004, “usbf cable disconnected”)
0x001D0005, “usbf ep status not configured”)
0x001D0006, “usbf ep status stalled”)
0x001D0007, “usbf cable not connected”)
0x001D0008, “usbf controller not enabled”)
0x001D0009, “usbf buffer not alinged”)
0x001D000A, “usbf endpoint accessed is more eps in contlr”)

/*se error codes */
0x001D0010, “Inconsistency in verification during RsaPss”)
0x001D0011, “Hash Mismatch”)

0x00845101, “GPT Signature not matching”)
0x00845102, “GPT Header Is invalid”)
0x00845104, “GPT LBAs are Invalid”)
0x00845108, “GPT Invalid Header CRC”)
0x00845208, “GPT Partition Not Found”)

Thanks for the info Shervin!

There’s the i2c slave not started error, and failed to write (looks like your suspicions were correct).

I have thought of a way to at least test read functionality of the eMMC. Here’s an article on cloning eMMC, take a look at that, note the ability to clone different partitions:
http://elinux.org/Jetson/Cloning

This does not test write ability, but you could test the 3pserver (option -bl ardbeg/fastboot.bin) and eMMC read. Either try to clone all, or perhaps clone one partition at a time. Not definitive since read might still work while write fails. This also explains why fastboot.bin is downloaded even under u-boot (see the -bt option), as this is used to kick start the 3pserver which u-boot can’t do (but recovery mode being useful likely requires it…I wouldn’t mind knowing more about the 3pserver).

If you want to spend some time at it, you could save an original system.img.raw used in a failed flash, and compare it to a cloned system.img.raw (the clone article is from R19.x series and is out of date, you’ll have to adjust for R21.x which turned the R19.x system.img into system.img.raw).

Thanks to both linuxdev and ShervinE for the time and help in this problem. Its appreciated.

The errors I am getting seem to all relate to the i2c area.

I carried out the cloning commands just now and here are the results. First from the serial coonsole after first putting the tk1 into recovery mode.

[fc007@Fedora11 bootloader]$ sudo ./nvflash --getpartitiontable table --bl ardbeg/fastboot.bin --go
Nvflash 4.13.0000 started
BR_CID: 0x34001001740970422400000003fd0100
rcm version 0X400001
System Information:
   chip name: unknown
   chip id: 0x40 major: 1 minor: 1
   chip sku: 0x0
   chip uid: 0x00000001740970422400000003fd0100
   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
downloading bootloader -- load address: 0x83d88000 entry point: 0x83d88000
sending file: ardbeg/fastboot.bin
- 594363/594363 bytes sent
ardbeg/fastboot.bin sent successfully
waiting for bootloader to initialize
bootloader failed NvError 0x0
command failure/warning: bootloader download failed (bad data)
bootloader status: device failure (code: 2) message:  flags: 0

[fc007@Fedora11 bootloader]$

and now the output from the recovery port at the same time as the above.

U-Boot SPL 2014.10-rc2-00001-g9f88c9e (Dec 01 2014 - 14:29:15)
[0000.000] [TegraBoot] (version UNDEF_BUILD)
[0000.004] Reset reason: power on reset
[0000.008] Processing in recovery mode
[0000.011] Established communication link with host
[0000.248] No Battery Present
[0000.252] Sdram initialization is successful 
[0000.324] Downloaded bootloader successfully 
[0000.328] CPU-bootloader entry address: 0x83d88000 
[0000.332] BoardId: 375
[0000.335] Vpr Carveout Base=0x0f4600000 Size=0x00ba00000
[0000.340] Tsec Carveout Base=0x0f2600000 Size=0x002000000
[0000.345] Lp0 Carveout Base=0x0f25ff000 Size=0x000001000
[0000.350] Xusb Carveout Base=0x0f2300000 Size=0x000200000
[0000.355] Platform-DebugCarveout: 0
[0000.384] NvTbootI2cWrite(): error code 0x00045100 Error while starting write transaction
[0000.392] NvTbootI2cDeviceWrite(): error code 0x00045001 Error while writing
[0000.398] NvTbootI2c: Read failed for slave 0x80, offset 0x00 with error code 0x00045001
[0000.406] FAILURE in NvTbootConfigureCpu
[0000.410] Error is 45001

it seems the i2c can be found but not initialised, as a result no read or write capability.

So looks like the i2c bus has gone out to lunch with a hardware problem? What do you thing I should do to resolve this?

It would be RMA time. See these lines:

ardbeg/fastboot.bin sent successfully
waiting for bootloader to initialize
bootloader failed NvError 0x0
command failure/warning: bootloader download failed (bad data)

If you look at the option info for nvflash’s “-bl” you’ll see that this is for starting the mysterious “3pserver” on the Jetson…which seems to be how the Jetson end responds to commands. On a working Jetson you’d provide this option with fastboot.bin even when installing u-boot.bin; trying to use u-boot.bin here would lock up and never complete, waiting forever for Jetson to respond. If this can’t be started, no flash can ever succeed. I believe the board cannot be salavaged.