aboutsummaryrefslogtreecommitdiff
path: root/lib_arm
diff options
context:
space:
mode:
authorUwe Kleine-König2008-01-30 09:08:49 +0100
committerWolfgang Denk2008-02-14 22:24:07 +0100
commit3c234efa693bc59906c2be55c7918ecbb55392ea (patch)
treec0cde2d4db4c78ebf3763098135a43e261130452 /lib_arm
parentdd24058407c5add45cc60aec6c757ddc1a17e1b0 (diff)
ARM: make the machid configurable via the environment
If the variable "machid" exists, let do_bootm_linux use that instead of bd->bi_arch_number. Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Diffstat (limited to 'lib_arm')
-rw-r--r--lib_arm/armlinux.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib_arm/armlinux.c b/lib_arm/armlinux.c
index 6d32a411fde..62185f047dc 100644
--- a/lib_arm/armlinux.c
+++ b/lib_arm/armlinux.c
@@ -78,6 +78,8 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
void (*theKernel)(int zero, int arch, uint params);
image_header_t *hdr = &header;
bd_t *bd = gd->bd;
+ int machid = bd->bi_arch_number;
+ char *s;
#ifdef CONFIG_CMDLINE_TAG
char *commandline = getenv ("bootargs");
@@ -85,6 +87,12 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
theKernel = (void (*)(int, int, uint))ntohl(hdr->ih_ep);
+ s = getenv ("machid");
+ if (s) {
+ machid = simple_strtoul (s, NULL, 16);
+ printf ("Using machid 0x%x from environment\n", machid);
+ }
+
/*
* Check if there is an initrd image
*/
@@ -260,7 +268,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
cleanup_before_linux ();
- theKernel (0, bd->bi_arch_number, bd->bi_boot_params);
+ theKernel (0, machid, bd->bi_boot_params);
}