From c5ff6487e65294aac4dccbf6b2a56ac518f982e2 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Wed, 6 Feb 2013 12:41:49 +0800 Subject: armv7: Prevent CBFS data overlapping bootblock. For arm/snow, current bootblock is larger than previously assigned CBFS offset and will fail to boot. To prevent this happening again in future, cbfstool now checks if CBFS will overlap bootblock. A sample error message: E: Bootblock (0x0+0x71d4) overlap CBFS data (0x5000) E: Failed to create build/coreboot.pre1.tmp. arm/snow offset is also enlarged and moved to Kconfig variable. Change-Id: I4556aef27ff716556040312ae8ccb78078abc82d Signed-off-by: Hung-Te Lin Reviewed-on: http://review.coreboot.org/2295 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- src/arch/armv7/Makefile.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/arch') diff --git a/src/arch/armv7/Makefile.inc b/src/arch/armv7/Makefile.inc index f2f4a4731c..7d02e7c109 100644 --- a/src/arch/armv7/Makefile.inc +++ b/src/arch/armv7/Makefile.inc @@ -45,10 +45,12 @@ prebuild-files = \ $(if $(call extract_nth,4,$(file)),-b $(call extract_nth,4,$(file))) &&) prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file))) -# TODO Change -b, -H, -o to Kconfig variables. +# TODO Change -b to Kconfig variable. $(obj)/coreboot.pre1: $(objcbfs)/bootblock.bin $$(prebuilt-files) $(CBFSTOOL) $(CBFSTOOL) $@.tmp create -m armv7 -s $(CONFIG_COREBOOT_ROMSIZE_KB)K \ - -B $(objcbfs)/bootblock.bin -a 64 -b 0x0000 -H 0x2040 -o 0x5000 + -B $(objcbfs)/bootblock.bin -a 64 -b 0x0000 \ + -H $(CONFIG_CBFS_HEADER_ROM_OFFSET) \ + -o $(CONFIG_CBFS_ROM_OFFSET) $(prebuild-files) true mv $@.tmp $@ else -- cgit v1.2.3