]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: omap5: add U-Boot FIT signing and SPL image post-processing
authorAndreas Dannenberg <dannenberg@ti.com>
Mon, 27 Jun 2016 14:19:22 +0000 (09:19 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 14 Jul 2016 22:22:22 +0000 (18:22 -0400)
Modify the SPL build procedure for AM57xx and DRA7xx high-security (HS)
device variants to create a secure u-boot_HS.img FIT blob that contains
U-Boot and DTB artifacts signed with a TI-specific process based on the
CONFIG_TI_SECURE_DEVICE config option and the externally-provided image
signing tool.

Also populate the corresponding FIT image post processing call to be
performed during SPL runtime.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv7/omap5/config.mk
board/ti/am57xx/board.c
board/ti/dra7xx/evm.c
configs/am57xx_hs_evm_defconfig
configs/dra7xx_hs_evm_defconfig

index a7e55a5e2449e0c9d6e4cbb158cf0dc186c1a57b..d245572ef04344113bc9a910e3586828d235e167 100644 (file)
@@ -15,5 +15,8 @@ else
 ALL-y  += MLO
 endif
 else
+ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
+ALL-y   += u-boot_HS.img
+endif
 ALL-y  += u-boot.img
 endif
index 08cf14d5e73f629bf4a47d880aca7888d432d928..927d1364fe46736d0e52ab37d29e988d6125cbe0 100644 (file)
@@ -13,6 +13,7 @@
 #include <sata.h>
 #include <usb.h>
 #include <asm/omap_common.h>
+#include <asm/omap_sec_common.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
 #include <asm/arch/gpio.h>
@@ -750,3 +751,10 @@ int board_fit_config_name_match(const char *name)
                return -1;
 }
 #endif
+
+#ifdef CONFIG_TI_SECURE_DEVICE
+void board_fit_image_post_process(void **p_image, size_t *p_size)
+{
+       secure_boot_verify_image(p_image, p_size);
+}
+#endif
index 6a4d02769e584eed96fef0675e3bef5816d738db..99e82542f72a375d5f26cdf0b387ea4aba313432 100644 (file)
@@ -17,6 +17,8 @@
 #include <asm/gpio.h>
 #include <usb.h>
 #include <linux/usb/gadget.h>
+#include <asm/omap_common.h>
+#include <asm/omap_sec_common.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/dra7xx_iodelay.h>
 #include <asm/emif.h>
@@ -834,3 +836,10 @@ int board_fit_config_name_match(const char *name)
                return -1;
 }
 #endif
+
+#ifdef CONFIG_TI_SECURE_DEVICE
+void board_fit_image_post_process(void **p_image, size_t *p_size)
+{
+       secure_boot_verify_image(p_image, p_size);
+}
+#endif
index e01e50482a6142b3989c94cc14b4d10d46b15fe3..01a4701dab3de9d464286bd5039730cb8c3b22a8 100644 (file)
@@ -40,4 +40,5 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_FIT=y
 CONFIG_SPL_OF_LIBFDT=y
 CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
 CONFIG_OF_LIST="am57xx-beagle-x15"
index 6933ab5cc6f2c8838b0d208fb989497b4fd762c2..eb01f41d02e60eb01b5c7a0124e82999f1c2598b 100644 (file)
@@ -58,4 +58,5 @@ CONFIG_G_DNL_PRODUCT_NUM=0xd022
 CONFIG_FIT=y
 CONFIG_SPL_OF_LIBFDT=y
 CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
 CONFIG_OF_LIST="dra7-evm dra72-evm"