From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 14.mo1.mail-out.ovh.net ([178.32.97.215] helo=mo1.mail-out.ovh.net) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1R5d6p-0000UD-Ad for barebox@lists.infradead.org; Mon, 19 Sep 2011 12:38:04 +0000 Received: from mail179.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo1.mail-out.ovh.net (Postfix) with SMTP id C1E7C100450F for ; Mon, 19 Sep 2011 14:38:53 +0200 (CEST) From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 19 Sep 2011 14:15:38 +0200 Message-Id: <1316434549-15243-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 01/12 v2] 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..25b0f2a 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -186,7 +186,14 @@ void armlinux_set_bootparams(void *params) void armlinux_set_architecture(int architecture) { + char *arch_number = asprintf("%d", architecture); + armlinux_architecture = architecture; + + setenv("arch_number", arch_number); + export("arch_number"); + + kfree(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