From: Trent Piepho <tpiepho@kymetacorp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] ARM: Fix calling of arm_mem_barebox_image()
Date: Wed, 14 Sep 2016 18:27:04 +0000 [thread overview]
Message-ID: <1473877833.4359.15.camel@rtred1test09.kymeta.local> (raw)
In-Reply-To: <1473841313-4204-2-git-send-email-s.hauer@pengutronix.de>
On Wed, 2016-09-14 at 10:21 +0200, Sascha Hauer wrote:
> arm_mem_barebox_image() is used to pick a suitable place where to
> put the final image to. This is called from both the PBL uncompression
> code and also from the final image. To make it work properly it is
> crucial that it's called with the same arguments both times. Currently
This code has changed since I was working with it, but wouldn't
arm_mem_barebox_image() returning a different value from when the PBL
code calls it versus barebox_non_pbl_start() just result in an
unnecessary relocation of the uncompressed barebox from the PBL's choice
to the main barebox choice?
> it is called with the wrong image size from the PBL uncompression code.
> The size passed to arm_mem_barebox_image() has to be the size of the
> whole uncompressed image including the BSS segment size. The PBL code
> calls it with the compressed image size instead and without the BSS
> segment. This patch fixes this by reading the uncompressed image size
> from the compressed binary (the uncompressed size is appended to the
> end of the compressed binary by our compression wrappers). The size
> of the BSS segment is unknown though by the PBL uncompression code,
> so we introduce a maximum BSS size which is used instead.
Could the size including BSS be appended? Seems like putting:
size -A barebox | awk '$1==".bss"{print $2}'
in the size_append function would do that pretty simply.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-09-14 18:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 8:21 [PATCH 1/2] Add comp_copy function for use with CONFIG_IMAGE_COMPRESSION_NONE Sascha Hauer
2016-09-14 8:21 ` [PATCH 2/2] ARM: Fix calling of arm_mem_barebox_image() Sascha Hauer
2016-09-14 18:27 ` Trent Piepho [this message]
2016-09-15 7:10 ` Sascha Hauer
2016-09-22 0:35 ` Trent Piepho
2016-09-28 8:37 ` Sascha Hauer
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=1473877833.4359.15.camel@rtred1test09.kymeta.local \
--to=tpiepho@kymetacorp.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox