summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-09-21 15:42:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-09-22 10:32:12 +0200
commit0eb8686dc2cb332c4839ef1f56f29b1607b5954a (patch)
treec778d788a01516689aafe004fd6920cf6608165f /arch
parent14f5e927f44e539c15ac60c9310e0d8a5e224b50 (diff)
downloadbarebox-0eb8686dc2cb332c4839ef1f56f29b1607b5954a.tar.gz
barebox-0eb8686dc2cb332c4839ef1f56f29b1607b5954a.tar.xz
arm: allow to overwrite the system_rev via bootm
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/armlinux.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index 040fd346bf..b50d535811 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -249,19 +249,29 @@ int do_bootm_linux(struct image_data *data)
static int image_handle_cmdline_parse(struct image_data *data, int opt,
char *optarg)
{
+ int ret = 1;
+
switch (opt) {
case 'a':
armlinux_architecture = simple_strtoul(optarg, NULL, 0);
- return 0;
+ ret = 0;
+ break;
+ case 'R':
+ system_rev = simple_strtoul(optarg, NULL, 0);
+ ret = 0;
+ break;
default:
- return 1;
+ break;
}
+
+ return ret;
}
static struct image_handler handler = {
- .cmdline_options = "a:",
+ .cmdline_options = "a:R:",
.cmdline_parse = image_handle_cmdline_parse,
- .help_string = " -a <arch> use architecture number <arch>",
+ .help_string = " -a <arch> use architecture number <arch>\n"
+ " -R <system_rev> use system revison <system_rev>\n",
.bootm = do_bootm_linux,
.image_type = IH_OS_LINUX,