[U-Boot] [PATCH 1/2] armv8: calculate __bss_size in u-boot-spl.lds

Oded Gabbay oded.gabbay at gmail.com
Mon Dec 26 15:20:40 CET 2016


This patch adds a missing __bss_size symbol to the default armv8
u-boot-spl.lds file.
Makefile.spl relies on __bss_size to be present when it creates the SPL
image. It uses that symbol to create a pad file that will be used to place
the dtb after the bss section.
In ARMv8 default u-boot-spl.lds, __bss_size was missing and therefore, the
pad file was always 0. As a result, the dtb was placed after
_image_binary_end, which caused a failure when loading it inside the SPL.

Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
Cc: Albert Aribaud <albert.u.boot at aribaud.net>
---
 arch/arm/cpu/armv8/u-boot-spl.lds | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
index cc427c3..e7799cc 100644
--- a/arch/arm/cpu/armv8/u-boot-spl.lds
+++ b/arch/arm/cpu/armv8/u-boot-spl.lds
@@ -70,6 +70,7 @@ SECTIONS
 		KEEP(*(.__bss_end));
 	} >.sdram
 
+	__bss_size = __bss_end - _image_binary_end;
 	/DISCARD/ : { *(.dynsym) }
 	/DISCARD/ : { *(.dynstr*) }
 	/DISCARD/ : { *(.dynamic*) }
-- 
2.7.4



More information about the U-Boot mailing list