[PATCH] kbuild: dtc: use env to resolve echo
Rouven Czerwinski
r.czerwinski at pengutronix.de
Wed Jan 19 23:47:33 PST 2022
Posix does not mandate to have binaries within a certain path, but
rather that the utilities may be available. Use env to resolve and call
echo from PATH.
Fixes: 2ae7ac7ab2f1 ("kbuild: dtc: Allow adding device tree fragments via config")
Signed-off-by: Rouven Czerwinski <r.czerwinski at pengutronix.de>
---
scripts/Makefile.lib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 13b1789c01..94ca1b771b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -340,7 +340,7 @@ dts-frags = $(subst $(quote),,$(CONFIG_EXTERNAL_DTS_FRAGMENTS))
quiet_cmd_dtc = DTC $@
# For compatibility between make 4.2 and 4.3
H := \#
-cmd_dtc = /bin/echo -e '$(H)define $(subst -,_,$(*F))_dts 1\n'$(foreach f,$< $(dts-frags),'$(H)include "$(f)"\n') | \
+cmd_dtc = /usr/bin/env echo -e '$(H)define $(subst -,_,$(*F))_dts 1\n'$(foreach f,$< $(dts-frags),'$(H)include "$(f)"') | \
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \
$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
-i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \
--
2.34.1
More information about the barebox
mailing list