How to flash only device tree to eMMC in i.MX93

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to flash only device tree to eMMC in i.MX93

2,297 Views
imahgin
Contributor III

Hi there,

I've successfully built Yocto with latest available BSP -I'm using the A1 SOC- and used uuu to flash the entire image into eMMC with the following command:

 

sudo ~/mfgtools/uuu/uuu -b emmc_all fsl-image.wic.zst/*

 

As now I'm creating a custom board I'll be playing with custom dts, so my question is, if there is some way to flash only the compiled device tree without having to flash the entire image? This will help me to speed up the testing process with the device tree modifications.

Not sure if I have to create my own lst or clst file

Thks

0 Kudos
Reply
4 Replies

2,246 Views
imahgin
Contributor III

Thks @Chavira

I guess I need to enter into fastboot to be able to write into mmc.
In this case, when I run the following command

sudo ~/mfgtools/uuu/uuu -v -b fat_write imx93-6.1.36+git999-r0-imx93-var-som-20240131152844.dtb mmc 0:1 imx93.dtb

I can see in the fastboot console

Starting download of 60492 bytes
downloading of 60492 bytes finished

But the following error is issued from the host CLI

Wait for Known USB Device Appear...
New USB Device Attached at 3:3
New USB Device Attached at 3:3
3:3>Start Cmd:FB: ucmd setenv fastboot_buffer ${loadaddr}
3:3>Okay (0s)
3:3>Start Cmd:FB: download -f imx93-var-som-symphony--6.1.36+git999-r0-imx93-var-som-20240131152844.dtb
3:3>Okay (0.009s)
3:3>Start Cmd:FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
3:3>Okay (0s)
3:3>Start Cmd:FB[-t 20000]: ucmd fatwrite mmc 0:1 ${fastboot_buffer} imx93-var-som-symphony_test1.dtb  ${fastboot_bytes}
3:3>Fail (0.001s)

 

Any suggestion?

By the way, modifying the dtb file directly in root file system works fine.

Thks

0 Kudos
Reply

2,192 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @imahgin!

Sorry, I forget to mention that you have to put the command "fastboot 0" in u-boot to write the new dtb on your board.

Best Regards!
Chavira

0 Kudos
Reply

2,269 Views
imahgin
Contributor III
I cannot try it right now, but I guess that copying the new dtb file to the target device in the /boot directory will do the trick.
If the name is different to the one defined in bootloader, I need to set the new name with fw_setenv
0 Kudos
Reply

2,258 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @imahgin!
Thank you for contacting NXP Support!


You can flash only the dtb using the command below:

 

uuu -b fat_write <compiled_devicetree.dtb> mmc <device>:<particion> <name_on_board.dtb>


as you mention if you change the name of the device tree you have to change the fdtfile variable on uboot.

Best Regards!
Chavira