Can't Load binary file from U-Boot

Hello, I’m new to this community and I’m having trouble with loading binary file from U-Boot.

Apalis iMX8 # ls mmc 0:2 /home/root
<DIR>       4096 .
<DIR>       4096 ..
             684 .ash_history
           14784 hello_world_m40.bin

I used mmc 0:2 and the location of the binary file named hello_world_m40.bin is at /home/root

Apalis iMX8 # setenv load_cmd "ext4load mmc 0:2"
Apalis iMX8 # setenv m4_0_image "/home/root/hello_world_m40.bin"
Apalis iMX8 # saveenv
Saving Environment to MMC... Writing to MMC(0)... OK
Apalis iMX8 # run m4boot_0
Failed to load '/home/root/hello_world_m40.bin'
Power on M4 and MU
Copy M4 image from 0x95400000 to TCML 0x34fe0000
Start M4 0

Above, I tried running hello world file in Cortex-M in mmc 0:2. But it said that Failed to load ‘/home/root/hello_world_m40.bin’.

I’d really appreciate any guidance. Thank you.

Hi @radikz
m4boot_0 by default, loads M4 firmware by loadm4image_0 where fatload only supports a FAT format partition. /home/root is on an EXT4 partition. So fatload has to be replaced with ext4load in load4image_0.

Apalis iMX8 # print m4boot_0
m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0
Apalis iMX8 # print loadm4image_0
loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}
1 Like