]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sandbox: allow processing before main loop
authorSimon Glass <sjg@chromium.org>
Sun, 26 Feb 2012 22:38:50 +0000 (17:38 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 12 Mar 2012 15:06:00 +0000 (11:06 -0400)
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: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/sandbox/cpu/start.c
arch/sandbox/include/asm/u-boot-sandbox.h
arch/sandbox/lib/board.c

index 2b66eeddbb6b2337059290c0980bf04ed60d3585..4a84486c1eb39d8d69dd3fae7b2bb4b78996ae66 100644 (file)
 #include <common.h>
 #include <asm/state.h>
 
+int sandbox_main_loop_init(void)
+{
+       return 0;
+}
+
 int main(int argc, char *argv[])
 {
        int err;
index 236b4ee287b1d55bb76118501cd7fc10a0d9ef08..99e950b80579a0cf77f4f5fd6539112abba4b228 100644 (file)
@@ -35,4 +35,7 @@
 int board_init(void);
 int dram_init(void);
 
+/* start.c */
+int sandbox_main_loop_init(void);
+
 #endif /* _U_BOOT_SANDBOX_H_ */
index 6d464d6ae8d025f083af46fd523a9e9b9fb7d4b5..25a8d02fd7c76db778ba41c28bdd543a10395b66 100644 (file)
@@ -269,6 +269,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
        post_run(NULL, POST_RAM | post_bootmode_get(0));
 #endif
 
+       sandbox_main_loop_init();
+
        /*
         * For now, run the main loop. Later we might let this be done
         * in the main program.