MLK-17916: cmd: dek_blob: Convert CONFIG_CMD_DEKBLOB to Kconfig
authorBreno Lima <breno.lima@nxp.com>
Fri, 23 Mar 2018 01:33:59 +0000 (22:33 -0300)
committerYe Li <ye.li@nxp.com>
Mon, 2 Apr 2018 02:41:34 +0000 (19:41 -0700)
Currently the dek_blob command is enabled by default if
CONFIG_SECURE_BOOT is defined. Move CONFIG_CMD_DEKBLOB
enablement to Kconfig so users can select if required
by their application.

This commit is based in a previous submission from Simon Glass
in U-Boot upstream:
https://lists.denx.de/pipermail/u-boot/2017-April/289052.html

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 93e089f9202b2f9600a87eae2472db21fe5d7459)

arch/arm/imx-common/Kconfig
include/configs/mx6_common.h
include/configs/mx7_common.h
scripts/config_whitelist.txt

index a7252a0..7aad9d4 100644 (file)
@@ -45,6 +45,16 @@ config SECURE_BOOT
          This option enables the support for secure boot (HAB).
          See doc/README.mxc_hab for more details.
 
+config CMD_DEKBLOB
+       bool "Support the 'dek_blob' command"
+       depends on !MX6ULL && !MX6SLL && !MX6SL && !IMX8M && !MX7ULP
+       depends on SECURE_BOOT
+       help
+         This enables the 'dek_blob' command which is used with the
+         Freescale secure boot mechanism. This command encapsulates and
+         creates a blob of data. See also CMD_BLOB and doc/README.mxc_hab for
+         more information.
+
 config FSL_MFGPROT
        bool "Support the 'mfgprot' command"
        depends on SECURE_BOOT && ARCH_MX7
index a3c3729..c84dd6c 100644 (file)
@@ -111,9 +111,6 @@ defined(CONFIG_MX6DL)) && !defined(CONFIG_MX6S)
 /* Secure boot (HAB) support */
 #ifdef CONFIG_SECURE_BOOT
 #define CONFIG_CSF_SIZE                        0x4000
-#if !defined(CONFIG_MX6ULL) && !defined(CONFIG_MX6SLL) && !defined(CONFIG_MX6SL)
-#define CONFIG_CMD_DEKBLOB
-#endif
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 #endif
index c3939b0..227e469 100644 (file)
@@ -71,7 +71,6 @@
 /* Secure boot (HAB) support */
 #ifdef CONFIG_SECURE_BOOT
 #define CONFIG_CSF_SIZE                        0x4000
-#define CONFIG_CMD_DEKBLOB
 #endif
 
 #ifdef CONFIG_IMX_OPTEE
index a326393..7aa02ce 100644 (file)
@@ -471,7 +471,6 @@ CONFIG_CMD_CPLBINFO
 CONFIG_CMD_CRAMFS
 CONFIG_CMD_DATE
 CONFIG_CMD_DEFAULTENV_VARS
-CONFIG_CMD_DEKBLOB
 CONFIG_CMD_DFL
 CONFIG_CMD_DIAG
 CONFIG_CMD_DISPLAY