mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Rostislav Lisovy <lisovy@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: Wrong barebox_image_size value
Date: Sun, 29 Sep 2013 14:30:25 +0200	[thread overview]
Message-ID: <1380457825.30104.8.camel@lolumad> (raw)
In-Reply-To: <20130927080557.GK30088@pengutronix.de>

Hello Sascha;
You are right; The problem is I did not use the defconfig, thus building
relocatable binary. After using freescale_mx53_smd_defconfig, proper
size value is stored in the image.
Thank you for the help;

Rostislav Lisovy


On Fri, 2013-09-27 at 10:05 +0200, Sascha Hauer wrote: 
> Hi Rostislav,
> 
> On Thu, Sep 26, 2013 at 10:30:29PM +0200, Rostislav Lisovy wrote:
> > Dear barebox developers and users;
> > I am compiling barebox for freescale-imx53-smd board. My issue is,
> > that the image does not contain the correct size record.
> > The "bootloader size" needed by the flashing tool is initialized in
> > freescale-mx53-smd/flash_header.c, in structure flash_header,
> > field .boot_data.size.
> > Formerly there used to be a hardcoded value 0x40000, nowadays we use
> > DCD_BAREBOX_SIZE which expands into (barebox_image_size + 4095), where
> > "barebox_image_size" has real size computed by the linker.
> > When the value .boot_data.size is filled by hand (as 0x40000), correct
> > value is stored in the barebox image.
> > Proof: hexdump -s 0x24 -n 4 barebox-flash-image
> > 0000024 0000 0004
> > 
> > however if .boot_data.size = DCD_BAREBOX_SIZE,
> > $ hexdump -s 0x24 -n 4 barebox-flash-image
> > 0000024 0fff 0000
> > where this 0xfff is the "+4095" added to round the value. (I am pretty
> > sure the offset into the image used by hexdump is correct).
> 
> Probably you are not building the defconfig, right? Compiling the
> defconfig gives me the correct value and it's at offset 0x424 in the
> image, not at 0x24.
> Maybe you are compiling a relocatable image as Jean-Christophe
> mentioned, then you would see this problem.
> 
> > 
> > The barebox version I am using most recent git, branch master.
> > The compiler (maybe here is the point of failure) is
> > arm-cortex_a8-linux-gnueabi-gcc (crosstool-NG hg+default-86a8d1d467c8)
> > 4.4.6.
> 
> That should be ok.
> 
> Sascha
> 



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2013-09-29 12:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 20:30 Rostislav Lisovy
2013-09-27  6:54 ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-29 12:26   ` Rostislav Lisovy
2013-09-27  8:05 ` Sascha Hauer
2013-09-29 12:30   ` Rostislav Lisovy [this message]

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=1380457825.30104.8.camel@lolumad \
    --to=lisovy@gmail.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