Hi @swiss,
For Torizon, it’s a little bit different, because Torizon uses OStree to manage its filesystem.
Since OSTree does not update the /var/ files, I placed my hello_world.bin inside /var/hello_world.bin.
Then, inside uBoot, you should run these commands to load your binary:
Colibri iMX8X # ext4ls mmc 0:1 /ostree/deploy/torizon/var
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 4096 rootdirs
<DIR> 4096 lib
<DIR> 4096 tmp
<SYM> 11 lock
<SYM> 6 run
0 .ostree-selabeled
<SYM> 17 log
<DIR> 4096 sota
<DIR> 4096 volatile
<DIR> 4096 usrlocal
<DIR> 4096 cache
<DIR> 4096 spool
8720 hello_world.bin
190 .updated
Colibri iMX8X # ext4load mmc 0:1 ${loadaddr} /ostree/deploy/torizon/var/hello_world.bin
8720 bytes read in 29 ms (293 KiB/s)
Colibri iMX8X # dcache flush
Colibri iMX8X # bootaux ${loadaddr}
Power on aux core 0
Copy image from 0x87000000 to 0x34fe0000
Start M4
bootaux complete
Colibri iMX8X #
As you can see, you /var/ is actually inside /ostree/deploy/torizon/var/.
For the M4 to boot automatically, you can use the commands “m4_0_image” and “m4boot_0”
Colibri iMX8X # setenv load_cmd "ext4load mmc 0:1"
Colibri iMX8X # setenv m4_0_image "/ostree/deploy/torizon/var/hello_world.bin"
Colibri iMX8X # setenv bootcmd "run m4boot_0; run bootcmd_mmc0"
Colibri iMX8X # saveenv
Saving Environment to MMC... Writing to MMC(0)... OK
Colibri iMX8X # reset
With these commands, you will set your bootcmd to launch the M4 and the cortex A automatically. But remember that your code needs to be inside /var/, because uBoot will load the binary from there.
Now I have another question, are you using a UART to USB converter device to see your “Hello World!” from M4?
Because if you run this, probably it won’t work because you need to change the device tree and the pinx_mux.h from the NXP demo. Have you changed these files?
Best Regards,
Hiago.