[U-Boot] [PATCH 12/12] kconfig: add config option for shell prompt
Nikita Kiryanov
nikita at compulab.co.il
Thu Jul 23 16:19:39 CEST 2015
Add option to set shell prompt string from menuconfig and use it
when migrating CONFIG_SYS_PROMPT to cm-fx6 defconfig.
Cc: Tom Rini <trini at konsulko.com>
Cc: Masahiro Yamada <yamada.m at jp.panasonic.com>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Igor Grinberg <grinberg at compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita at compulab.co.il>
---
common/Kconfig | 7 +++++++
configs/cm_fx6_defconfig | 1 +
include/configs/cm_fx6.h | 1 -
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig
index 40cd69e..6b24fd9 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -17,6 +17,13 @@ config SYS_HUSH_PARSER
help
Backward compatibility.
+config SYS_PROMPT
+ string "Shell prompt"
+ default "# "
+ help
+ This string is displayed in the command line to the left of the
+ cursor.
+
menu "Autoboot options"
config AUTOBOOT_KEYED
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 2aba359..66fc382 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -30,3 +30,4 @@ CONFIG_USB_EHCI_MX6=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
+CONFIG_SYS_PROMPT="CM-FX6 # "
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index bbd9f38..ddf6b5f 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -45,7 +45,6 @@
#define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200}
/* Shell */
-#define CONFIG_SYS_PROMPT "CM-FX6 # "
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
--
1.9.1
More information about the U-Boot
mailing list