add M core firmware to bootfs

Hello @eric.tx.

I did actually fix my issue a few hours after posting this, but i did not manage to update you as the post was getting checked.
I’m using the same bsp as in my previous post, version 6.5.
this post is what helped me sort this out. Not sure why i did not find it before.

Allow me to explain how i did, maybe this will help others.

I have a recipe that builds both a .bin and a .elf for the firmware i want to run on the m7 core.
the .elf is put in /usr/lib/firmware, while i added a do_deploy task that puts the .bin in the deploy directory.

for baking images to the board i have a little script which i used to modify the image.json:

(the .bin firmware is called lightshow in the script as it is used to light some leds in a timed manner)

grep "$LIGHTSHOW" ${JSON_CONF} > /dev/null ||
  sed -i "s/\"uncompressed_size\":\(.*\)/\"uncompressed_size\":\1,\n\"filelist\":  [\"$LIGHTSHOW:\/ostree\/deploy\/torizon\/var\/\"]/" ${JSON_CONF}

then what was left to do is modify the uboot script so that is loads the firmware automatically;

# modify the default boot command
sed -i 's/bootcmd=run bootcmd_mmc2/bootcmd=run lightshow; run bootcmd_mmc2/' ${UBOOT_CONF}

# define the *lightshow* variable
grep 'lightshow=' ${UBOOT_CONF} > /dev/null ||
  echo "lightshow=setenv m4addr 0x7e0000 && saveenv && ext4load mmc 2 0x48000000 ostree/deploy/torizon/var/${LIGHTSHOW} && dcache flush && cp.b 0x48000000 \${m4addr} 0x20000 && bootaux \${m4addr}" >> ${UBOOT_CONF}

also, following the previous post, i can confirm i can’t get rpmsg to work if i did not launch some firmware on the mcore previously.
i also tested with torizon-rt and while the same limitations apply, rpmsg works there too.

I hope all this makes sense, let me know if you need more infos.

Thank you for the support, sorry for the annoyance,
Have a nice day,