All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] armv8: calculate __bss_size in u-boot-spl.lds
Date: Mon, 26 Dec 2016 16:20:40 +0200	[thread overview]
Message-ID: <1482762041-8416-1-git-send-email-oded.gabbay@gmail.com> (raw)

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

             reply	other threads:[~2016-12-26 14:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-26 14:20 Oded Gabbay [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482762041-8416-1-git-send-email-oded.gabbay@gmail.com \
    --to=oded.gabbay@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.