r4037 - trunk/src/host/qemu-neo1973/hw

andrew at sita.openmoko.org andrew at sita.openmoko.org
Sun Feb 10 12:42:47 CET 2008


Author: andrew
Date: 2008-02-10 12:42:46 +0100 (Sun, 10 Feb 2008)
New Revision: 4037

Modified:
   trunk/src/host/qemu-neo1973/hw/neo1973.c
Log:
Use u-boot's preboot-override to set up an initial environment on the first run.


Modified: trunk/src/host/qemu-neo1973/hw/neo1973.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/neo1973.c	2008-02-10 07:58:37 UTC (rev 4036)
+++ trunk/src/host/qemu-neo1973/hw/neo1973.c	2008-02-10 11:42:46 UTC (rev 4037)
@@ -627,7 +627,17 @@
 #else
     load_image("u-boot.bin", phys_ram_base + 0x03f80000);
     load_image(s->kernel, phys_ram_base + 0x00800000);
+
     s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000;
+
+    if (strstr(s->kernel, "u-boot")) {	/* FIXME */
+        /* Exploit preboot-override to set up an initial environment */
+        stl_raw(phys_ram_base + 0x03f80040, S3C_RAM_BASE | 0x007fff00);
+        strcpy(phys_ram_base + 0x007fff00,
+                        "setenv stdin serial; "
+                        "setenv stdout serial; "
+                        "setenv stderr serial; ");
+    }
 #endif
 
     /* Imitate ONKEY wakeup */





More information about the commitlog mailing list