mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] ARM: use arm_system_rev from environment
Date: Fri, 14 Oct 2011 04:24:56 +0200	[thread overview]
Message-ID: <20111014022456.GB1459@game.jcrosoft.org> (raw)
In-Reply-To: <1318517909-21205-2-git-send-email-s.hauer@pengutronix.de>

On 16:58 Thu 13 Oct     , Sascha Hauer wrote:
> 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);
we need to use boot getopt  as done on bootm

Best Regards,
J.

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

  reply	other threads:[~2011-10-14  2:56 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 ` [PATCH 1/2] ARM: use arm_system_rev from environment Sascha Hauer
2011-10-14  2:24   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=20111014022456.GB1459@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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