summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-09-09 20:34:51 +0200
committerMichael Niewöhner <c0d3z3r0@review.coreboot.org>2020-09-10 17:30:00 +0000
commit3992da034f9f8a52df87202f7caa7056388f97d2 (patch)
tree75653e5853b9ab4027afb603ae836c5628bb884a /src/lib
parent28276fc834af8cfbdb26b48b24f53db7e2422adc (diff)
lib/Makefile.inc: fix hex-to-bin conversion of SPD files
This fixes the hex-to-bin conversion command, used to generated binary SPD files from hexdumps. An issue that only appeared on one of my systems, where conversion of '01 02 03' to binary resulted in \x01\x32\x03 instead of \x01\x02\x03: for c in 01 02 03; do printf $(printf '\%o' 0x$c); done | xxd -g 1 00000000: 01 32 03 .2. The reason for this was that the syntax in lib/Makefile.inc is wrong, because the backslash must be escaped due to chaining two printf commands. Change-Id: I36b0efac81977e95d3cc4f189c3ae418379fe315 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45207 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Makefile.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 4ce133a336..e23b9de414 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -362,7 +362,7 @@ LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(
$(LIB_SPD_BIN): $(LIB_SPD_DEPS)
for f in $(LIB_SPD_DEPS); \
do for c in $$(cat $$f | grep --binary-files=text -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
+ do printf $$(printf '\\%o' 0x$$c); \
done; \
done > $@