Jetpack 4.5.1, TX2, BUG : FDT selected file loaded incorrectly by uboot

hello JerryChang,

how can I update the kernel-dtb partition with my dtb file from within the linux running on my devkit ? I know I must overwrite /dev/mmcblk0p30 and perhaps also /dev/mmcblk0p31, but I don’t know how to produce the exact content I must write there.

This is only for the purpose of the test you asked.

Actually I would like not need to change the kernel-dtb partitions when I switch the daughter-board on my devkit. That used to work with jetpack-4.3.

Later…
I have now found and used this tool nv-tegra-sign/sign.py https://github.com/kmartin36/nv-tegra-sign/ to produce a signed version of my dtb file, and I have copied the signed version to the kernel-dtb partition using

sudo dd if=/tmp/dtbfile.signed of=/dev/mmcblk0p30

The following messages still appear

## Flattened Device Tree blob at 88400000
   Booting using the fdt blob at 0x88400000
ERROR: reserving fdt memory region failed (addr=0 size=0)
ERROR: reserving fdt memory region failed (addr=0 size=0)
ERROR: reserving fdt memory region failed (addr=0 size=0)
   Using Device Tree in place at 0000000088400000, end 0000000088442f3e
copying carveout for /host1x@13e00000/display-hub@15200000/display@15200000...
copying carveout for /host1x@13e00000/display-hub@15200000/display@15210000...
copying carveout for /host1x@13e00000/display-hub@15200000/display@15220000...

but in linux, my dtb file is not garbled anymore. This is clearly a bug in the way uboot uses the FDT entry now in jetpack-4.5.1, a bug that did not trigger for me with jetpack-4.3.

If I now try to boot with the original base dtb, I get similar errors as with the reverse case :

nvidia@devkit-jp451:~$ dtc -I fs /proc/device-tree
<stdout>: ERROR (explicit_phandles): /host1x/nvcsi@150c0000/channel@5 has duplicated phandle 0x166 (seen before at /reserved-memory/ramoops_carveout)
<stdout>: ERROR (explicit_phandles): /host1x/vi@15700000/ports/port@3/endpoint has duplicated phandle 0x6d (seen before at /reserved-memory/fb0_carveout)
<stdout>: ERROR (explicit_phandles): /host1x/vi@15700000/ports/port@4/endpoint has duplicated phandle 0x6f (seen before at /reserved-memory/fb2_carveout)
<stdout>: ERROR (explicit_phandles): /i2c@3180000/tca9548@77/i2c@4/imx219_e@10/ports/port@0/endpoint has duplicated phandle 0x6e (seen before at /reserved-memory/fb1_carveout)
<stdout>: ERROR (explicit_phandles): /pmc@c360000/hdmi-dp1-dpd-disable has duplicated phandle 0x83 (seen before at /reserved-memory/vpr-carveout)
ERROR: Input tree has errors, aborting (use -f to force output)
nvidia@devkit-jp451:~$