diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-18 15:45:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-19 10:51:01 +0200 |
commit | 49ff3691b435c04d938ae6b75eaf18dac93817cc (patch) | |
tree | d9147b3b86cb9f11d15bff42f87cc09cac19e078 /arch | |
parent | 5db3059ebc856711db3254cb1ffa61783d48391b (diff) | |
download | barebox-49ff3691b435c04d938ae6b75eaf18dac93817cc.tar.gz barebox-49ff3691b435c04d938ae6b75eaf18dac93817cc.tar.xz |
arm: Add bootu command
bootu command to start raw (uncompressed) Linux images
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/lib/armlinux.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index 6e8428919c..65e14f0b21 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -296,7 +296,7 @@ err_out: return 1; } -static const __maybe_unused char cmd_ls_help[] = +static const __maybe_unused char cmd_bootz_help[] = "Usage: bootz [FILE]\n" "Boot a Linux zImage\n"; @@ -304,7 +304,41 @@ U_BOOT_CMD_START(bootz) .maxargs = 2, .cmd = do_bootz, .usage = "bootz - start a zImage", + U_BOOT_CMD_HELP(cmd_bootz_help) U_BOOT_CMD_END #endif /* CONFIG_CMD_BOOTZ */ +#ifdef CONFIG_CMD_BOOTU +static int do_bootu(cmd_tbl_t *cmdtp, int argc, char *argv[]) +{ + void (*theKernel)(int zero, int arch, void *params); + const char *commandline = getenv("bootargs"); + + if (argc != 2) { + u_boot_cmd_usage(cmdtp); + return 1; + } + + theKernel = (void *)simple_strtoul(argv[1], NULL, 0); + setup_start_tag(); + setup_memory_tags(); + setup_commandline_tag(commandline); + setup_end_tag(); + + cleanup_before_linux(); + theKernel(0, armlinux_architecture, armlinux_bootparams); + + return 1; +} + +static const __maybe_unused char cmd_bootu_help[] = +"Usage: bootu <address>\n"; + +U_BOOT_CMD_START(bootu) + .maxargs = 2, + .cmd = do_bootu, + .usage = "bootu - start a raw linux image", + U_BOOT_CMD_HELP(cmd_bootu_help) +U_BOOT_CMD_END +#endif /* CONFIG_CMD_BOOTU */ |