[PATCH 01/12 v2] arm: export arch_number to env

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Sep 19 08:15:38 EDT 2011


so we can dynamise the boot depending on the machine

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 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




More information about the barebox mailing list