[coreboot-gerrit] Patch set updated for coreboot: chromeos: Ensure that the last file in FW_MAIN is not also the first one

Paul Kocialkowski (contact@paulk.fr) gerrit at coreboot.org
Sun May 1 18:55:21 CEST 2016


Paul Kocialkowski (contact at paulk.fr) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14472

-gerrit

commit c345d20ea7c48aadc12a83eff737909e839508f7
Author: Paul Kocialkowski <contact at paulk.fr>
Date:   Fri Apr 22 11:10:03 2016 +0200

    chromeos: Ensure that the last file in FW_MAIN is not also the first one
    
    In the case where one of the FW_MAIN regions is empty, the last file
    (empty) will also appear to be first and have a zero offset, making head
    complain.
    
    This is a very borderline use case, since the FW_MAIN_ regions should
    have been filled previously, but an extra check doesn't hurt.
    
    Change-Id: I15491c5b4a5e7d1f9fb369cc5fa4e3875e2dad3b
    Signed-off-by: Paul Kocialkowski <contact at paulk.fr>
---
 src/vendorcode/google/chromeos/Makefile.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index 0ae6fb0..2b579d1 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -138,7 +138,7 @@ $(obj)/FW_MAIN_%.bin: $(obj)/coreboot.rom
 		tail -1 | \
 		sed "s,^(empty)[[:space:]]\(0x[0-9a-f]*\)\tnull\t.*$$,\1," \
 		> $@.tmp.size
-	if [ -n "$$(cat $@.tmp.size)" ]; then \
+	if [ -n "$$(cat $@.tmp.size)" ] && [ $$( printf "%d" $$(cat $@.tmp.size)) -gt 0 ]; then \
 		head -c $$( printf "%d" $$(cat $@.tmp.size)) $@.tmp > $@.tmp2 && \
 		mv $@.tmp2 $@; \
 	else \



More information about the coreboot-gerrit mailing list