public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] armv8: calculate __bss_size in u-boot-spl.lds
@ 2016-12-26 14:20 Oded Gabbay
  2016-12-26 14:20 ` [U-Boot] [PATCH 2/2] armv8: add asserts of sizes to u-boot-spl.lds Oded Gabbay
  2017-01-17  9:27 ` [U-Boot] [PATCH 1/2] armv8: calculate __bss_size in u-boot-spl.lds Oded Gabbay
  0 siblings, 2 replies; 8+ messages in thread
From: Oded Gabbay @ 2016-12-26 14:20 UTC (permalink / raw)
  To: u-boot

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@gmail.com>
Cc: Albert Aribaud <albert.u.boot@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-26 14:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-26 14:20 [U-Boot] [PATCH 1/2] armv8: calculate __bss_size in u-boot-spl.lds Oded Gabbay
2016-12-26 14:20 ` [U-Boot] [PATCH 2/2] armv8: add asserts of sizes to u-boot-spl.lds Oded Gabbay
2017-01-09  0:56   ` Tom Rini
2017-01-17  7:55   ` Masahiro Yamada
2017-01-17  8:04     ` Oded Gabbay
2017-01-17  9:27 ` [U-Boot] [PATCH 1/2] armv8: calculate __bss_size in u-boot-spl.lds Oded Gabbay
2017-01-19 11:28   ` Masahiro Yamada
2017-01-26 14:24     ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox