Can U-Boot be configured such that it can be started in RAM instead of NOR flash?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can U-Boot be configured such that it can be started in RAM instead of NOR flash?

729 Views
ravikumar1631
Contributor II

I am working on a P4080 based custom board. It is an AMP system in which primary core(core0) runs on Linux and secondary core (core1) runs on vxworks. Currently Linux (core0) is loading the entire vxWorks image into boot area and release the core1 from boot hold-off state. I have a requirement to have a independent bootloader for secondary core(core1) to initialise the core1 specific devices and load the actual vxworks image independently. Bootloader should run from RAM.

Is it possible to configure U-Boot for secondary core such that I can load it into RAM and start execution from RAM instead of flash?

Thanks.

0 Kudos
1 Reply

567 Views
Pavel
NXP Employee
NXP Employee

Answer from www.denx.de:

U-Boot expects to see a virgin CPU on many platforms, i. e. the CPU state must match what you see if the processor starts executing the first instructions when it comes out of reset. If you want to start U-Boot from another boot loader, you must disable a lot of code, i. e. all initialization parts that already have been performed by this other boot loader, like setting up the memory controller, initializing the SDRAM, initializing the serial port, setting up a stack frame etc. Also you must disable the relocation to RAM and adjust the link addresses etc.

 

(On machines with boot-ROM and U-Boot-SPL, you might have better luck.)

 

This requires a lot of experience with U-Boot, and the fact that you had to ask if this can be done means that you are not in a position to do this.

 

The code you have to disable contains the most critical parts in U-Boot, i. e. these are the areas where 99% or more of all errors are located when you port U-Boot to a new hardware. In the result, your RAM image may work, but in the end you will need a full image to program the flash memory with it, and then you will have to enable all this highly critical and completely untested code.

 

You see? You cannot use a RAM version of U-Boot to avoid testing a flash version, so you can save all this effort and just burn your image to flash.

 

Look at the following page:

https://www.denx.de/wiki/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos