[TX2] Can not flash tx2 any more

Hi,
I replaced dtb with below command:
sudo dd if=tegra186-quill-p3310-1000-c03-00-base.dtb of=/dev/mmcblk0p26

and mmcblk0p26 is check by command: sudo gdisk -l /dev/mmcblk0 | grep -i ‘kernel-dtb’
But when I reboot device, I found it cannot boot up any more, log is attachment uboot_log.txt

So I try to flash to get tx2 refresh, but now I cannot flash tx2, the log file flash_os_tx2.log
Could some give me some suggestion? How can I flash tx2?
Thanks

uboot_log.txt (150 KB)
flash_os_tx2.log (3.34 KB)

In recent releases the partition is signed. “dd” would work, but only if first signed. Details may differ depending on release, but using the flash mechanism to update is one way to sign (in which case I recommend first cloning rootfs if you are concerned about losing it). Some relevant URLs (be careful to note that not all releases are the same):
[url]https://devtalk.nvidia.com/default/topic/1035668/jetson-tx2/how-to-disable-dtb-encryption-of-l4t-28-2/post/5295198/#5295198[/url]
[url]https://devtalk.nvidia.com/default/topic/1036286/jetson-tx1/flashing-just-dtb-on-28-2-and-tx1/post/5264465/#5264465[/url]
[url]https://devtalk.nvidia.com/default/topic/1044313/jetson-tx2/in-system-update-of-propretiary-nvidia-bootloaders/post/5298969/#5298969[/url]

hello flongfei,

according to your flash_os_tx2.log, you’re working with l4t-r28.2.1
please note that this release already signed the device tree partition, you need sign the binary if you need to use dd commands to overwrite that partition.

please refer to Topic 1035668, here’s brief steps for your to update the DTB files without flashing the Jetson device.

  1. build the DTB
  2. replace new DTB files with $OUT/bootloader/tegra186.dtb
  3. generate signed files with tegraflash.py
  4. copy the signed DTB to target device.
  5. replace the kernel-dtb partition (for example, /dev/mmcblk0p26) with dd command.

also, here’s commands to use tegraflash.py to sign the files for your reference.

sudo ./tegraflash.py --bl nvtboot_recovery_cpu.bin  --chip 0x18 --applet mb1_recovery_dev.bin  --cfg flash.xml  --sdram_config P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --sdram_config P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --misc_config tegra186-mb1-bct-misc-si-l4t.cfg --pinmux_config tegra186-mb1-bct-pinmux-quill-p3310-1000-a00.cfg --pmic_config tegra186-mb1-bct-pmic-quill-p3310-1000-a00.cfg --pmc_config tegra186-mb1-bct-pad-quill-p3310-1000-a00.cfg --prod_config tegra186-mb1-bct-prod-quill-p3310-1000-a00.cfg --scr_config minimal_scr.cfg --scr_cold_boot_config mobile_scr.cfg --br_cmd_config tegra186-mb1-bct-bootrom-quill-p3310-1000-a00.cfg --dev_params emmc.cfg  --cfg  flash.xml --bins "mb2_bootloader nvtboot_recovery.bin; mts_preboot preboot_d15_dev_cr.bin; mts_bootpack mce_mts_d15_dev_cr.bin; bpmp_fw bpmp.bin; bpmp_fw_dtb tegra186-a02-bpmp-quill-p3310-1000-a00-00-te770d-ucm2.dtb; tlk tos.img; eks eks.img; bootloader_dtb tegra186-quill-p3310-1000-a00-00-base.dtb"  --cmd "sign"

Thank you linuxdev and JerryChang, it works now.

By the Way, is there any way to flash tx2 with sdcard instead of connectting to pc host using jetpack?
I want to fulfill flash tx2 automatically when connect sd card.
Is there related instruction?
Thanks

hello flongfei,

since your issue already resolved, I would suggest you file another new topic if you have another issue/request.
please refer to public release documentation, check Flashing and Booting the Target Device to use rootfs with external SDCARD. thanks

Just the short answer: No. This would require massive customization and perhaps require a very low level knowledge.

@JerryChang, I tried to sign dtb, but seems cannot find mb1_recovery_dev.bin, any I cannot find mb1_recovery_dev.bin anywhere.
May I ask is mb1_recovery_dev.bin compiled somewhere? How to compile it?
here is output info

flongfei@ubuntu:~/jetpack-3.3/64_TX2/Linux_for_Tegra/bootloader$ sudo ./tegraflash.py --bl nvtboot_recovery_cpu.bin  --chip 0x18 --applet mb1_recovery_dev.bin  --cfg flash.xml  --sdram_config P3310_c03_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --sdram_config P3310_c03_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --misc_config tegra186-mb1-bct-misc-si-l4t.cfg --pinmux_config tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg --pmic_config tegra186-mb1-bct-pmic-quill-p3310-1000-c03.cfg --pmc_config tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg --prod_config tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg --scr_config minimal_scr.cfg --scr_cold_boot_config mobile_scr.cfg --br_cmd_config tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg --dev_params emmc.cfg  --cfg  flash.xml --bins "mb2_bootloader nvtboot_recovery.bin; mts_preboot preboot_d15_dev_cr.bin; mts_bootpack mce_mts_d15_dev_cr.bin; bpmp_fw bpmp.bin; bpmp_fw_dtb tegra186-a02-bpmp-quill-p3310-1000-c03-00-te770d-ucm2.dtb; tlk tos.img; eks eks.img; bootloader_dtb tegra186-quill-p3310-1000-c03-00-base.dtb"  --cmd "sign"
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.0124 ] tegrasign_v2 --key None --getmode mode.txt
[   0.0146 ] Assuming zero filled SBK key
[   0.0146 ] 
[   0.0148 ] Generating RCM messages
[   0.0165 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 --download rcm mb1_recovery_dev.bin 0 0
[   0.0202 ] File mb1_recovery_dev.bin open failed
[   0.0203 ] Cannot create RCM messages
[   0.0203 ] 
Error: Return value 19
Command tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 --download rcm mb1_recovery_dev.bin 0 0
flongfei@ubuntu:~/jetpack-3.3/64_TX2/Linux_for_Tegra/bootloader$

@linuxdev, thanks for your instruction, I will only try to update dtb, bootloader, kernel.

hello flongfei,

you should correct the input parameters to compatible with your environment, the mostly effective way is running dtb update with device connected via flash script and checking flashing message in detail.
for example,
execute below command, which is the formal steps to update dtb.

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

then, checking the messages and update the tegra flash parameters accordingly.
for example, you might see the message shown as below.

*** Updating [kernel-dtb] with tegra186-quill-p3310-1000-c03-00-base.dtb ***
./tegraflash.py --bl nvtboot_recovery_cpu.bin  --chip 0x18 ...

since you would like to sign the binaries without flashing the target.
you should update tegraflash command, modify parameters after --cmd as below.

sudo ./tegraflash.py --bl nvtboot_recovery_cpu.bin  --chip 0x18 ... --cmd "sign"

if you run the process without failures, you’ll found these signed binaries save to your host locally.

$OUT/Linux_for_Tegra/bootloader/signed

@JerryChang, I can sign and manually dd kernel-dtb with your instruction now.
Thanks for your support!