[PATCH 3/3] lib: Allow hexdump to be used in SPL

Simon Glass sjg at chromium.org
Wed May 6 16:03:57 CEST 2020


It is sometimes useful to output hex dumps in SPL. Add a config option to
allow this.

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

 lib/Kconfig  | 6 ++++++
 lib/Makefile | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/Kconfig b/lib/Kconfig
index c3f694afc0..df052e1d59 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -491,6 +491,12 @@ config HEXDUMP
 	help
 	  This enables functions for printing dumps of binary data.
 
+config SPL_HEXDUMP
+	bool "Enable hexdump in SPL"
+	help
+	  This enables functions for printing dumps of binary data in
+	  SPL.
+
 config OF_LIBFDT
 	bool "Enable the FDT library"
 	default y if OF_CONTROL
diff --git a/lib/Makefile b/lib/Makefile
index 6e688afa68..a022fb9455 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -104,7 +104,7 @@ obj-$(CONFIG_REGEX) += slre.o
 obj-y += string.o
 obj-y += tables_csum.o
 obj-y += time.o
-obj-y += hexdump.o
+obj-$(CONFIG_$(SPL_)HEXDUMP) += hexdump.o
 obj-$(CONFIG_TRACE) += trace.o
 obj-$(CONFIG_LIB_UUID) += uuid.o
 obj-$(CONFIG_LIB_RAND) += rand.o
-- 
2.26.2.645.ge9eca65c58-goog



More information about the U-Boot mailing list