diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-04 15:49:00 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-04 15:49:00 +0100 |
commit | da5fe0ba470283b384760c4976815fc20c1d45bd (patch) | |
tree | 11f2a08de885570d5d8c453f0c8b384427c666c0 /commands | |
parent | aacd51bfd2d20138b6f9c549fb4f1aa66e88243b (diff) | |
parent | 195310fd7b48e2c1198f216f9b4122d8f63e620e (diff) | |
download | barebox-da5fe0ba470283b384760c4976815fc20c1d45bd.tar.gz barebox-da5fe0ba470283b384760c4976815fc20c1d45bd.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'commands')
-rw-r--r-- | commands/Kconfig | 3 | ||||
-rw-r--r-- | commands/bootm.c | 16 | ||||
-rw-r--r-- | commands/reset.c | 23 |
3 files changed, 34 insertions, 8 deletions
diff --git a/commands/Kconfig b/commands/Kconfig index c9a53b773e..1addd91d24 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -267,6 +267,7 @@ endmenu menu "memory" config CMD_LOADB + depends on !CONSOLE_NONE select CRC16 tristate prompt "loadb" @@ -274,10 +275,12 @@ config CMD_LOADB config CMD_LOADY select CRC16 select XYMODEM + depends on !CONSOLE_NONE tristate prompt "loady" config CMD_LOADS + depends on !CONSOLE_NONE tristate prompt "loads" diff --git a/commands/bootm.c b/commands/bootm.c index 483e6a1933..5ccf2372ac 100644 --- a/commands/bootm.c +++ b/commands/bootm.c @@ -143,8 +143,7 @@ static int bootm_open_oftree(struct image_data *data, const char *oftree, int nu size_t size; unsigned int align; - if (bootm_verbose(data)) - printf("Loading oftree from '%s'\n", oftree); + printf("Loading devicetree from '%s'\n", oftree); ft = file_name_detect_type(oftree); if ((int)ft < 0) { @@ -380,13 +379,14 @@ static int do_bootm(int argc, char *argv[]) } } + printf("\nLoading OS %s '%s'", file_type_to_string(os_type), + data.os_file); + if (os_type == filetype_uimage && + data.os->header.ih_type == IH_TYPE_MULTI) + printf(", multifile image %d", data.os_num); + printf("\n"); + if (bootm_verbose(&data)) { - printf("\nLoading OS %s '%s'", file_type_to_string(os_type), - data.os_file); - if (os_type == filetype_uimage && - data.os->header.ih_type == IH_TYPE_MULTI) - printf(", multifile image %d", data.os_num); - printf("\n"); if (data.os_res) printf("OS image is at 0x%08x-0x%08x\n", data.os_res->start, diff --git a/commands/reset.c b/commands/reset.c index 835926b270..79885f4afc 100644 --- a/commands/reset.c +++ b/commands/reset.c @@ -20,17 +20,40 @@ #include <common.h> #include <command.h> #include <complete.h> +#include <getopt.h> static int cmd_reset(int argc, char *argv[]) { + int opt, shutdown_flag; + + shutdown_flag = 1; + + while ((opt = getopt(argc, argv, "f")) > 0) { + switch (opt) { + case 'f': + shutdown_flag = 0; + break; + } + } + + if (shutdown_flag) + shutdown_barebox(); + reset_cpu(0); /* Not reached */ return 1; } +BAREBOX_CMD_HELP_START(reset) +BAREBOX_CMD_HELP_USAGE("reset [-f]\n") +BAREBOX_CMD_HELP_SHORT("Perform RESET of the CPU.\n") +BAREBOX_CMD_HELP_OPT("-f", "force RESET, don't call shutdown\n") +BAREBOX_CMD_HELP_END + BAREBOX_CMD_START(reset) .cmd = cmd_reset, .usage = "Perform RESET of the CPU", + BAREBOX_CMD_HELP(cmd_reset_help) BAREBOX_CMD_COMPLETE(empty_complete) BAREBOX_CMD_END |