diff options
author | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2018-04-24 18:46:33 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2018-04-26 08:52:51 +0200 |
commit | a2accd843b8171ff60e5684214a19bba94c655e4 (patch) | |
tree | 26297e0b108d0a9a5b6caf538b8865fbb1135704 /board/warp7 | |
parent | 9c260e862f8f93390f22b0cfc1a3a6b94888d549 (diff) | |
download | u-boot-a2accd843b8171ff60e5684214a19bba94c655e4.tar.gz u-boot-a2accd843b8171ff60e5684214a19bba94c655e4.tar.bz2 u-boot-a2accd843b8171ff60e5684214a19bba94c655e4.zip |
warp7: hab: Set environment variable indicating HAB enable
This patch adds an environment variable called "hab_enabled" which gets set
to a boolean status indicating whether HAB is enabled or not.
Subsequent patches can use this environment variable to determine if its
necessary to run a given binary through the hab_auth_img console command.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Diffstat (limited to 'board/warp7')
-rw-r--r-- | board/warp7/warp7.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 327f656c44..0d3d324571 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -10,6 +10,7 @@ #include <asm/arch/mx7-pins.h> #include <asm/arch/sys_proto.h> #include <asm/gpio.h> +#include <asm/mach-imx/hab.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/mxc_i2c.h> #include <asm/io.h> @@ -203,6 +204,13 @@ int board_late_init(void) */ clrsetbits_le16(&wdog->wcr, 0, 0x10); +#ifdef CONFIG_SECURE_BOOT + /* Determine HAB state */ + env_set_ulong(HAB_ENABLED_ENVNAME, imx_hab_is_enabled()); +#else + env_set_ulong(HAB_ENABLED_ENVNAME, 0); +#endif + #ifdef CONFIG_SERIAL_TAG /* Set serial# standard environment variable based on OTP settings */ get_board_serial(&serialnr); |