From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mo2.mail-out.ovh.net ([178.32.228.2]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1R4Xnf-0007fh-OL for barebox@lists.infradead.org; Fri, 16 Sep 2011 12:45:50 +0000 Received: from mail240.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo2.mail-out.ovh.net (Postfix) with SMTP id C00B4DD3406 for ; Fri, 16 Sep 2011 14:46:52 +0200 (CEST) From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 16 Sep 2011 14:23:42 +0200 Message-Id: <1316175828-19748-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/7] arm: export arch_number to env To: barebox@lists.infradead.org so we can dynamise the boot depending on the machine Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/lib/armlinux.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index 5bdbb92..9f2ecd2 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -184,9 +184,16 @@ void armlinux_set_bootparams(void *params) armlinux_bootparams = params; } +static char *arch_number; + void armlinux_set_architecture(int architecture) { armlinux_architecture = architecture; + + kfree(arch_number); + arch_number = asprintf("%d", architecture); + setenv("arch_number", arch_number); + export("arch_number"); } void armlinux_set_revision(unsigned int rev) -- 1.7.5.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox