[PATCH 1/7] arm: export arch_number to env
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Sep 16 08:23:42 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..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
More information about the barebox
mailing list