The CPU part is i.MX6 ULL.
The U-Boot is:
https://source.codeaurora.org/external/imx/uboot-imx.git
rel_imx_5.4.24_2.1.0
This is 2020.04 U-Boot.
It was rather straightforward to remove the authenticate image code from bootm in U-Boot with a patch. This solved my problem:
#
# In i.MX code they authenticate the U-Boot image and OPTEE.
# Note too that they only support zImage. This patch
# removes authentication of images during bootm.
# Instead we will use hab_auth_img_or_fail.
# This command is supposed to start a USB boot
# if we fail to boot.
#
diff --git a/cmd/bootm.c b/cmd/bootm.c
index 03ea3b8998..bac2923a11 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -124,9 +124,6 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
#ifdef CONFIG_IMX_HAB
- extern int authenticate_image(
- uint32_t ddr_start, uint32_t raw_image_size);
-
#ifdef CONFIG_IMX_OPTEE
ulong tee_addr = 0;
int ret;
@@ -140,11 +137,6 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
switch (genimg_get_format((const void *)tee_addr)) {
case IMAGE_FORMAT_LEGACY:
- if (authenticate_image(tee_addr,
- image_get_image_size((image_header_t *)tee_addr)) != 0) {
- printf("Authenticate uImage Fail, Please check\n");
- return 1;
- }
break;
default:
printf("Not valid image format for Authentication, Please check\n");
@@ -154,22 +146,11 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ret = bootz_setup(image_load_addr, &zi_start, &zi_end);
if (ret != 0)
return 1;
-
- if (authenticate_image(image_load_addr, zi_end - zi_start) != 0) {
- printf("Authenticate zImage Fail, Please check\n");
- return 1;
- }
-
#else
switch (genimg_get_format((const void *)image_load_addr)) {
#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
case IMAGE_FORMAT_LEGACY:
- if (authenticate_image(image_load_addr,
- image_get_image_size((image_header_t *)image_load_addr)) != 0) {
- printf("Authenticate uImage Fail, Please check\n");
- return 1;
- }
break;
#endif
#ifdef CONFIG_ANDROID_BOOT_IMAGE
Of course my next problem is that USB hangs after the call to hab_auth_img_or_fail, but that is the subject of another post.