[U-Boot] U-boot -Modifying boot sequence on a ARM based board

Hi all, What is the general boot sequence for u-boot. IIRC, its the cpu specific start followed by board specfic stuff, then general init stuff (like misc_init_f) and then the common stuff. The reason i am asking this i want to inject my own boot path based on the presence of certain boot peripherals. I want to override the "boot_args" with my custom-defined bootargs and then execute "bootm" from a predefined RAM address. I want to know which is the most appropriate place for soing this. I was initilally thinking it would end up in the board specific code(board/<boardname>.c) but i am a bit confused when i read the main/common code.
Please let me your recommendations on this.
-Alfred.

Dear alfred steele,
In message 528f13590908200918s6f1a00d4v294867f350037551@mail.gmail.com you wrote:
What is the general boot sequence for u-boot. IIRC, its the cpu specific start followed by board specfic stuff, then general init stuff (like misc_init_f) and then the common stuff.
Not really. First low level intialization gets done, needed to set up a reasonable C execution environment; then all initialization running from flash gets done, RAM initalization included; then U-Boot relocates to RAM and initializes flash end the rest of the system. There are CPU resp. board specific and common parts in all of these steps, or at least there may be.
The reason i am asking this i want to inject my own boot path based on the presence of certain boot peripherals. I want to override the "boot_args" with my custom-defined bootargs and then execute "bootm" from a predefined RAM address.
No need to change any code then. Just define the needed environment variables to contain the commands you want.
I want to know which is the most appropriate place for soing this. I was initilally thinking it would end up in the board specific code(board/<boardname>.c) but i am a bit confused when i read the main/common code.
Don't change any code. Use the scripting capabilities of U-Boot's environment variables.
Best regards,
Wolfgang Denk
participants (2)
-
alfred steele
-
Wolfgang Denk