From a3c005506ac87f3684603fc40ada98070027aaa0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 6 Nov 2018 15:21:31 -0700 Subject: [PATCH] binman: Add a way to enable debugging from the build When the build fails due to something wrong in binman it is sometimes useful to get a full backtrace showing the location of the failure. Add a BINMAN_DEBUG environment variable to support this along with some documentation. Signed-off-by: Simon Glass --- Makefile | 6 ++++-- tools/binman/README | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 552687db53..aeb1c1455b 100644 --- a/Makefile +++ b/Makefile @@ -1048,9 +1048,11 @@ u-boot.ldr: u-boot # binman # --------------------------------------------------------------------------- +# Use 'make BINMAN_DEBUG=1' to enable debugging quiet_cmd_binman = BINMAN $@ -cmd_binman = $(srctree)/tools/binman/binman -d u-boot.dtb -O . \ - -I . -I $(srctree)/board/$(BOARDDIR) $< +cmd_binman = $(srctree)/tools/binman/binman -u -d u-boot.dtb -O . -m \ + -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ + $(if $(BINMAN_DEBUG),-D) $(BINMAN_$(@F)) $< OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex diff --git a/tools/binman/README b/tools/binman/README index b64dedf2eb..04ed2b799c 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -723,6 +723,12 @@ If you need to specify a particular device-tree compiler to use, you can define the DTC environment variable. This can be useful when the system dtc is too old. +To enable a full backtrace and other debugging features in binman, pass +BINMAN_DEBUG=1 to your build: + + make sandbox_defconfig + make BINMAN_DEBUG=1 + History / Credits ----------------- -- 2.25.1