]> git.sur5r.net Git - u-boot/commitdiff
warp7: hab: Set environment variable indicating IVT offset
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tue, 24 Apr 2018 17:46:45 +0000 (18:46 +0100)
committerStefano Babic <sbabic@denx.de>
Thu, 26 Apr 2018 06:54:02 +0000 (08:54 +0200)
This patch introduces the environment variable ivt_offset. When we define a
load address for Linux or DTB or any file the IVT associated with that file
is prepended. We extract the actual load addresses from u-boot.cfg and feed
these values into the code-signing process - hence we want u-boot to have
the real load addresses exported in uboot.cfg.

ivt_offset represents the addition or subtraction from the load address
that must happen to find an IVT header.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
include/configs/warp7.h

index 454bc1cd0809a8e60d20d2b4b9dbb77d82c6e738..fe9b7d57d768e5bd09fb8d9d90a9f5369c207a06 100644 (file)
@@ -10,6 +10,7 @@
 #define __WARP7_CONFIG_H
 
 #include "mx7_common.h"
+#include <imximage.h>
 
 #define PHYS_SDRAM_SIZE                        SZ_512M
 
@@ -50,6 +51,7 @@
        "finduuid=part uuid mmc 0:${rootpart} uuid\0" \
        "mmcargs=setenv bootargs console=${console},${baudrate} " \
                "root=PARTUUID=${uuid} rootwait rw\0" \
+       "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\
        "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \
        "loadbootscript=" \
                "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \