Reputation: 473
Is it possible to include standalone applications/startup scripts in the u-boot bootup process, and what is the available hooks?
So far I can see from the hello_world example how to compile a standalone application in C, but it still needs to be loaded manually through tftp which I don't want to do.
EDIT: I have found several "hooks" listed in common.h such as
last_stage_init()
board_late_init()
Where can I find an idea of the proper workflow to add an application to make adjustments to the environment variables?
Upvotes: 0
Views: 1525
Reputation: 473
I wanted to use a u-boot startup script but did not know how to proceed and wrongfully used the term application.
I now use the hooks specified in board_r.c, for example misc_init_r()
and last_stage_init()
where I put my startup scripts required before boot.
Just remember to enable these functions with #define CONFIG_LAST_STAGE_INIT
and #define CONFIG_MISC_INIT_R()
Upvotes: 0
Reputation: 2173
The basic answer here is that you can have whatever you want run in the CONFIG_BOOTCOMMAND variable and that in turn can load and 'go' your application from wherever you have stored it on the device.
Upvotes: 1