Hello,
While trying to get HAB working on an imx8mp SoM, I discovered that imx-mkimage target flash_evk_emmc_fastboot doesn't work and would generate HAB events, whereas the flash_evk target works fine.
Looking through soc.mak for iMX8M, the only difference between the two is the specification of -dev emmc_fastboot.
Digging further into mkimage_imx8.c, it seems like the difference is setting rom_image_offset to 0x8000 (IMAGE_OFFSET_SD), where emmc_fastboot is set to 0. Also, looking into print_fit_hab.sh, it assumes a 0x8400 offset for V2.
I guess my question is, should rom_image_offset be set to 0x8000 for emmc_fastboot? Or somehow be handled in the print_fit_hab.sh to account for rom_image_offset=0.
已解决! 转到解答。
Hi @splkwill
Have you firstly burned the eMMC fastboot fuse?
If you are using i.MX8MP, then it is a V2 version from mkimage tool's view. Then
should rom_image_offset be set to 0x8000 for emmc_fastboot?
---> Yes.
Or somehow be handled in the print_fit_hab.sh to account for rom_image_offset=0.
---> I think imx-mkimage didn't take emmc_fastboot case into account. Maybe you can add below new target in soc.mk for this case.
-----
print_fit_hab_emmc_fastboot: u-boot-nodtb.bin bl31.bin $(dtb)
./$(PAD_IMAGE) $(TEE)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh 0x68000 $(dtb)
@rm -f $(dtb)
-----
Best regards
Harvey
Hi @splkwill
Have you firstly burned the eMMC fastboot fuse?
If you are using i.MX8MP, then it is a V2 version from mkimage tool's view. Then
should rom_image_offset be set to 0x8000 for emmc_fastboot?
---> Yes.
Or somehow be handled in the print_fit_hab.sh to account for rom_image_offset=0.
---> I think imx-mkimage didn't take emmc_fastboot case into account. Maybe you can add below new target in soc.mk for this case.
-----
print_fit_hab_emmc_fastboot: u-boot-nodtb.bin bl31.bin $(dtb)
./$(PAD_IMAGE) $(TEE)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh 0x68000 $(dtb)
@rm -f $(dtb)
-----
Best regards
Harvey