summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorChristoph Muellner <christoph.muellner@theobroma-systems.com>2019-04-05 11:54:04 +0200
committerChristoph Müllner <christophm30@gmail.com>2019-04-26 00:55:19 +0200
commit1807cdf0ddadff57a7b094f25661c0b1199cd5f5 (patch)
tree553dd3efcf5579915cb0f6a6262d18d21636adff /cmd
parent62e45f53d926338bb86babeac60e52eeb5e7dad3 (diff)
common: command: Add command execution tracer.
When using boot scripts it can become quite hard to understand which commands are actually executed during bootup (e.g. where is a kernel image loaded from or which DTB is in use). Shell scripts suffer from a similar problem and many shells address this problem with a command execution tracer (e.g. BASH has xtrace, which can be enabled by "set -x"). This patch introduces a command tracer for U-Boot, which prints every command with its arguments before it is executed. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 0b07b3b9d7..eeadc3827c 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -53,6 +53,17 @@ config SYS_PROMPT
This string is displayed in the command line to the left of the
cursor.
+config SYS_XTRACE
+ string "Command execution tracer"
+ depends on CMDLINE
+ default y if CMDLINE
+ help
+ This option enables the possiblity to print all commands before
+ executing them and after all variables are evaluated (similar
+ to Bash's xtrace/'set -x' feature).
+ To enable the tracer a variable "xtrace" needs to be defined in
+ the environment.
+
menu "Autoboot options"
config AUTOBOOT