FreeBSD

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m (add link to GTA02 Openness)
Line 1: Line 1:
Interested in using FreeBSD on the Neo1973 or as a Host OS? Get in touch with mn -at- bsdgroup.de, he is currently exploring what to do about this.
+
Interested in using FreeBSD on the Neo1973 or as a Host OS? Get in touch with mn -at- bsdgroup.de and andrew -at- fubar.geek.nz, they are currently exploring what to do about this.
  
Useful pages:
+
 
 +
== Running FreeBSD in Qemu-neo1973 ==
 +
A FreeBSD port is only ready for kernel developers.
 +
 
 +
=== Required tools ===
 +
You will need a copy of mkimage from u-boot. To build it fetch a copy of u-boot, cd to the tools directory and build it manually:
 +
<code>
 +
gcc -c -DUSE_HOSTCC -I../include mkimage.c ../lib_generic/crc32.c -o crc32.o
 +
gcc -c -DUSE_HOSTCC -I../include mkimage.c -o mkimage.o
 +
gcc mkimage.o crc32.o -o mkimage
 +
</code>
 +
 
 +
You will also need a copy of Qemu-neo1973. Hints on building it are avaliable from [[Talk:OpenMoko under QEMU|this page.]]
 +
 
 +
=== Building FreeBSD ===
 +
You will need to download http://fubar.geek.nz/files/freebsd/neo1973/neo1973-0.20070917.tar.bz2 and extract it over the FreeBSD src tree.
 +
 
 +
From the FreeBSD src tree run:
 +
<code>
 +
make buildworld TARGET=arm TARGET_ARCH=arm TARGET_CPUTYPE=arm920t
 +
make buildkernel TARGET=arm TARGET_ARCH=arm TARGET_CPUTYPE=arm920t KERNCONF=NEO1973
 +
gzip -9 usr/obj/path/to/kernel
 +
/path/to/mkimage -A arm -O freebsd -T kernel -C gzip -a 30008000 -e 30008000 -n "Kernel Image QT2410" -d /usr/obj/path/to/kernel.gz /usr/obj/same/path/kernel.boot
 +
</code>
 +
 
 +
You will now have a copy of FreeBSD that is able to be loaded by u-boot.
 +
 
 +
=== Running FreeBSD ===
 +
From the qemu directory edit the openmoko/flash.sh and add the line
 +
<code>
 +
kernel_image="/usr/obj/path/to/kernel.boot"
 +
</code>
 +
after the four "most_recent" lines.
 +
 
 +
Next run
 +
<code>
 +
./openmoko/download.sh
 +
./openmoko/flash.sh
 +
</code>
 +
 
 +
This will fetch the required parts and create an image to run. They require you to have bash installed.
 +
 
 +
Finally run qemu with
 +
<code>
 +
arm-softmmu/qemu-system-arm -M neo -m 130 -mtdblock openmoko/openmoko-flash.image -kernel openmoko/openmoko-kernel.bin -usb -show-cursor
 +
</code>
 +
 
 +
It will display "Kernel loading..." with no further messages.
 +
 
 +
== Useful pages ==
 
[[GTA02 Openness]]
 
[[GTA02 Openness]]

Revision as of 22:43, 16 September 2007

Interested in using FreeBSD on the Neo1973 or as a Host OS? Get in touch with mn -at- bsdgroup.de and andrew -at- fubar.geek.nz, they are currently exploring what to do about this.


Contents

Running FreeBSD in Qemu-neo1973

A FreeBSD port is only ready for kernel developers.

Required tools

You will need a copy of mkimage from u-boot. To build it fetch a copy of u-boot, cd to the tools directory and build it manually:


gcc -c -DUSE_HOSTCC -I../include mkimage.c ../lib_generic/crc32.c -o crc32.o
gcc -c -DUSE_HOSTCC -I../include mkimage.c -o mkimage.o
gcc mkimage.o crc32.o -o mkimage

You will also need a copy of Qemu-neo1973. Hints on building it are avaliable from this page.

Building FreeBSD

You will need to download http://fubar.geek.nz/files/freebsd/neo1973/neo1973-0.20070917.tar.bz2 and extract it over the FreeBSD src tree.

From the FreeBSD src tree run:


make buildworld TARGET=arm TARGET_ARCH=arm TARGET_CPUTYPE=arm920t
make buildkernel TARGET=arm TARGET_ARCH=arm TARGET_CPUTYPE=arm920t KERNCONF=NEO1973
gzip -9 usr/obj/path/to/kernel
/path/to/mkimage -A arm -O freebsd -T kernel -C gzip -a 30008000 -e 30008000 -n "Kernel Image QT2410" -d /usr/obj/path/to/kernel.gz /usr/obj/same/path/kernel.boot

You will now have a copy of FreeBSD that is able to be loaded by u-boot.

Running FreeBSD

From the qemu directory edit the openmoko/flash.sh and add the line


kernel_image="/usr/obj/path/to/kernel.boot"

after the four "most_recent" lines.

Next run


./openmoko/download.sh
./openmoko/flash.sh

This will fetch the required parts and create an image to run. They require you to have bash installed.

Finally run qemu with


arm-softmmu/qemu-system-arm -M neo -m 130 -mtdblock openmoko/openmoko-flash.image -kernel openmoko/openmoko-kernel.bin -usb -show-cursor

It will display "Kernel loading..." with no further messages.

Useful pages

GTA02 Openness

Personal tools

Interested in using FreeBSD on the Neo1973 or as a Host OS? Get in touch with mn -at- bsdgroup.de, he is currently exploring what to do about this.

Useful pages: GTA02 Openness