I would like to update dtb file using dd command but have few questions.
kernel-dtb partition is /dev/mmcblk0p25
My dtb file tegra186-quill-p3310-1000-c03-00-base.dtb size is 216866 bytes.
Normally I copy this to Linux_for_Tegra/kernel/dtb and run the flash script to update dtb. This seems to be signing the dtb file and copies it to ‘Linux_for_Tegra/bootloader’.
Now the dtb size increased to 217008 bytes.
Q1. Do we need to do this signing process even if we try to use dd to update dtb file?
I read the kernel-dtb parition using dd,
sudo dd if=/dev/mmcblk0p25 of=tx2_dtb bs=512K count=1
In some other post it was mentioned that kernel-dtb partition is a binary copy of dtb file except that it is padded with zeros with block size of 512.
When I compared the file created using dd and the file in ‘Linux_for_Tegra/bootloadertegra186-quill-p3310-1000-c03-00-base.dtb’, the content matches upto 217008 bytes as expected but the rest of the content are non-zeros.
So if I write dtb file from ‘Linux_for_Tegra/bootloader/tegra186-quill-p3310-1000-c03-00-base.dtb’ with size as 217008, is this enough?
Does this work?
 sudo dd if=Linux_for_Tegra/bootloader/tegra186-quill-p3310-1000-c03-00-base.dtb of=/dev/mmcblk0p25 bs=512 count=1024 conv=sync
 sudo dd if=Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb of=/dev/mmcblk0p25 bs=512 count=1024 conv=sync
I have not yet looked at the dtb format on R28.2, but typically the device tree itself stops at the first NULL byte at the end. After that there may be leftover data from previous content, or some other application may use this data (but the device tree itself would be complete at that point, so the “dtc” utility can convert this to “dts” format and would not care about what goes on after that first NULL byte).
I have never looked at the signing process so I don’t know if signing at the end has any effect or not.
i also used dd in the past . but im working now with L4T 28.2 and the TX wont boot with a device tree, which is copied by dd.
i there a way to fix it? in not able to use the USB Cable and recovery mode. dtb change need to be done OTA via ssh like in the past.
You need to use the flash tool since signing is required. If you were to flash and save the signed version, then dd should work by using this signed version instead of the original dtb which is not signed. I can’t tell you specifics though, I have not tried to do this.