From: Detlev Zundel Date: Wed, 24 Jun 2009 10:34:04 +0200 Subject: [U-Boot] Relocating to my code. In-Reply-To: <4A3F43F0.4050603@deeopl.com> (prathika@deeopl.com's message of "Mon, 22 Jun 2009 14:12:24 +0530") References: <4A3F43F0.4050603@deeopl.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Prathika, > hi everyone, > I am working on a card based on PPC440EP, I am porting u-boot on this card. > As I understand, the PPC initially boots from the flash and then > relocates itself to RAM address where there is board_init_r() and > main_loop() is called. Correct. Running from flash makes writing to flash (i.e. updating images there) somewhat complicated. > I have an application code that simply does a loop back on UART > channel2. After all the initialization, > I want to knock off the relocation code, board_init_r() and main_loop() > execution in u-boot and relocate it to my application > The application code will residing in flash. How can I do this.... > anyone kindly help me in this regard........... Why do you want to run from flash - what exactly are you trying to do? Did you think about the consequences, i.e. where will your code store local variables, etc.? Why do you want to use U-Boot in the first place if you do not want to use its main functionality? Cheers Detlev -- The mathematician's patterns, like the painter's or the poet's, must be beautiful; the ideas, like the colours or the words, must fit together in a harmonious way. Beauty is the first test: there is no permanent place in the world for ugly mathematics. -- G. H. Hardy -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de