Device tree doesn't flash on tx2

Hello All,

I was developed custom camera device driver.

I’m was upgrade sdkmager1.4.0.7363 ( jetPack 4.5 from 4.4.1 )
I was install jetPack4.5 on Jetson Tx2.

and then i added device tree files (dtb) for custom device.

  1. device tree compile
  2. copy to Linux_for_Tegra/kernel/dtb
  3. run flash.sh in Linux_for_Tegra folder

I flashed dtb files using flash.sh as shown below.
sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

flash fusing was abnormal progress as shown below.

jpchae@ubuntu:~/Linux_for_Tegra$ sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1
###############################################################################
# L4T BSP Information:
# R32 , REVISION: 5.0
###############################################################################
# Target Board Information:
# Name: jetson-tx2, Board Family: t186ref, SoC: Tegra 186, 
# OpMode: production, Boot Authentication: NS, 
# Disk encryption: disabled ,
###############################################################################
./tegraflash.py --chip 0x18 --applet "/home/jpchae/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin" --skipuid --cmd "dump eeprom boardinfo cvm.bin" 
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.0017 ] Generating RCM messages
[   0.0027 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm /home/jpchae/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin 0 0
[   0.0034 ] RCM 0 is saved as rcm_0.rcm
[   0.0042 ] RCM 1 is saved as rcm_1.rcm
[   0.0046 ] List of rcm files are saved in rcm_list.xml
[   0.0053 ] 
[   0.0053 ] Signing RCM messages
[   0.0066 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0077 ] Assuming zero filled SBK key
[   0.0116 ] 
[   0.0116 ] Copying signature to RCM mesages
[   0.0124 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[   0.0189 ] 
[   0.0189 ] Boot Rom communication
[   0.0199 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml --skipuid
[   0.0206 ] RCM version 0X180001
[   0.1306 ] Boot Rom communication completed
[   1.1494 ] 
[   2.1550 ] tegrarcm_v2 --isapplet
[   2.1569 ] Applet version 01.00.0000
[   2.3069 ] 
[   2.3119 ] Retrieving EEPROM data
[   2.3125 ] tegrarcm_v2 --oem platformdetails eeprom cvm /home/jpchae/Linux_for_Tegra/bootloader/cvm.bin
[   2.3169 ] Applet version 01.00.0000
[   2.5951 ] Saved platform info in /home/jpchae/Linux_for_Tegra/bootloader/cvm.bin
[   2.7418 ] 
Board ID(3310) version(D00) sku(1000) revision(J.0)
creating dummy /home/jpchae/Linux_for_Tegra/bootloader/badpage.bin
1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.000279875 s, 14.6 MB/s
Copy /home/jpchae/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb to /home/jpchae/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb.rec
copying bctfile(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/P3310_A00_8GB_lpddr4_A02_l4t.cfg)... done.
copying misc_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-misc-si-l4t.cfg)... done.
copying pinmux_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg)... done.
copying pmic_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg)... done.
copying pmc_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg)... done.
copying prod_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg)... done.
copying scr_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/minimal_scr.cfg)... done.
copying scr_cold_boot_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/mobile_scr.cfg)... done.
copying bootrom_config(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg)... done.
copying dev_params(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/BCT/emmc.cfg)... done.
Existing bootloader(/home/jpchae/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
copying initrd(/home/jpchae/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
Making Boot image... done.
/home/jpchae/Linux_for_Tegra/bootloader/tegraflash.py  --chip 0x18 --key  --cmd sign boot.img
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.0003 ] Generating signature
[   0.0012 ] tegrasign_v2 --key  --getmode mode.txt
[   0.0019 ] Assuming zero filled SBK key
[   0.0042 ] 
[   0.0043 ] sign_type   : 0
[   0.0043 ] header_magic: 414e4452
[   0.0055 ] tegrahost_v2 --chip 0x18 --align 1_boot.img
[   0.0086 ] 
[   0.0095 ] tegrahost_v2 --appendsigheader 1_boot.img zerosbk
[   0.0110 ] 
[   0.0127 ] tegrasign_v2 --key  --list 1_boot_sigheader.img_list.xml --pubkeyhash pub_key.key
[   0.0133 ] Assuming zero filled SBK key
[   0.0247 ] 
[   0.0255 ] tegrahost_v2 --updatesigheader 1_boot_sigheader.img.encrypt 1_boot_sigheader.img.hash zerosbk
[   0.0273 ] 
[   0.0278 ] Signed file: /home/jpchae/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
l4t_sign_image.sh: Generate header for boot_sigheader.img.encrypt
l4t_sign_image.sh: chip 0x18: Don't need to do anything
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for boot_sigheader.img.encrypt
l4t_sign_image.sh: the signed file is /home/jpchae/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
done.
Making recovery ramdisk for recovery image...
Re-generating recovery ramdisk for recovery image...
~/Linux_for_Tegra/bootloader/ramdisk_tmp ~/Linux_for_Tegra/bootloader ~/Linux_for_Tegra
30402 blocks
_BASE_KERNEL_VERSION=4.9.201-tegra
~/Linux_for_Tegra/bootloader/ramdisk_tmp/lib ~/Linux_for_Tegra/bootloader/ramdisk_tmp ~/Linux_for_Tegra/bootloader ~/Linux_for_Tegra
65752 blocks
Making Recovery image...
copying recdtbfile(/home/jpchae/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb.rec)... done.
20+0 records in
20+0 records out
20 bytes copied, 0.000129792 s, 154 kB/s
Existing sosfile(/home/jpchae/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin) reused.
copying tegraboot(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/nvtboot.bin)... done.
Existing cpu_bootloader(/home/jpchae/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
Existing mb2blfile(/home/jpchae/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
Existing mtspreboot(/home/jpchae/Linux_for_Tegra/bootloader/preboot_d15_prod_cr.bin) reused.
Existing mts(/home/jpchae/Linux_for_Tegra/bootloader/mce_mts_d15_prod_cr.bin) reused.
Existing mb1file(/home/jpchae/Linux_for_Tegra/bootloader/mb1_prod.bin) reused.
Existing bpffile(/home/jpchae/Linux_for_Tegra/bootloader/bpmp.bin) reused.
copying bpfdtbfile(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb)... done.
Existing scefile(/home/jpchae/Linux_for_Tegra/bootloader/camera-rtcpu-sce.img) reused.
Existing spefile(/home/jpchae/Linux_for_Tegra/bootloader/spe.bin) reused.
Existing drameccfile(/home/jpchae/Linux_for_Tegra/bootloader/dram-ecc.bin) reused.
Existing badpagefile(/home/jpchae/Linux_for_Tegra/bootloader/badpage.bin) reused.
copying wb0boot(/home/jpchae/Linux_for_Tegra/bootloader/t186ref/warmboot.bin)... done.
Existing tosfile(/home/jpchae/Linux_for_Tegra/bootloader/tos-trusty.img) reused.
Existing eksfile(/home/jpchae/Linux_for_Tegra/bootloader/eks.img) reused.
copying dtbfile(/home/jpchae/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb)... done.
Copying nv_boot_control.conf to rootfs
/home/jpchae/Linux_for_Tegra/bootloader/tegraflash.py  --chip 0x18 --key  --cmd sign kernel_tegra186-quill-p3310-1000-c03-00-base.dtb
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.0004 ] Generating signature
[   0.0015 ] tegrasign_v2 --key  --getmode mode.txt
[   0.0024 ] Assuming zero filled SBK key
[   0.0025 ] 
[   0.0026 ] sign_type   : 808464433
[   0.0026 ] header_magic: d00dfeed
[   0.0033 ] tegrahost_v2 --chip 0x18 --align 1_kernel_tegra186-quill-p3310-1000-c03-00-base.dtb
[   0.0040 ] 
[   0.0047 ] tegrahost_v2 --appendsigheader 1_kernel_tegra186-quill-p3310-1000-c03-00-base.dtb zerosbk
[   0.0059 ] 
[   0.0071 ] tegrasign_v2 --key  --list 1_kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[   0.0076 ] Assuming zero filled SBK key
[   0.0168 ] 
[   0.0181 ] tegrahost_v2 --updatesigheader 1_kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt 1_kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.hash zerosbk
[   0.0195 ] 
[   0.0199 ] Signed file: /home/jpchae/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt
l4t_sign_image.sh: Generate header for kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt
l4t_sign_image.sh: chip 0x18: Don't need to do anything
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt
l4t_sign_image.sh: the signed file is /home/jpchae/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt
done.
Reusing existing system.img... 
file does not exist.

what do i need for flashing for device tree?

hello jpchae,

according to below.

$ sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

Reusing existing system.img... 
file does not exist.

had you generate system image before?
you’re using -r options, which skips building system.img and reuse the existing one.
you may exclude it for testing,
thanks

1 Like

Hello JerryChang,

Thank for your help.

as your comment, i removed “-r” option , and then dtb file was flashed.

thanks,