aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Sam Voss <sam.voss@rockwellcollins.com>2019-04-10 14:17:57 -0500
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-04-11 08:15:04 +0200
commitb026d97ed8a3916e9e00584db6a0ded847e0c3b1 (patch)
tree25070b6abb4ea0eef98138e11376f763cb06a741
parent80ae3f97b89a9f7531232ca319b314e38fcca369 (diff)
downloadbuildroot-b026d97ed8a3916e9e00584db6a0ded847e0c3b1.tar.gz
buildroot-b026d97ed8a3916e9e00584db6a0ded847e0c3b1.tar.bz2
package/uboot-tools: add option to install fit_check_sign
This commit adds an option to install fit_check_sign to target for fit image validation. This will allow a fit image to have its signature and hashes validated from Linux, assuming a device-tree of keys (the same as which is in u-boot) is available. Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/uboot-tools/Config.in9
-rw-r--r--package/uboot-tools/uboot-tools.mk7
2 files changed, 16 insertions, 0 deletions
diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in
index 63a058e856..681f87b45f 100644
--- a/package/uboot-tools/Config.in
+++ b/package/uboot-tools/Config.in
@@ -47,6 +47,15 @@ config BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT
libcrypto, and possibly GPL/OpenSSL licensing
incompatibility issues.
+config BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN
+ bool "fit_check_sign"
+ depends on BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT
+ help
+ Install the fit_check_sign tool on the target system
+
+ The fit_check_sign tool from Das U-Boot bootloader, which
+ allows FIT image signature validation on target system.
+
endif
config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE
diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index 2966ccf6d0..61c70b7e7f 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -32,6 +32,12 @@ UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x
UBOOT_TOOLS_DEPENDENCIES += openssl host-pkgconf
endif
+ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)
+define UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN
+ $(INSTALL) -m 0755 -D $(@D)/tools/fit_check_sign $(TARGET_DIR)/usr/bin/fit_check_sign
+endef
+endif
+
define UBOOT_TOOLS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(UBOOT_TOOLS_MAKE_OPTS) \
CROSS_BUILD_TOOLS=y tools-only
@@ -74,6 +80,7 @@ define UBOOT_TOOLS_INSTALL_TARGET_CMDS
$(UBOOT_TOOLS_INSTALL_MKENVIMAGE)
$(UBOOT_TOOLS_INSTALL_FWPRINTENV)
$(UBOOT_TOOLS_INSTALL_DUMPIMAGE)
+ $(UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN)
endef
define HOST_UBOOT_TOOLS_CONFIGURE_CMDS