Parthiban Nallathambi ea91031b22 imx: hab: extend hab_auth_img to calculate ivt_offset
Current implementation of hab_auth_img command needs ivt_offset to
authenticate the image. But ivt header is placed at the end of image
date after padding.

This leaves the usage of hab_auth_img command to fixed size or static
offset for ivt header. New function "get_image_ivt_offset" is introduced
to find the ivt offset during runtime. The case conditional check in this
function is same as boot_get_kernel in common/bootm.c

With this variable length image e.g. FIT image with any random size can
have IVT at the end and ivt_offset option can be left optional

Can be used as "hab_auth_img $loadaddr $filesize" from u-boot script

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Breno Lima <breno.lima@nxp.com>
2019-01-01 14:12:18 +01:00
..
2018-10-22 13:00:09 +02:00
2017-11-07 10:13:00 +01:00
2018-10-16 10:34:19 +02:00
2019-01-01 14:12:18 +01:00
2018-07-02 15:52:50 -04:00
2018-07-23 10:50:00 +02:00
2019-01-01 14:12:18 +01:00