summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/start.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-08 10:46:59 -0400
committerTom Rini <trini@konsulko.com>2015-05-08 10:46:59 -0400
commit02ffb580e6ab7aaa7f6703ed35f489e97439cb65 (patch)
tree77cea28c53d54583a3acfa5534a8aa10054eb29c /arch/sandbox/cpu/start.c
parent57cc4e64c13bc5f42cb5e8572d2c46e25cf7aea1 (diff)
parenta5e1bcdeebebabdc5d013fbd488f87a4e62ff411 (diff)
downloadu-boot-imx-02ffb580e6ab7aaa7f6703ed35f489e97439cb65.zip
u-boot-imx-02ffb580e6ab7aaa7f6703ed35f489e97439cb65.tar.gz
u-boot-imx-02ffb580e6ab7aaa7f6703ed35f489e97439cb65.tar.bz2
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'arch/sandbox/cpu/start.c')
-rw-r--r--arch/sandbox/cpu/start.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index ec01040..b23d08b 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -77,12 +77,18 @@ int sandbox_main_loop_init(void)
struct sandbox_state *state = state_get_current();
/* Execute command if required */
- if (state->cmd) {
- int retval;
+ if (state->cmd || state->run_distro_boot) {
+ int retval = 0;
cli_init();
- retval = run_command_list(state->cmd, -1, 0);
+ if (state->cmd)
+ retval = run_command_list(state->cmd, -1, 0);
+
+ if (state->run_distro_boot)
+ retval = cli_simple_run_command("run distro_bootcmd",
+ 0);
+
if (!state->interactive)
os_exit(retval);
}
@@ -90,6 +96,14 @@ int sandbox_main_loop_init(void)
return 0;
}
+static int sandbox_cmdline_cb_boot(struct sandbox_state *state,
+ const char *arg)
+{
+ state->run_distro_boot = true;
+ return 0;
+}
+SANDBOX_CMDLINE_OPT_SHORT(boot, 'b', 0, "Run distro boot commands");
+
static int sandbox_cmdline_cb_command(struct sandbox_state *state,
const char *arg)
{