I'm working on a project that is uses an i.MX8M Plus SOC on a Variscite SOM. It uses the Android 14 release that comes mostly from NXP. Our project also has a FreeRTOS app that runs on the M7 auxiliary processor in the SOC which communicates with our Android app.
We need the FreeRTOS app to be started by U-Boot so that it is running when the Android OS comes up. At this stage of development starting that M7 FreeRTOS app from U-Boot is a manual process executed by the developer when booting the system. When we follow the manual process, everything works fine, but that manual process is tedious and error prone.
From what I've read on this link: i-MX8-Boot-process-and-creating-a-bootable-image it seems like that manual process we follow to boot the M7 processor from U-boot could "just happen" if I could figure out how to add the M7 image to our U-Boot image. From that link it seems like the command to use is something like this:
imx-mkimage -soc QM -rev B0 -append mx8qm-ahab-container.img -c -flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-atf.bin a53 0x80000000 -p3 -m4 m4_0_image.bin 0 0x34FE0000 -p4 -m4 m4_1_image.bin 1 0x38FE0000 -out flash.bin
... maybe it should be without the "ahab" container, and be for different "-soc" and "-rev" but maybe the "-m4" stuff is relevant but maybe the option should be "-m7".
However ...
What the Android build system ACTUALLY does is quite a bit different. It does use code equivalent to the code in this repository, but instead of building the "imx-mkimage" program, I see that it builds and runs something called "mkimage_imx8" in the "iMX8M" directory which seems to be tailored to the i.MX8M family. When I read through the code for "mkimage_imx8" it seems like it doesn't support adding a container for M7 code.
That brings me back to the question in the subject. Can it be done, and if so how?
已解决! 转到解答。
HI @rob_mclean!
Thank you for contacting NXP Support!
Unfortunately in iMX8MP SOC is not possible to compile a u-boot image with M core image embedded, It is possible in iMX8 but no in iMX8M.
You can consult the chapter 4.5.13 of this guide.
You can update your u-boot environment and create a command to run the M core before the Linux Image to avoid errors doing manually every time.
Best Regards!
Chavira
HI @rob_mclean!
Thank you for contacting NXP Support!
Unfortunately in iMX8MP SOC is not possible to compile a u-boot image with M core image embedded, It is possible in iMX8 but no in iMX8M.
You can consult the chapter 4.5.13 of this guide.
You can update your u-boot environment and create a command to run the M core before the Linux Image to avoid errors doing manually every time.
Best Regards!
Chavira