mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
Merge branch 'master' of git://git.denx.de/u-boot
This commit is contained in:
commit
38a510d1e5
3 changed files with 63 additions and 29 deletions
|
@ -43,27 +43,12 @@ static int linux_env_idx;
|
|||
static void linux_params_init(ulong start, char *commandline);
|
||||
static void linux_env_set(char *env_name, char *env_val);
|
||||
|
||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
||||
bootm_headers_t *images)
|
||||
static void boot_prep_linux(bootm_headers_t *images)
|
||||
{
|
||||
void (*theKernel) (int, char **, char **, int *);
|
||||
char *commandline = getenv("bootargs");
|
||||
char env_buf[12];
|
||||
char *cp;
|
||||
|
||||
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
|
||||
return 1;
|
||||
|
||||
/* find kernel entry point */
|
||||
theKernel = (void (*)(int, char **, char **, int *))images->ep;
|
||||
|
||||
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("## Transferring control to Linux (at address %08lx) ...\n",
|
||||
(ulong) theKernel);
|
||||
#endif
|
||||
|
||||
linux_params_init(UNCACHED_SDRAM(gd->bd->bi_boot_params), commandline);
|
||||
|
||||
#ifdef CONFIG_MEMSIZE_IN_BYTES
|
||||
|
@ -96,11 +81,45 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
|
|||
cp = getenv("eth1addr");
|
||||
if (cp)
|
||||
linux_env_set("eth1addr", cp);
|
||||
}
|
||||
|
||||
static void boot_jump_linux(bootm_headers_t *images)
|
||||
{
|
||||
void (*theKernel) (int, char **, char **, int *);
|
||||
|
||||
/* find kernel entry point */
|
||||
theKernel = (void (*)(int, char **, char **, int *))images->ep;
|
||||
|
||||
debug("## Transferring control to Linux (at address %08lx) ...\n",
|
||||
(ulong) theKernel);
|
||||
|
||||
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
|
||||
|
||||
/* we assume that the kernel is in place */
|
||||
printf("\nStarting kernel ...\n\n");
|
||||
|
||||
theKernel(linux_argc, linux_argv, linux_env, 0);
|
||||
}
|
||||
|
||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
||||
bootm_headers_t *images)
|
||||
{
|
||||
/* No need for those on MIPS */
|
||||
if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
|
||||
return -1;
|
||||
|
||||
if (flag & BOOTM_STATE_OS_PREP) {
|
||||
boot_prep_linux(images);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (flag & BOOTM_STATE_OS_GO) {
|
||||
boot_jump_linux(images);
|
||||
return 0;
|
||||
}
|
||||
|
||||
boot_prep_linux(images);
|
||||
boot_jump_linux(images);
|
||||
|
||||
/* does not return */
|
||||
return 1;
|
||||
|
|
|
@ -16,11 +16,6 @@ Toolchains
|
|||
Known Issues
|
||||
------------
|
||||
|
||||
* Little endian build problem
|
||||
|
||||
If use non-ELDK toolchains, -EB will be set to CPPFLAGS. Therefore all
|
||||
objects will be generated in big-endian format.
|
||||
|
||||
* Cache incoherency issue caused by do_bootelf_exec() at cmd_elf.c
|
||||
|
||||
Cache will be disabled before entering the loaded ELF image without
|
||||
|
@ -55,3 +50,9 @@ TODOs
|
|||
* Due to cache initialization issues, the DRAM on board must be
|
||||
initialized in board specific assembler language before the cache init
|
||||
code is run -- that is, initialize the DRAM in lowlevel_init().
|
||||
|
||||
* get rid of CONFIG_MANUAL_RELOC
|
||||
|
||||
* centralize/share more CPU code of MIPS32, MIPS64 and XBurst
|
||||
|
||||
* support Qemu Malta
|
||||
|
|
|
@ -6,8 +6,8 @@ http://www.nongnu.org/qemu/
|
|||
|
||||
Limitations & comments
|
||||
----------------------
|
||||
Supports the "-m mips" configuration of qemu: serial,NE2000,IDE.
|
||||
Support is big endian only for now (or at least this is what I tested).
|
||||
Supports the "-M mips" configuration of qemu: serial,NE2000,IDE.
|
||||
Supports little and big endian as well as 32 bit and 64 bit.
|
||||
Derived from au1x00 with a lot of things cut out.
|
||||
|
||||
Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with
|
||||
|
@ -21,19 +21,33 @@ Notes for the Qemu MIPS port
|
|||
|
||||
I) Example usage:
|
||||
|
||||
# ln -s u-boot.bin mips_bios.bin
|
||||
start it:
|
||||
qemu-system-mips -L . /dev/null -nographic
|
||||
Using u-boot.bin as ROM (replaces Qemu monitor):
|
||||
|
||||
or
|
||||
32 bit, big endian:
|
||||
# make qemu_mips
|
||||
# qemu-system-mips -M mips -bios u-boot.bin -nographic
|
||||
|
||||
32 bit, little endian:
|
||||
# make qemu_mipsel
|
||||
# qemu-system-mipsel -M mips -bios u-boot.bin -nographic
|
||||
|
||||
64 bit, big endian:
|
||||
# make qemu_mips64
|
||||
# qemu-system-mips64 -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic
|
||||
|
||||
64 bit, little endian:
|
||||
# make qemu_mips64el
|
||||
# qemu-system-mips64el -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic
|
||||
|
||||
or using u-boot.bin from emulated flash:
|
||||
|
||||
if you use a qemu version after commit 4224
|
||||
|
||||
create image:
|
||||
# dd of=flash bs=1k count=4k if=/dev/zero
|
||||
# dd of=flash bs=1k conv=notrunc if=u-boot.bin
|
||||
start it:
|
||||
# qemu-system-mips -M mips -pflash flash -monitor null -nographic
|
||||
start it (see above):
|
||||
# qemu-system-mips[64][el] [-cpu MIPS64R2-generic] -M mips -pflash flash -nographic
|
||||
|
||||
2) Download kernel + initrd
|
||||
|
Loading…
Reference in a new issue