mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] arm: allow to overwrite the system_rev via bootm
@ 2010-09-21 13:42 Jean-Christophe PLAGNIOL-VILLARD
  2010-09-21 15:09 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-21 13:42 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/lib/armlinux.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index 040fd34..b50d535 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,
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-21 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-21 13:42 [PATCH] arm: allow to overwrite the system_rev via bootm Jean-Christophe PLAGNIOL-VILLARD
2010-09-21 15:09 ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox