summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/Kconfig
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-09-07 10:11:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-09-07 10:20:59 +0200
commit432b4e38794d42c98935975c751c6da5d69097c8 (patch)
tree0605d9688103d630b4bb268b7edbaf5162285683 /arch/arm/mach-imx/Kconfig
parent6e64774331c95258f73694364a9514e0911f7ede (diff)
downloadbarebox-432b4e38794d42c98935975c751c6da5d69097c8.tar.gz
barebox-432b4e38794d42c98935975c751c6da5d69097c8.tar.xz
ARM: i.MX: make HAB certificate pathes explicitly overwritable
When building HAB images for i.MX we have to specify some pathes to the certificates. This can be done with Kconfig variables. For better build system integration we also want to be able to specify the pathes in environment variables. This currently doesn't work as we specify the variables from the environment with the -D option to cpp, but also include generated/autoconf.h which overwrites the variables with the values from Kconfig. To overcome this introduce a Kconfig switch that explcitly selects whether we want to have the variables from Kconfig or the environment. Also, only pass the variables from the environment when explicitly wanted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/Kconfig')
-rw-r--r--arch/arm/mach-imx/Kconfig26
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 737cded930..52a825bab6 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -753,7 +753,29 @@ config HABV4
help
High Assurance Boot, as found on i.MX28/i.MX6.
-if HABV4
+config HAB_CERTS_ENV
+ depends on HAB
+ bool "Specify certificates in environment"
+ help
+ If this option is enabled the pathes to the HAB certificates are
+ taken from environment variables which allows for better integration
+ with build systems. With this option disabled the pathes can be
+ specified below.
+
+ The environment variables have the same name as the corresponding
+ Kconfig variables. For HABv3 these are:
+
+ CONFIG_HABV3_SRK_PEM
+ CONFIG_HABV3_CSF_CRT_DER
+ CONFIG_HABV3_IMG_CRT_DER
+
+ For HABv4:
+
+ CONFIG_HABV4_TABLE_BIN
+ CONFIG_HABV4_CSF_CRT_PEM
+ CONFIG_HABV4_IMG_CRT_PEM
+
+if HABV4 && !HAB_CERTS_ENV
config HABV4_TABLE_BIN
string "Path to SRK table"
@@ -796,7 +818,7 @@ config HABV3
help
High Assurance Boot, as found on i.MX25.
-if HABV3
+if HABV3 && !HAB_CERTS_ENV
config HABV3_SRK_PEM
string "Path to SRK Certificate (PEM)"