X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_arm%2Farmlinux.c;h=42098fcd657243ca86a73ec1ed7c2763cdde7551;hb=0fa7a1b4719e325fce332689fb8754ec166191ff;hp=6d32a411fdee5acf4e78f085a3987f19c8d770eb;hpb=f2c2a937d8c4a44f63ff88bf82023e03a29497a2;p=u-boot diff --git a/lib_arm/armlinux.c b/lib_arm/armlinux.c index 6d32a411fd..42098fcd65 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 */ @@ -160,7 +168,8 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], do_reset (cmdtp, flag, argc, argv); } -#if defined(CONFIG_B2) || defined(CONFIG_EVB4510) || defined(CONFIG_ARMADILLO) +#if defined(CONFIG_B2) || defined(CONFIG_EVB4510) || \ + defined(CONFIG_ARMADILLO) || defined(CONFIG_M501SK) /* *we need to copy the ramdisk to SRAM to let Linux boot */ @@ -260,7 +269,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); }