Update FDT

I needed to fit my device tree file I copied the new DTB file to my sdcard and stop the boot process.
Enter the following commands

  1. run setupdate
  2. run prepare_ubi
  3. run update_fdt

It looks good, but after reboot the uboot can’t load the kernel. I get the following message:

  • Read 0 bytes from volume kernel to 81000000
  • Read 0 bytes from volume dtb to 82000000
  • Bad Linux ARM zImage magic!

Why it isn’t possible to update only the FDT?

The steps to properly prepare an SD card for this method are outlined here: https://developer.toradex.com/knowledge-base/flashing-linux-on-vybrid-modules . Also for reference the instructions on updating an image:https://developer.toradex.com/knowledge-base/build-u-boot-and-linux-kernel-from-source-code#iMX_7_and_Vybrid_Based_Modules_V26_and_newer .

Please confirm if these steps work for you.

FDT located at UBI partition named “dtb
It’s accessible from Linux and can be updated using

ubiupdatevol <dev_name> <dtb file>

Usually, for DTB the dev_name is /dev/ubi0_1
You can check it by ubinfo /dev/ubi command

FDT can be also updated using U-Boot

 # ubi part ubi
 # fatload mmc 0:1 ${fdt_addr_r} <fdt_file>   
 # ubi write ${loadaddr} m4firmware <filesize>

When you do FDT debugging you can update a bootscript to load Device Tree directly from MMC card.
Please see ubiboot and sdboot environment variables

Thank you, very much.

You are welcome. Thanks for the feedback.