From patchwork Wed May 6 14:03:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 245197 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Wed, 6 May 2020 08:03:57 -0600 Subject: [PATCH 3/3] lib: Allow hexdump to be used in SPL In-Reply-To: <20200506140357.32050-1-sjg@chromium.org> References: <20200506140357.32050-1-sjg@chromium.org> Message-ID: <20200506140357.32050-3-sjg@chromium.org> It is sometimes useful to output hex dumps in SPL. Add a config option to allow this. Signed-off-by: Simon Glass Reviewed-by: Stefan Roese --- 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