mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
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-Knig <Uwe.Kleine-Koenig@digi.com>
This commit is contained in:
parent
dd24058407
commit
3c234efa69
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
void (*theKernel)(int zero, int arch, uint params);
|
||||||
image_header_t *hdr = &header;
|
image_header_t *hdr = &header;
|
||||||
bd_t *bd = gd->bd;
|
bd_t *bd = gd->bd;
|
||||||
|
int machid = bd->bi_arch_number;
|
||||||
|
char *s;
|
||||||
|
|
||||||
#ifdef CONFIG_CMDLINE_TAG
|
#ifdef CONFIG_CMDLINE_TAG
|
||||||
char *commandline = getenv ("bootargs");
|
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);
|
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
|
* 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 ();
|
cleanup_before_linux ();
|
||||||
|
|
||||||
theKernel (0, bd->bi_arch_number, bd->bi_boot_params);
|
theKernel (0, machid, bd->bi_boot_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue