board_r: Support calling the main program after ulib init

For boards where ulib starts first we need to jump to the main program
afterwards. Add the logic for this.

Drop the noreturn attribute from board_init_r() and board_init_f_r to
avoid needing #ifdef in the C file.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-05 19:56:13 +01:00
parent 5bdf2b673d
commit da77a8a26f
3 changed files with 14 additions and 4 deletions

View File

@@ -392,6 +392,13 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
*/
int ulib_init_with_data(char *progname, struct global_data *data);
/**
* main() - main program called from ulib
*
* When ulib has to start up the machine, it calls main() when it is finished.
*/
int main(void);
#endif /* __ASSEMBLY__ */
/* Put only stuff here that the assembler can digest */