From: prathika <prathika@deeopl.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Relocating to my code.
Date: Thu, 25 Jun 2009 08:57:45 +0530 [thread overview]
Message-ID: <4A42EEB1.109@deeopl.com> (raw)
In-Reply-To: <m2prcthhtv.fsf@ohwell.denx.de>
Detlev Zundel wrote:
> Hi Prathika,
>
>
>> I did not mean it should run from flash itself..My application will
>> just reside in flash, I will read back from flash to a RAM location.
>>
>
> To be honest, I have trouble understanding this.
>
>
>> As I understand, in board_init_f(), after calling the init_sequence,
>> relocate_code() is called and it is a must to call relocate_code(),
>> from where it branches to main_loop(). My aim is to branch to my
>> application code before calling relocate_code().My application code's
>> executable address is 0x40004.
>>
>
> Well, if you are working on a PowerPC platform, then 0x40004 is
> certainly a RAM address.
>
>
>> Is it that i can just give jump to 0x40004 before calling
>> relocate_code() and it works?
>>
>
> I still don't get why you want to change *anything* inside U-Boot. Why
> not just use the commands that are available in the command line
> interpreter? Say you have your application stored at fc2e0000
> (arbitrary address) and it is 64k in size. Then why not just do:
>
> cp.b fc2e0000 40000 10000;go 40004
>
> Setting bootenv to these commands will start your application on U-Boot
> timeout. Sticking them into preboot even runs them before the command
> line is started at all.
>
>
--Thanks for your reply Detley. I think I was just trying to complicate
things.I have got a better picture now.
Before calling relcoate_code() in board.c, ifI using the command
"cp.b fc2e0000 40000 10000;go 40004" should be fine.....
Thanks & Regards,
Prathika R
next prev parent reply other threads:[~2009-06-25 3:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 8:42 [U-Boot] Relocating to my code prathika
2009-06-24 8:34 ` Detlev Zundel
[not found] ` <4A41EA8A.8080802@deeopl.com>
2009-06-24 13:39 ` Detlev Zundel
2009-06-25 3:27 ` prathika [this message]
2009-06-25 12:58 ` Detlev Zundel
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=4A42EEB1.109@deeopl.com \
--to=prathika@deeopl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox