diff --git a/include/image-commands.mk b/include/image-commands.mk index ea5e483b525..1bf9b9be336 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -407,9 +407,9 @@ define Build/elx-header hw_id="$(hw_id)"; \ echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \ dd bs=20 count=1 conv=sync; \ - echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ + echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -w2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ dd bs=8 count=1 conv=sync; \ - echo -ne "$$($(MKHASH) md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ + echo -ne "$$($(MKHASH) md5 $@ | fold -w2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ dd bs=58 count=1 conv=sync; \ ) > $(KDIR)/tmp/$(DEVICE_NAME).header -$(call Build/xor-image,-p $(xor_pattern) -x) \ diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 846e908db86..8fba65e0ec6 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -184,7 +184,7 @@ define Build/znet-header payload_size_crc="$$(dd if=$@ ibs=1 count=$$payload_len 2>/dev/null | gzip -c | \ tail -c 8 | od -An -N4 -tx4 --endian big | tr -d ' \n')"; \ echo -ne "$(magic)" | dd bs=4 count=1 conv=sync 2>/dev/null; \ - echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tac | tr -d '\n')" | \ + echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -w2 | xargs -I {} echo \\x{} | tac | tr -d '\n')" | \ dd bs=4 count=1 conv=sync 2>/dev/null; \ echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \ dd bs=4 count=1 conv=sync 2>/dev/null; \