Commit ab4e07eb authored by Simon Glass's avatar Simon Glass Committed by Mike Frysinger
Browse files

sandbox: allow processing before main loop



In order to pass command line arguments to sandbox we need to be able
to act on them. So take control back at the end of board_init_r() from
where we can call the main loop or do something else.
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 6fb62078
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
#include <common.h> #include <common.h>
#include <asm/state.h> #include <asm/state.h>
int sandbox_main_loop_init(void)
{
return 0;
}
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int err; int err;
......
...@@ -35,4 +35,7 @@ ...@@ -35,4 +35,7 @@
int board_init(void); int board_init(void);
int dram_init(void); int dram_init(void);
/* start.c */
int sandbox_main_loop_init(void);
#endif /* _U_BOOT_SANDBOX_H_ */ #endif /* _U_BOOT_SANDBOX_H_ */
...@@ -269,6 +269,8 @@ void board_init_r(gd_t *id, ulong dest_addr) ...@@ -269,6 +269,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
post_run(NULL, POST_RAM | post_bootmode_get(0)); post_run(NULL, POST_RAM | post_bootmode_get(0));
#endif #endif
sandbox_main_loop_init();
/* /*
* For now, run the main loop. Later we might let this be done * For now, run the main loop. Later we might let this be done
* in the main program. * in the main program.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment