Flashing just DTB on 28.2 and TX1

I can’t seem to update just the DTB file on my TX1 board since updating to R28.2 using the flash.sh utility. Flashing the entire kernel works fine and my DTB takes effect.

To flash just the DTB, I am using the command:

sudo ./flash.sh -r -k DTB jetson-tx1 mmcblk0p1

I can confirm the flash.sh script is looking for my DTB file because if I remove that file, the flash script fails. I can confirm an older DTB file is being used on the TX1 system by reading the dmesg log after it boots. I can confirm the compiled DTB file I’m creating has the changes I implemented by decompiling it with DTC. I can confirm this command works fine on JetPack3.1 / R28.1.

It says it flashes the DTB partition, but it just either isn’t flashing or it isn’t using that DTB file on the system during boot.

Here’s what is printed when running the flash command above:

###############################################################################
# L4T BSP Information:
# R28 (release), REVISION: 2.0, GCID: 10567845, BOARD: t210ref, EABI: aarch64, 
# DATE: Fri Mar  2 04:58:16 UTC 2018
###############################################################################
# Target Board Information:
# Name: jetson-tx1, Board Family: t210ref, SoC: Tegra 210, 
# OpMode: production, Boot Authentication: , 
###############################################################################
copying bctfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/t210ref/BCT/P2180_A00_LP4_DSC_204Mhz.cfg)... done.
copying bootloader(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
	populating kernel to rootfs... done.
	populating initrd to rootfs... done.
	populating extlinux.conf.emmc to rootfs... done.
	populating /home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/kernel/dtb/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb to rootfs... done.
done.
Making Boot image... done.
copying bcffile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/t210ref/cfg/board_config_p2597-devkit.xml)... done.
Existing sosfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
copying tegraboot(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/t210ref/nvtboot.bin)... done.
Existing bpffile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/bpmp.bin) reused.
copying wb0boot(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/t210ref/warmboot.bin)... done.
Existing tosfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/tos.img) reused.
Existing eksfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/eks.img) reused.
copying dtbfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/kernel/dtb/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb)... done.
Reusing existing system.img... 
done.
Existing tbcfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
copying tbcdtbfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/kernel/dtb/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb)... done.
copying cfgfile(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/t210ref/cfg/gnu_linux_tegraboot_emmc_full.xml) to flash.xml... done.
creating gpt(ppt.img)... 

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

*** PARTITION LAYOUT(24 partitions) ***
[     BCT] BH            0         8191       4.0MiB 
[     NVC] BH         8192        16383       4.0MiB nvtboot.bin
[     PPT] UH            0         4095       2.0MiB 
[     GP1] UH         4096         8191       2.0MiB 
[     APP] UH         8192     29368319   14336.0MiB system.img
[     TBC] UV     29368320     29372415       2.0MiB nvtboot_cpu.bin
[     EBT] UV     29372416     29380607       4.0MiB cboot.bin
[     BPF] UV     29380608     29384703       2.0MiB bpmp.bin
[     WB0] UV     29384704     29396991       6.0MiB warmboot.bin
[     RP1] UV     29396992     29405183       4.0MiB tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
[     TOS] UV     29405184     29417471       6.0MiB tos.img
[     EKS] UV     29417472     29421567       2.0MiB eks.img
[      FX] UV     29421568     29425663       2.0MiB 
[     BMP] UV     29425664     29687807     128.0MiB bmp.blob
[     SOS] UV     29687808     29728767      20.0MiB 
[     EXI] UV     29728768     29859839      64.0MiB 
[     LNX] UV     29859840     29990911      64.0MiB boot.img
[     DTB] UV     29990912     29999103       4.0MiB tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
[     NXT] UV     29999104     30003199       2.0MiB 
[     MXB] UV     30003200     30015487       6.0MiB 
[     MXP] UV     30015488     30027775       6.0MiB 
[     USP] UV     30027776     30031871       2.0MiB 
[     UDA] UV     30031872     61067263   15154.0MiB 
[     GPT] UH     61067264     61071359       2.0MiB 
copying flasher(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
Existing flashapp(/home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/tegraflash.py) reused.
*** Updating [DTB] with tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb ***
./tegraflash.py --bl cboot.bin --bldtb tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb  --chip 0x21 --applet nvtboot_recovery.bin  --cfg flash.xml  --bct  P2180_A00_LP4_DSC_204Mhz.cfg --bct  P2180_A00_LP4_DSC_204Mhz.cfg  --cfg  flash.xml   --cmd "sign; write DTB ./signed/tegra210-jetson-tx1-p2597-2180-a01-devkit_sigheader.dtb.encrypt; reboot" --skipuid 
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.0095 ] Generating RCM messages
[   0.0109 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 --download rcm nvtboot_recovery.bin 0 0
[   0.0121 ] RCM 0 is saved as rcm_0.rcm
[   0.0128 ] RCM 1 is saved as rcm_1.rcm
[   0.0128 ] List of rcm files are saved in rcm_list.xml
[   0.0128 ] 
[   0.0128 ] Signing RCM messages
[   0.0141 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0153 ] Assuming zero filled SBK key
[   0.0250 ] 
[   0.0251 ] Copying signature to RCM mesages
[   0.0265 ] tegrarcm --chip 0x21 --updatesig rcm_list_signed.xml
[   0.0285 ] 
[   0.0285 ] Parsing partition layout
[   0.0300 ] tegraparser --pt flash.xml.tmp
[   0.0319 ] 
[   0.0320 ] Creating list of images to be signed
[   0.0335 ] tegrahost --chip 0x21 --partitionlayout flash.xml.bin --list images_list.xml
[   0.0409 ] 
[   0.0409 ] Generating signatures
[   0.0424 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.0439 ] Assuming zero filled SBK key
[   0.1293 ] 
[   0.1294 ] Generating br-bct
[   0.1309 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.cfg --chip 0x21
[   0.1326 ] Copying Sdram info from 1 to 2 set
[   0.1375 ] Copying Sdram info from 2 to 3 set
[   0.1376 ] 
[   0.1376 ] Updating boot device parameters
[   0.1390 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatedevparam flash.xml.bin
[   0.1404 ] Warning: No sdram params
[   0.1406 ] 
[   0.1406 ] Updating bl info
[   0.1424 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.1449 ] 
[   0.1450 ] Updating secondary storage information into bct
[   0.1466 ] tegraparser --pt flash.xml.bin --chip 0x21 --updatecustinfo P2180_A00_LP4_DSC_204Mhz.bct
[   0.1487 ] 
[   0.1487 ] Get Signed section bct
[   0.1503 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --listbct bct_list.xml
[   0.1522 ] 
[   0.1523 ] Signing BCT
[   0.1554 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.1573 ] Assuming zero filled SBK key
[   0.1583 ] 
[   0.1583 ] Updating BCT with signature
[   0.1598 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatesig bct_list_signed.xml
[   0.1619 ] 
[   0.1620 ] Copying signatures
[   0.1635 ] tegrahost --chip 0x21 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   0.1653 ] Run tegrabct to update tboot signature in bct
[   0.1716 ] 
[   0.1717 ] Copying signed file in /home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/signed
[   0.1902 ] Generating RCM messages
[   0.1920 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 --download rcm nvtboot_recovery.bin 0 0
[   0.1936 ] RCM 0 is saved as rcm_0.rcm
[   0.1950 ] RCM 1 is saved as rcm_1.rcm
[   0.1952 ] List of rcm files are saved in rcm_list.xml
[   0.1952 ] 
[   0.1952 ] Signing RCM messages
[   0.1972 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.1989 ] Assuming zero filled SBK key
[   0.2105 ] 
[   0.2106 ] Copying signature to RCM mesages
[   0.2125 ] tegrarcm --chip 0x21 --updatesig rcm_list_signed.xml
[   0.2144 ] 
[   0.2145 ] Boot Rom communication
[   0.2165 ] tegrarcm --chip 0x21 --rcm rcm_list_signed.xml --skipuid
[   0.2178 ] RCM version 0X210001
[   0.2660 ] Boot Rom communication completed
[   1.2728 ] 
[   1.2729 ] Parsing partition layout
[   1.2756 ] tegraparser --pt flash.xml.tmp
[   1.2784 ] 
[   1.2785 ] Creating list of images to be signed
[   1.2805 ] tegrahost --chip 0x21 --partitionlayout flash.xml.bin --list images_list.xml
[   1.2891 ] 
[   1.2892 ] Generating signatures
[   1.2915 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   1.2935 ] Assuming zero filled SBK key
[   1.3849 ] 
[   1.3849 ] Send BCT from Host
[   1.3850 ] Generating br-bct
[   1.3862 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.cfg --chip 0x21
[   1.3876 ] Copying Sdram info from 1 to 2 set
[   1.3925 ] Copying Sdram info from 2 to 3 set
[   1.3925 ] 
[   1.3926 ] Updating boot device parameters
[   1.3942 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatedevparam flash.xml.bin
[   1.3957 ] Warning: No sdram params
[   1.3961 ] 
[   1.3962 ] Updating bl info
[   1.3978 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   1.3999 ] 
[   1.4000 ] Updating secondary storage information into bct
[   1.4015 ] tegraparser --pt flash.xml.bin --chip 0x21 --updatecustinfo P2180_A00_LP4_DSC_204Mhz.bct
[   1.4033 ] 
[   1.4034 ] Get Signed section bct
[   1.4050 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --listbct bct_list.xml
[   1.4069 ] 
[   1.4069 ] Signing BCT
[   1.4103 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   1.4119 ] Assuming zero filled SBK key
[   1.4130 ] 
[   1.4131 ] Updating BCT with signature
[   1.4150 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatesig bct_list_signed.xml
[   1.4172 ] 
[   1.4173 ] Sending BCTs
[   1.4190 ] tegrarcm --download bct P2180_A00_LP4_DSC_204Mhz.bct
[   1.4207 ] Applet version 00.01.0000
[   1.4391 ] Sending bct
[   1.4393 ] [................................................] 100%
[   1.5604 ] 
[   1.5605 ] Sending bootloader and pre-requisite binaries
[   1.5631 ] tegrarcm --download ebt cboot.bin 0 0 --download rp1 tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb 0
[   1.5653 ] Applet version 00.01.0000
[   1.5832 ] Sending ebt
[   1.5836 ] [................................................] 100%
[   1.6735 ] Sending rp1
[   1.6740 ] [................................................] 100%
[   1.7689 ] 
[   1.7712 ] tegrarcm --boot recovery
[   1.7731 ] Applet version 00.01.0000
[   1.7955 ] 
[   1.7956 ] Writing partition
[   1.7977 ] tegradevflash --write DTB /home/ubuntu/Downloads/JetPack3.2/64_TX1/Linux_for_Tegra/bootloader/signed/tegra210-jetson-tx1-p2597-2180-a01-devkit_sigheader.dtb.encrypt
[   1.7997 ] Cboot version 00.01.0000
[   2.4834 ] Nothing to write
[   2.4835 ] 
[   2.4836 ] Coldbooting the device
[   2.4862 ] tegradevflash --reboot coldboot
[   2.4883 ] Cboot version 00.01.0000
[   2.4907 ] 
*** The [DTB] has been updated successfully. ***

Hi Undertow10,

It’s known issue, and being fixed at next release, before that, please try the commend as temporary solution: https://devtalk.nvidia.com/default/topic/1031374/jetson-tx1/how-to-update-only-dtb-in-r28-2/post/5247510/#5247510

Thanks for the reply.

sudo ./flash.sh -r -d <device tree> jetson-tx1 mmcblk0p1

Using this command flashes the entire system.img, overwriting my entire system. This makes development almost impossibly slow. What release do you expect this to be fixed in, and when is that getting published? I noticed there is a 28.2.1 in the git repo now, which I didn’t see a few days ago, but that still doesn’t fix the problem.

Is there any other work-around that doesn’t require burning the entire system image and overwriting everything?

This also makes me hesitant to even do any work on 28.2. The update from JetPack 3.1 to 3.2 broke almost all of our customizations needed to make our device work. The entire CSI camera structure changed significantly. If we get everything working on 28.2, all of our effort could be thrown out the window with the next release. What’s the real solution here? Is nvidia not planning to support the TX1 properly in future releases? Should we stick with JetPack3.1 forever if we plan to use the TX1?

hello Undertow10

there’s workaround to fix the DTB partition partial update failure,
please have modification as below to update the flash script.

diff --git a/scripts/flash.sh b/scripts/flash.sh
index 1d81690..63614d3 100755
--- a/scripts/flash.sh
+++ b/scripts/flash.sh
@@ -1815,7 +1815,11 @@ if [ "${target_partname}" != "" ]; then
        MBP) target_partfile="${mtsname}"; ;;
        BPF) target_partfile="${bpffilename}"; ;;
        APP) target_partfile="${localsysfile}"; ;;
-       DTB|RP1) target_partfile="${dtbfilename}";
+       DTB) target_partfile="${dtbfilename}";
+            need_sign=1;
+            sigext=dtb;
+            ;;
+       RP1) target_partfile="${dtbfilename}";
             need_sign=1;

and you should be able to update the DTB partition only with flash.sh as below command,

sudo ./flash.sh -r -k DTB jetson-tx1 mmcblk0p1

Hello,

I facing some difficulties while flashing. I am using Jetson tx2i module with jetpack 4.3 and l4t tag is tegra-l4t-r32.3.1
I’m requesting you to please share me flashing commands for
I know whole thing flash command $ sudo ./flash.sh jetson-tx2i mmcblk0p1
what is command for only update bootloader (BCT and .bin)
what is command for only update kernel Image and DTB? it is correct (sudo ./flash.sh -r -k kernel-dtb jetson-tx2i mmcblk0p1)
what is command for no_rootfs but update everything expect rootfs.
please help out me from this.
thank you
Parashuram