diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2016-07-12 11:02:09 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-02-20 10:30:05 +0100 |
commit | db4260bd2996838ec02528fb9de4c5e0f68dbf38 (patch) | |
tree | 761bf0f50330cf05b7911b747aa7b3bd8585394c | |
parent | b4457f794e53fc06b85d3854e93e7483375e6fdc (diff) | |
download | barebox-db4260bd2996838ec02528fb9de4c5e0f68dbf38.tar.gz barebox-db4260bd2996838ec02528fb9de4c5e0f68dbf38.tar.xz |
bootm: fit: add option to add DT snipped that contains fit public key
This makes it easier for build systems to include a configurable dts
snippet which holds the public keys for FIT images.
Usage:
Add to your dts:
#ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY
#include CONFIG_BOOTM_FITIMAGE_PUBKEY
#endif
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/Kconfig | 7 | ||||
-rw-r--r-- | scripts/Makefile.lib | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig index 93b1d89274..a21f3e51b2 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -632,6 +632,13 @@ config BOOTM_FITIMAGE_SIGNATURE Additionally the barebox device tree needs a /signature node with the public key with which the image has been signed. +config BOOTM_FITIMAGE_PUBKEY + string "Path to dtsi containing pubkey" + default "../fit/pubkey.dtsi" + depends on BOOTM_FITIMAGE_SIGNATURE + help + Set Path to a dts snippet which holds the public keys for FIT images. + config BOOTM_FORCE_SIGNED_IMAGES bool prompt "Force booting of signed images" diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index fbd2f4725b..272b5981e9 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -157,6 +157,12 @@ dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \ -I$(srctree)/dts/src/ \ -undef -D__DTS__ +ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY +ifneq ($(CONFIG_BOOTM_FITIMAGE_PUBKEY),"") +dtc_cpp_flags += -DCONFIG_BOOTM_FITIMAGE_PUBKEY=\"$(CONFIG_BOOTM_FITIMAGE_PUBKEY)\" +endif +endif + # Finds the multi-part object the current object will be linked into modname-multi = $(sort $(foreach m,$(multi-used),\ $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) |