From 7ae31fccec16d4885f1704b089eb018be836f619 Mon Sep 17 00:00:00 2001 From: Christoph Muellner Date: Fri, 5 Apr 2019 13:03:46 +0200 Subject: 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 Reviewed-by: Philipp Tomsich --- cmd/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index 2bdbfcb3d09..f6e7cd43037 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 -- cgit v1.2.3 From a24a78d7e3e8b6008423d1a6aa49a6c9eb904752 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 8 Apr 2019 13:20:51 -0600 Subject: Convert CONFIG_TRACE to Kconfig This converts the following to Kconfig: CONFIG_TRACE Signed-off-by: Simon Glass --- cmd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index f6e7cd43037..8744cec5c0f 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1905,7 +1905,7 @@ config CMD_TRACE Enables a command to control using of function tracing within U-Boot. This allows recording of call traces including timing information. The command can write data to memory for exporting - for analsys (e.g. using bootchart). See doc/README.trace for full + for analysis (e.g. using bootchart). See doc/README.trace for full details. config CMD_AVB -- cgit v1.2.3