]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
authorTom Rini <trini@ti.com>
Tue, 29 Jan 2013 20:36:23 +0000 (15:36 -0500)
committerTom Rini <trini@ti.com>
Tue, 29 Jan 2013 20:36:23 +0000 (15:36 -0500)
arch/mips/lib/bootm.c
doc/README.mips
doc/README.qemu-mips [moved from board/qemu-mips/README with 88% similarity]

index 608c1a78db895fd2f9432788712126d2976be3cf..a36154a892c1ea687b5148772d1d384da664712d 100644 (file)
@@ -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;
index 85dea400c8fc1e4c8b85f6bcd2886cba21f4f720..f4f770b99fb281333a6cc3a5e4f848f7a6566969 100644 (file)
@@ -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
similarity index 88%
rename from board/qemu-mips/README
rename to doc/README.qemu-mips
index 9fd97e1249a915dc9befd6414bba0a1a0089a156..1fdfbab67747a502fdda615767f8c87b8597bbcf 100644 (file)
@@ -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