[U-Boot] [PATCH 17/47] Convert CONFIG_CMD_ENV_CALLBACK to Kconfig

Simon Glass sjg at chromium.org
Mon May 15 10:57:32 UTC 2017


This converts the following to Kconfig:
   CONFIG_CMD_ENV_CALLBACK

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 README                          | 1 -
 cmd/Kconfig                     | 8 ++++++++
 configs/sandbox_defconfig       | 1 +
 configs/sandbox_noblk_defconfig | 1 +
 configs/sandbox_spl_defconfig   | 1 +
 include/configs/sandbox.h       | 1 -
 scripts/config_whitelist.txt    | 1 -
 7 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/README b/README
index d3ab943eac..776f7b232f 100644
--- a/README
+++ b/README
@@ -833,7 +833,6 @@ The following options need to be configured:
 		CONFIG_CMD_ECHO		  echo arguments
 		CONFIG_CMD_EDITENV	  edit env variable
 		CONFIG_CMD_ELF		* bootelf, bootvx
-		CONFIG_CMD_ENV_CALLBACK	* display details about env callbacks
 		CONFIG_CMD_ENV_FLAGS	* display details about env flags
 		CONFIG_CMD_ENV_EXISTS	* check existence of env variable
 		CONFIG_CMD_EXPORTENV	* export the environment
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 6b9feff94c..3ac876403c 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -314,6 +314,14 @@ config CMD_ENV_EXISTS
 	  Check if a variable is defined in the environment for use in
 	  shell scripting.
 
+config CMD_ENV_CALLBACK
+	bool "env callbacks - print callbacks and their associated variables"
+	help
+	  Some environment variable have callbacks defined by
+	  U_BOOT_ENV_CALLBACK. These are called when the variable changes.
+	  For example changing "baudrate" adjust the serial baud rate. This
+	  command lists the currently defined callbacks.
+
 endmenu
 
 menu "Memory commands"
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index e24012c8ae..b63da46c87 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -22,6 +22,7 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_ENV_CALLBACK=y
 CONFIG_CMD_MD5SUM=y
 CONFIG_LOOPW=y
 CONFIG_CMD_MEMTEST=y
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index b84be99bcd..d86d9d2693 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -22,6 +22,7 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_ENV_CALLBACK=y
 CONFIG_CMD_MD5SUM=y
 CONFIG_LOOPW=y
 CONFIG_CMD_MEMTEST=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 25e4da258c..79eb83719e 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_ENV_CALLBACK=y
 CONFIG_CMD_MD5SUM=y
 CONFIG_LOOPW=y
 CONFIG_CMD_MEMTEST=y
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 37c6132b8a..1743055f15 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -110,7 +110,6 @@
 #define CONFIG_CMD_SANDBOX
 
 #define CONFIG_CMD_ENV_FLAGS
-#define CONFIG_CMD_ENV_CALLBACK
 
 #define CONFIG_BOOTARGS ""
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 1eaf182ad9..2640e76885 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -384,7 +384,6 @@ CONFIG_CM922T_XA10
 CONFIG_CMDLINE_EDITING
 CONFIG_CMDLINE_PS_SUPPORT
 CONFIG_CMDLINE_TAG
-CONFIG_CMD_ENV_CALLBACK
 CONFIG_CMD_ENV_FLAGS
 CONFIG_CMD_ERRATA
 CONFIG_CMD_ESBC_VALIDATE
-- 
2.13.0.rc2.291.g57267f2277-goog



More information about the U-Boot mailing list