mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH] arm: allow to overwrite the system_rev via bootm
Date: Tue, 21 Sep 2010 15:42:47 +0200	[thread overview]
Message-ID: <1285076567-12594-1-git-send-email-plagnioj@jcrosoft.com> (raw)

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

             reply	other threads:[~2010-09-21 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 13:42 Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-09-21 15:09 ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285076567-12594-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox