[coreboot-gerrit] New patch to review for coreboot: 861c456 build system: improve portability by not relying on extraordinary dd options
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Fri Apr 17 14:34:10 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9791
-gerrit
commit 861c456b8b8741f65d5c2eb0d056fdca61a0d313
Author: Patrick Georgi <pgeorgi at google.com>
Date: Fri Apr 17 14:32:34 2015 +0200
build system: improve portability by not relying on extraordinary dd options
expr and printf are hopefully portable enough.
Change-Id: Ibc7fe38ae11e9d477f85fdcf760b27abc6013f94
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
Makefile.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.inc b/Makefile.inc
index 204e518..5f9d420 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -560,7 +560,7 @@ $(obj)/coreboot.rom: $(obj)/coreboot.pre $(objcbfs)/ramstage.elf $(CBFSTOOL) $(c
@printf " CBFS $(subst $(obj)/,,$(@))\n"
# The full ROM may be larger than the CBFS part, so create an empty
# file (filled with \377 = 0xff) and copy the CBFS image over it.
- tr '\000' '\377' < /dev/zero 2> /dev/null | dd of=$@.tmp bs=8192 iflag=fullblock count=$$(($(CONFIG_ROM_SIZE) / 8192)) 2> /dev/null
+ tr '\000' '\377' < /dev/zero 2> /dev/null | dd of=$@.tmp bs=$$(expr \( $$(printf "%d" $(CONFIG_ROM_SIZE)) + 8192 - 1 \) / 8192 \* 8192) iflag=fullblock count=1 2> /dev/null
dd if=$(obj)/coreboot.pre of=$@.tmp bs=8192 conv=notrunc 2> /dev/null
$(CBFSTOOL) $@.tmp add-stage -f $(objcbfs)/ramstage.elf -n $(CONFIG_CBFS_PREFIX)/ramstage -c $(CBFS_COMPRESS_FLAG)
ifeq ($(CONFIG_PAYLOAD_NONE),y)
More information about the coreboot-gerrit
mailing list