[PATCH 1/2] ARM: use arm_system_rev from environment
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Thu Oct 13 22:24:56 EDT 2011
On 16:58 Thu 13 Oct , Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer at 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.
More information about the barebox
mailing list