upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.1 KiB
57 lines
1.1 KiB
19 years ago
|
/*
|
||
17 years ago
|
* U-boot - boot.c - misc boot helper functions
|
||
19 years ago
|
*
|
||
17 years ago
|
* Copyright (c) 2005-2008 Analog Devices Inc.
|
||
19 years ago
|
*
|
||
|
* (C) Copyright 2000-2004
|
||
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||
|
*
|
||
17 years ago
|
* Licensed under the GPL-2 or later.
|
||
19 years ago
|
*/
|
||
|
|
||
|
#include <common.h>
|
||
|
#include <command.h>
|
||
|
#include <image.h>
|
||
17 years ago
|
#include <asm/blackfin.h>
|
||
19 years ago
|
|
||
|
#ifdef SHARED_RESOURCES
|
||
18 years ago
|
extern void swap_to(int device_id);
|
||
19 years ago
|
#endif
|
||
|
|
||
17 years ago
|
static char *make_command_line(void)
|
||
|
{
|
||
17 years ago
|
char *dest = (char *)CONFIG_LINUX_CMDLINE_ADDR;
|
||
17 years ago
|
char *bootargs = getenv("bootargs");
|
||
|
|
||
|
if (bootargs == NULL)
|
||
|
return NULL;
|
||
|
|
||
17 years ago
|
strncpy(dest, bootargs, CONFIG_LINUX_CMDLINE_SIZE);
|
||
|
dest[CONFIG_LINUX_CMDLINE_SIZE - 1] = 0;
|
||
17 years ago
|
return dest;
|
||
|
}
|
||
19 years ago
|
|
||
17 years ago
|
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
||
19 years ago
|
{
|
||
17 years ago
|
int (*appl) (char *cmdline);
|
||
|
char *cmdline;
|
||
19 years ago
|
|
||
16 years ago
|
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
|
||
|
return 1;
|
||
|
|
||
19 years ago
|
#ifdef SHARED_RESOURCES
|
||
|
swap_to(FLASH);
|
||
|
#endif
|
||
|
|
||
17 years ago
|
appl = (int (*)(char *))images->ep;
|
||
17 years ago
|
|
||
19 years ago
|
printf("Starting Kernel at = %x\n", appl);
|
||
|
cmdline = make_command_line();
|
||
17 years ago
|
icache_disable();
|
||
|
dcache_disable();
|
||
18 years ago
|
(*appl) (cmdline);
|
||
17 years ago
|
/* does not return */
|
||
17 years ago
|
|
||
17 years ago
|
return 1;
|
||
19 years ago
|
}
|