Hello,
I used to work with the yocto project provided by NXP to build my imx-boot, adding some custom patch for my specific usage. I now need to swich to secure boot, and the yocto build do not permit that afaik. To be honest I'm not familiar with yocto and I did not do the original yocto work.
I followed some documentation I could find, so the currents steps are the following, based on a compilation of multiple docs :
- Generate atf-container with ~/imx-mkimage$ make SOC=iMX8QX u-boot-atf-container.img
- Sign it with cst -i cst_uboot_atf.txt -o signed-u-boot-atf-container.img then replace it in the directory imx-mkimage/iMX8QX
- compile u-boot with make (with appropriate cross compilation env)
- Copy u-boot-spl.bin from u-boot/spl/u-boot-spl.bin to imx-mkimage/iMX8QX/.
- Copy u-boot.bin from u-boot/u-bootl.bin to imx-mkimage/iMX8QX/.
- Copy scfw_tcm.bin from SCFW porting kit to imx-mkimage/iMX8QX/.
- Copy bl31.bin from Arm Trusted Firmware (imx-atf) to imx-mkimage/iMX8QX/.
- Copy the SECO firmware container images mx8qxpc0-ahabcontainer.img to imx-mkimage/iMX8QM/.
- Generate flash.bin with make SOC=iMX8QX DEV=flexspi REV=C0 flash_spl
- Sign it with cst
After this steps, i get a 1MB file, when the yocto output file "imx-boot-imx8qxpc0mekroadlink-fspi.bin-flash_spl_flexspi" is 3.3MB.
What are the missing steps ?
解決済! 解決策の投稿を見る。
Here was the solution for me if it can help :
- copy tee.bin before generating atf-container
-the final container has to be create with target flash_spl_flexspi (not just flash_spl)
-the soc.mak had to be changed to use the right address (as defined in the #define CONFIG_LOADADDR, in my case 0x80280000 instead of the default 0x80200000)
Here was the solution for me if it can help :
- copy tee.bin before generating atf-container
-the final container has to be create with target flash_spl_flexspi (not just flash_spl)
-the soc.mak had to be changed to use the right address (as defined in the #define CONFIG_LOADADDR, in my case 0x80280000 instead of the default 0x80200000)
Hello,
You try to build the rootfs and put in the right place from yocto, since you are building a custom uboot, it changes the address where is located.
Regards
Hello, thank you for your response.
I was already taking only u-boot from yocto. I did my rootfs from debootstrap, it is stored with the boot partition (Image and dtb) on an usb device and my u-boot is patched for that. Yocto was used only to create a "imx-boot-imx8qxpc0mekroadlink-fspi.bin-flash_spl_flexspi" that I flash with uuu.
My issue is that I can't find how to replicate the u-boot encapsulation to get a uuu compatible flash file outside yocto using imx-mkimage (and probably other tools I miss).