[U-Boot] Relocating to my code.

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.
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...........
Regards, Prathika R

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
participants (2)
-
Detlev Zundel
-
prathika