Zheng Bao ([email protected]) just uploaded a new patch set to gerrit, which 
you can find at http://review.coreboot.org/650

-gerrit

commit 121bf312e7d51f9dd340b5e8da3a16d1fcb63866
Author: zbao <[email protected]>
Date:   Fri Feb 17 21:21:23 2012 +0800

    Exit building if romstage.bin is larger than size of XIP
    
    When the romstage.bin becomes bigger than the size of XIP, the
    cbfstool can not allocate the romstage in the CBFS. But it doesn't
    report an error. It will take quite a while to find out the root
    cause.
    
    Change-Id: I5be2a46a8b57934f14c5a0d4596f3bec4251e0aa
    Signed-off-by: Zheng Bao <[email protected]>
    Signed-off-by: zbao <[email protected]>
---
 src/arch/x86/Makefile.inc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index c9cbb01..271b94d 100755
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -346,6 +346,7 @@ $(obj)/coreboot.romstage: $(obj)/coreboot.pre1 
$$(romstage-objs) $(obj)/romstage
        $(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) 
-T $(obj)/romstage/ldscript.ld $(romstage-objs)
        $(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
        printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld
+       test `stat -c%s $(obj)/romstage.bin` -le `printf %d 
$(CONFIG_XIP_ROM_SIZE)` || { echo "The romstage is larger than XIP size. Please 
expand the CONFIG_XIP_ROM_SIZE" && exit 1; }
        $(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin 
$(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt
        cat $(obj)/location.txt >> $(obj)/location.ld
        printf ';\n' >> $(obj)/location.ld

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to