From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] ARM: use arm_system_rev from environment
Date: Thu, 13 Oct 2011 16:58:28 +0200 [thread overview]
Message-ID: <1318517909-21205-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1318517909-21205-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/lib/armlinux.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index e3a74f4..f636f12 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -198,7 +198,14 @@ void armlinux_set_architecture(int architecture)
void armlinux_set_revision(unsigned int rev)
{
+ char *revstr = asprintf("%d", rev);
+
system_rev = rev;
+
+ setenv("arm_system_rev", revstr);
+ export("arm_system_rev");
+
+ kfree(revstr);
}
void armlinux_set_serial(u64 serial)
@@ -209,6 +216,10 @@ void armlinux_set_serial(u64 serial)
void start_linux(void *adr, int swap, struct image_data *data)
{
void (*kernel)(int zero, int arch, void *params) = adr;
+ const char *revstr = getenv("arm_system_rev");
+
+ if (revstr)
+ system_rev = simple_strtoul(revstr, NULL, 0);
setup_tags(data, swap);
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-10-13 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 14:58 patches Sascha Hauer
2011-10-13 14:58 ` Sascha Hauer [this message]
2011-10-14 2:24 ` [PATCH 1/2] ARM: use arm_system_rev from environment Jean-Christophe PLAGNIOL-VILLARD
2011-10-13 14:58 ` [PATCH 2/2] nand: export some useful information about flashes to device variables Sascha Hauer
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=1318517909-21205-2-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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