[coreboot-gerrit] New patch to review for coreboot: 7f7d2e4 ARM: Put the ROM stage into the image before other bits.

Gabe Black (gabeblack@chromium.org) gerrit at coreboot.org
Mon Jun 10 08:30:18 CEST 2013


Gabe Black (gabeblack at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3420

-gerrit

commit 7f7d2e491accca9631b4c62a2fd349250a8ce44a
Author: Gabe Black <gabeblack at chromium.org>
Date:   Sun Jun 9 21:10:10 2013 -0700

    ARM: Put the ROM stage into the image before other bits.
    
    On ARM, there's frequently some firmware built into the SOC which runs
    first and which loads other firmware like Coreboot from some other
    media. To prevent the bootblock from having to know how to find and load
    the ROM stage from what may be a complicated source (sd card,
    netbooting, etc.), we can put the ROM stage immediately after the
    bootblock and ensure that they're both loaded at the same time.
    
    This change adjusts the Makefile.inc for ARM so that the ROM stage is put
    into the image before any other files so that we know it comes first.
    This changes the behavior of the CONFIG_UPDATE_IMAGE config option used
    by abuild, although it's not entirely clear whether that's still used.
    
    Change-Id: I832386243788156db5f5abbc9760a4e2026cf2cd
    Signed-off-by: Gabe Black <gabeblack at chromium.org>
---
 src/arch/armv7/Makefile.inc | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/arch/armv7/Makefile.inc b/src/arch/armv7/Makefile.inc
index 2c280f4..1045774 100644
--- a/src/arch/armv7/Makefile.inc
+++ b/src/arch/armv7/Makefile.inc
@@ -46,16 +46,20 @@ prebuild-files = \
 prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
 
 # TODO Change -b to Kconfig variable.
-$(obj)/coreboot.pre1: $(objcbfs)/bootblock.bin $$(prebuilt-files) $(CBFSTOOL)
+$(obj)/coreboot.pre: $(objcbfs)/bootblock.bin $(objcbfs)/romstage.elf $$(prebuilt-files) $(CBFSTOOL)
 	$(CBFSTOOL) $@.tmp create -m armv7 -s $(CONFIG_COREBOOT_ROMSIZE_KB)K \
 		-B $(objcbfs)/bootblock.bin -a 64 -b 0x0000 \
 		-H $(CONFIG_CBFS_HEADER_ROM_OFFSET) \
 		-o $(CONFIG_CBFS_ROM_OFFSET)
+	@printf "    CBFS       $(subst $(obj)/,,$(@))\n"
+	$(CBFSTOOL) $@.tmp add-stage \
+		-f $(objcbfs)/romstage.elf -b 0 \
+		-n $(CONFIG_CBFS_PREFIX)/romstage -c none
 	$(prebuild-files) true
 	mv $@.tmp $@
 else
-.PHONY: $(obj)/coreboot.pre1
-$(obj)/coreboot.pre1: $(CBFSTOOL)
+.PHONY: $(obj)/coreboot.pre
+$(obj)/coreboot.pre: $(CBFSTOOL)
 	mv $(obj)/coreboot.rom $@
 endif
 
@@ -184,17 +188,6 @@ ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/get_bus_conf.c
 endif
 
 ################################################################################
-# Build the final rom image
-
-$(obj)/coreboot.pre: $(objcbfs)/romstage.elf $(obj)/coreboot.pre1 $(CBFSTOOL)
-	@printf "    CBFS       $(subst $(obj)/,,$(@))\n"
-	cp $(obj)/coreboot.pre1 $@.tmp
-	$(CBFSTOOL) $@.tmp add-stage \
-		-f $(objcbfs)/romstage.elf \
-		-n $(CONFIG_CBFS_PREFIX)/romstage -c none
-	mv $@.tmp $@
-
-################################################################################
 # Build the bootblock
 
 bootblock_lds = $(src)/arch/armv7/bootblock.lds



More information about the coreboot-gerrit mailing list