Oe-core recipe for building and integrating M4 firmware into iMX7 image

Hi,
Is there already a recipe/mechanism/tutorial available of how to easy build and integrate the M4 firmware into an oe-core image?
Thanks in advance.

Hi

No, we so far did not try that. The issue is that we don’t know yet how to get a bare bone cross compiler mixed with a linux cross compiler.

Having said that you coud build you binary outside of OE and use a recipe to deply it into the final image.

Max

Ok, thanks. The M4 firmware image has to placed within the boot partition (besides uImage and .dtb files). What would be the recommended way to add files to *.bootfs.tar and *.bootfs.tar.xz using ordinary recipes?

I don’t have a recommended way currently.

Assuming the m4 binary is called m4.bin, I guess one could with the 2.8 or 2.7 BSP and Toradex Easy Installer images do the following hack:

  • bring the m4.bin file into the ${DEPLOY_DIR_IMAGE} directory (…deploy/image/${MACHINE}) similar to how meta-toradex-bsp-common/recipes-bsp/tezi-metadata/tezi-metadata_0.3.bb does it with the wrapup script and others.
  • get the m4 binary into the bootfs.tar.xz by hacking it into the meta-toradex-bsp-common/classes/image_type_tezi.bbclass, i.e. by adding m4.bin to the end of the bootfs tar line here.

I will create a ticket in our roadmap, so that maybe for future BSP’s we get a cleaner solution.

Max

I just realized that it is possible to load the M4 firmware file from the rootfs with ext4load.

Thanks for this information.
Did you try it?

Yes. i tried it and it works fine.

Perfect. Thanks for the feedback.