From: Matthias Kaehlcke <matthias@kaehlcke.net>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: confusion about relocation (ARM)
Date: Mon, 4 Jan 2010 20:21:53 +0100 [thread overview]
Message-ID: <20100104192153.GA30824@darwin> (raw)
In-Reply-To: <20100104120758.GC4976@pengutronix.de>
hi sascha,
El Mon, Jan 04, 2010 at 01:07:58PM +0100 Sascha Hauer ha dit:
> On Fri, Jan 01, 2010 at 10:48:26PM +0100, Matthias Kaehlcke wrote:
> > El Fri, Jan 01, 2010 at 09:36:29PM +0100 Eric Bénard ha dit:
> >
> > > Le 01/01/2010 20:48, Matthias Kaehlcke a écrit :
> > >> a comment in start_barebox() says 'We are running from RAM now', so i
> > >> deduced SDRAM must work. but after having a look at start-arm.S i'm a
> > >> little bit confused. as far as i understand the barebox code is copied
> > >> to RAM in copy_loop(). what i don't see is where the program counter
> > >> is set to the address in RAM?
> > >>
> > > in arch/arm/cpu/start-arm.S @ line 245 :
> > > ldr pc, _start_armboot
> >
> > i saw this line, but i don't understand how it comes that
> > the address at _start_armboot points to RAM and not to the flash.
>
> When your barebox image is linked to RAM (that is 0x05700000 in your
> case) _start_armboot is in RAM, too.
>
> >
> > another question: how does ARCH_TEXT_BASE fit in here? i defined it as
> > 0x05700000, but in the barebox image _TEXT_BASE is 0x00000000
>
> Have a look at barebox.S, it should look like:
>
> barebox: file format elf32-littlearm
>
>
> Disassembly of section .text:
>
> 87f00000 <_start>:
> ...
thanks for your reply!
finally i figured out what was going wrong: after getting compiler errors
when using a config file created from scratch, i took a defconfig of
another ARM board as starting point. this board defines
CONFIG_TEXT_BASE as 0x00000000, in consequence ARCH_TEXT_BASE
(0x05700000) of the edb93xx board wasn't used.
after setting CONFIG_TEST_BASE to the correct value i got a barebox
prompt :)
--
Matthias Kaehlcke
Embedded Linux Developer
Barcelona
Debugging is like alien abduction. Large blocks of time disappear,
for which you have no explanation
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-01-04 19:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-01 19:48 Matthias Kaehlcke
2010-01-01 20:36 ` Eric Bénard
2010-01-01 21:48 ` Matthias Kaehlcke
2010-01-04 12:07 ` Sascha Hauer
2010-01-04 19:21 ` Matthias Kaehlcke [this message]
2010-01-04 20:13 ` Robert Schwebel
2010-01-04 21:10 ` Matthias Kaehlcke
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=20100104192153.GA30824@darwin \
--to=matthias@kaehlcke.net \
--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