imx: hab: Support FIT images with external data
Subsystems (3)
RFC PATCH 1/1 imx: hab: Support FIT images with external data
The IVT table is located right after the FIT image. If the FIT image is generated using external data, the total size needs to be computed including the FIT struct and external data lengths.
Signed-off-by Ariel D'Alessandro <[email protected]>
--- arch/arm/mach-imx/hab.c | 3 ++- boot/image-fit.c | 44 +++++++++++++++++++++++++++++++++++++++++ include/image.h | 9 +++++++++ 3 files changed, 55 insertions(+), 1 deletion(-)
arch/arm/mach-imx/hab.c +2 -1
@@ -593,7 +593,8 @@ static ulong get_image_ivt_offset(ulong img_addr)#endif #if CONFIG_IS_ENABLED (FIT )case IMAGE_FORMAT_FIT : -return (fit_get_size (buf) +0x1000 -1 ) & ~(0x1000 -1 ); +return (fit_get_size_external (buf) + +0x1000 -1 ) & ~(0x1000 -1 );#endif default :return 0 ;
boot/image-fit.c +44 -0
50 lines not on this page · raw message
include/image.h +9 -0
@@ -979,6 +979,15 @@ static inline ulong fit_get_size(const void *fit)*/ ulong fit_get_end (const void *fit); +/** +* fit_get_size_external - get FIT image size including external data +* @fit: pointer to the FIT format image header +* +* returns: +* size of the FIT image (including external data) in memory +*/ +ulong fit_get_size_external (const void *fit); +/** * fit_get_name - get FIT node name * @fit: pointer to the FIT format image header
Signature · 1 line
2.34.1