From d972f78e759ffccf9187ab3f3b00b567c7f30f53 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 17 Sep 2015 17:02:53 -0500 Subject: linking: link bootblock.elf with .data and .bss sections again Currently coreboot expects the loader to clear the bss section for all stages. i.e. stages don't clear their own bss. On ARM SoCs the BootROM would be responsible for this. To do that one needs to include the bss section data (all zeros) in the bootblock.bin file. This was previously being attempted by keeping the .bss info in the .data section because objcopy happened zero out non-file allocated data section data. Instead go back to linking bootblock with the bss section but mark the bss section as loadable allocatable data. That way it will be included in the binary properly when objcopy -O binary is emplyed. Also do the same for the data section in the case of no non-zero object values are in the data section. Without this change the trick of including .bss in .data was not working when there wasn't a non-zero value object in the data section. BUG=None BRANCH=None TEST=Built emulation/qemu-armv7 and noted bootblock.bin contains the cleared bss. Change-Id: I94bd404c2c4a8b9332393e6224e98940a9cad4a2 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/11680 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/soc/samsung/exynos5250/Makefile.inc | 3 --- src/soc/samsung/exynos5420/Makefile.inc | 3 --- 2 files changed, 6 deletions(-) (limited to 'src/soc/samsung') diff --git a/src/soc/samsung/exynos5250/Makefile.inc b/src/soc/samsung/exynos5250/Makefile.inc index 9f49134334..2731f178e8 100644 --- a/src/soc/samsung/exynos5250/Makefile.inc +++ b/src/soc/samsung/exynos5250/Makefile.inc @@ -46,9 +46,6 @@ ramstage-y += cbmem.c CPPFLAGS_common += -Isrc/soc/samsung/exynos5250/include/ -$(objcbfs)/bootblock.raw.elf: $(objcbfs)/bootblock.elf - cp $< $@ - $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin @printf " BL1, CKSUM $(subst $(obj)/,,$(@))\n" util/exynos/fixed_cksum.py $< $<.cksum 32768 diff --git a/src/soc/samsung/exynos5420/Makefile.inc b/src/soc/samsung/exynos5420/Makefile.inc index 753e6d0a86..498e8d1a57 100644 --- a/src/soc/samsung/exynos5420/Makefile.inc +++ b/src/soc/samsung/exynos5420/Makefile.inc @@ -48,9 +48,6 @@ rmodules_$(ARCH-ROMSTAGE-y)-y += timer.c CPPFLAGS_common += -Isrc/soc/samsung/exynos5420/include/ -$(objcbfs)/bootblock.raw.elf: $(objcbfs)/bootblock.elf - cp $< $@ - $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin @printf " BL1, CKSUM $(subst $(obj)/,,$(@))\n" util/exynos/variable_cksum.py $< $<.cksum -- cgit v1.2.3