summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSven Ebenfeld <sven.ebenfeld@gmail.com>2016-11-06 15:37:56 (GMT)
committerStefano Babic <sbabic@denx.de>2017-01-02 16:06:57 (GMT)
commitd21bd69b6e95ca7824941e7f527871cd5c63c7f7 (patch)
treeec7448b2df704e866acc9107536c8d12e3e811ba /common
parent15b505b0553da2d8a99ae5c1d14968e87f5c6bef (diff)
downloadu-boot-fsl-qoriq-d21bd69b6e95ca7824941e7f527871cd5c63c7f7.tar.xz
tools: mkimage: add firmware-ivt image type for HAB verification
When we want to use Secure Boot with HAB from SPL over U-Boot.img, we need to append the IVT to the image and leave space for the CSF. Images generated as firmware_ivt can directly be signed using the Freescale code signing tool. For creation of a CSF, mkimage outputs the correct HAB Blocks for the image. The changes to the usual firmware image class are quite small, that is why I implemented that directly into the default_image. Cc: sbabic@denx.de v2-Changes: None Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> Reviewed-by: George McCollister <george.mccollister@gmail.com> Tested-by: George McCollister <george.mccollister@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/image.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/image.c b/common/image.c
index 909dbed..8c35327 100644
--- a/common/image.c
+++ b/common/image.c
@@ -166,6 +166,7 @@ static const table_entry_t uimage_type[] = {
{ IH_TYPE_ZYNQMPIMAGE, "zynqmpimage", "Xilinx ZynqMP Boot Image" },
{ IH_TYPE_FPGA, "fpga", "FPGA Image" },
{ IH_TYPE_TEE, "tee", "Trusted Execution Environment Image",},
+ { IH_TYPE_FIRMWARE_IVT, "firmware_ivt", "Firmware with HABv4 IVT" },
{ -1, "", "", },
};
@@ -365,6 +366,11 @@ void image_print_contents(const void *ptr)
printf("%s Offset = 0x%08lx\n", p, data);
}
}
+ } else if (image_check_type(hdr, IH_TYPE_FIRMWARE_IVT)) {
+ printf("HAB Blocks: 0x%08x 0x0000 0x%08x\n",
+ image_get_load(hdr) - image_get_header_size(),
+ image_get_size(hdr) + image_get_header_size()
+ - 0x1FE0);
}
}