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>
This commit is contained in:
parent
28276fc834
commit
3992da034f
|
@ -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 > $@
|
||||
|
||||
|
|
Loading…
Reference in New Issue