Skip to content

Commit

Permalink
Random cleanups. Kernel runs on qemu port now.
Browse files Browse the repository at this point in the history
  • Loading branch information
atgreen committed Sep 11, 2009
1 parent 8dc9c22 commit 8c998fe
Show file tree
Hide file tree
Showing 24 changed files with 311,725 additions and 20 deletions.
2 changes: 1 addition & 1 deletion BUILDNUM
@@ -1 +1 @@
84
85
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2009-09-10 Anthony Green <green@moxielogic.com>

* build.xml: Fix initramfs reference before building kernel.

2009-08-02 Anthony Green <green@moxielogic.com>

* dtc/*: New files.
Expand Down
14 changes: 14 additions & 0 deletions TODO
Expand Up @@ -92,3 +92,17 @@ foo:
this common operation. Maybe cmp1 might even make sense. This is easy
to measure.

-------------------------------------------------------------------------------
* uClinux Port
-------------------------------------------------------------------------------

- Design early boot / handoff from firmware. Here are some initial thoughts..

- The kernel should assume that pointer to a flattened device tree is in one of
the special registers. How would it get there?

1) gdb sim.. import a dts/dtb file into the sim and force it into the end or RAM,
then load a pointer to it into one of the special regsters.

2) qemu.. similarly, but we should load the dtb from a file (as a .o maybe?) whose
name is based on the board/SoC we're simulation (moxiesim, for instance)
16 changes: 15 additions & 1 deletion build.xml
Expand Up @@ -328,7 +328,7 @@
<arg value="-c"/>
<arg value="(cd linux-2.6; cp arch/moxie/configs/nommu_defconfig arch/moxie/defconfig)"/>
</exec>
<replace file="${basedir}/linux-2.6/arch/moxie/defconfig" token="@ROOTFS@" value="${basedir}/initfs/uclinux/root/" />
<replace file="${basedir}/linux-2.6/arch/moxie/defconfig" token="@ROOTFS@" value="${basedir}/initfs/uclinux/initramfs.txt" />
<exec executable="make">
<env key="PATH" path="${basedir}/root/usr/bin:${env.PATH}"/>
<arg value="--directory=linux-2.6"/>
Expand Down Expand Up @@ -437,10 +437,24 @@
<arg value="install"/>
</exec>

<echo message="===================================================================="/>
<echo message="====== Building BusyBox ============================================"/>
<echo message="===================================================================="/>
<mkdir dir="build/elf2flt"/>
<exec executable="make">
<env key="PATH" path="${basedir}/root/usr/bin:${env.PATH}"/>
<arg value="--directory=busybox"/>
</exec>

<echo message="===================================================================="/>
<echo message="====== Building initfs for uClinux ================================="/>
<echo message="===================================================================="/>
<mkdir dir="build/gcc-uclinux"/>
<exec executable="sh">
<arg value="-c"/>
<arg value="(cd initfs/uclinux; cp initramfs.txt.in initramfs.txt"/>
</exec>
<replace file="${basedir}/initfs/uclinux/initramfs.txt" token="@TOP@" value="${basedir}" />
<exec executable="make">
<env key="PATH" path="${basedir}/root/usr/bin:${env.PATH}"/>
<arg value="--directory=initfs/uclinux/src"/>
Expand Down
22 changes: 11 additions & 11 deletions linux-2.6/arch/moxie/kernel/early_printk.c
Expand Up @@ -28,17 +28,17 @@ static u32 base_addr;
static void early_libgloss_printk_write(struct console *unused,
const char *s, unsigned n)
{
/* First, try the simulator escape... */
asm ("ldi.l $r0, 0x0");
asm ("swi 5");

/* Then try writing to the qemu serial port... */
{
int i = 0;
while (i < n)
*(char *)0x3f8 = s[i++];
return n;
}
/* First, try the simulator escape... */
asm ("ldi.l $r0, 0x0");
asm ("swi 5");
/* Then try writing to the qemu serial port... */
{
int i = 0;
while (i < n)
*(char *)0x3f8 = s[i++];
return n;
}
}

extern struct tty_driver *hp_simserial_driver;
Expand Down
2 changes: 1 addition & 1 deletion linux-2.6/arch/moxie/kernel/vmlinux.lds
@@ -1,7 +1,7 @@
/*
* Automatically generated C config: don't edit
* Linux kernel version: 2.6.31-rc3
* Wed Aug 19 11:34:27 2009
* Wed Sep 9 17:34:29 2009
*/
/*
* Copyright (C) 2009 Anthony Green <green@moxielogic.com>
Expand Down
Empty file added moxie/rtl/verilog/.vcd
Empty file.

0 comments on commit 8c998fe

Please sign in to comment.