From: Marek Vasut Date: Wed, 29 Jun 2022 15:16:37 +0000 (+0200) Subject: tools: imx8mimage: Keep IVT reserved1 field zero always X-Git-Tag: baikal/mips/sdk5.8.2~5^2~273^2~99 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=e631b95740a2878d82bdb2450de3311678fa22bc;p=uboot.git tools: imx8mimage: Keep IVT reserved1 field zero always Since 1931a35cb55 ("imx: HAB: Validate IVT before authenticating image") the U-Boot HAB implementation is checking whether reserved1 field in IVT is zero or not. In case the field is not zero, IVT validation fails. Stop setting IVT reserved1 field to non-zero in mkimage imx8m plugin, otherwise the validation cannot ever work. Note that this only affects legacy boards which do not use binman. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic --- diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c index 4eed683396..52baf4c990 100644 --- a/tools/imx8mimage.c +++ b/tools/imx8mimage.c @@ -505,14 +505,6 @@ void build_image(int ofd) exit(EXIT_FAILURE); } else { sld_header_off = sld_src_off - rom_image_offset; - /* - * Record the second bootloader relative offset in - * image's IVT reserved1 - */ - if (rom_version == ROM_V1) { - imx_header[IMAGE_IVT_ID].fhdr.reserved1 = - sld_header_off - header_image_off; - } sld_fd = open(sld_img, O_RDONLY | O_BINARY); if (sld_fd < 0) { fprintf(stderr, "%s: Can't open: %s\n",