How to create a U-Boot image for an i.MX8M Plus that includes an M7 processor image?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to create a U-Boot image for an i.MX8M Plus that includes an M7 processor image?

跳至解决方案
1,596 次查看
rob_mclean
Contributor IV

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?

标签 (1)
0 项奖励
回复
1 解答
1,562 次查看
Chavira
NXP TechSupport
NXP TechSupport

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,563 次查看
Chavira
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
1,536 次查看
rob_mclean
Contributor IV
Not the answer I was hoping for, but it does explain everything I'm seeing. Post COVID we are all experts at plan-B. I'm guessing it will probably something similar to what you describe with the u-boot environment.

Thanks for the definitive response.
Rob
0 项奖励
回复