Martin Guy, <martinwguy@yahoo.it>
Last updated: 2006-09-27.
I've been patching QEMU to make it run an ARM EABI kernel for the Debian ARM EABI architecture project.
To run QEMU in full-system emulation mode you need at least qemu-0.8.1 (which is currently the lastest in debian testing).
To run a single ARM EABI process in user-emulation mode, you need to apply
pbrook's TLS patches.
Those patches do not apply automatically with patch, so here
is a repackaged version
that applies automatically:
On slow machines (400MHz Pentium II), the kernel says it has detected a
lockup and barfs stack backtraces
but this deosn't happen when running it on faster machines (2 GHz Athlon).
Almost every command says "Using fallback suid method" before running,
but that is a busybox configuration issue, not our problem.
$ tar xfz qemu-0.8.2.tar.gz
$ cd qemu-0.8.2
$ patch -p1 < ../patch.qemu*-mg1
Note that these patches are not yet complete and may give subtle failures
in programs that use threads heavily.
Fetch, patch, build, install QEMU
I fetch and patch it with
wget http://qemu.org/qemu-0.8.2.tar.gz
tar xfz qemu-0.8.2.tar.gz
cd qemu-0.8.2
patch -p1 < ../patch.qemu*mg1
then build and install it (under /usr/local) with
./configure --cc=gcc-3.4 --host_cc=gcc-3.4 --disable-gfx-check --target-list=arm-user,arm-softmmu
make
make install
Kernel
You also need
I currently build the kernel as part of a crosstool run, fishing the zImage out of build/*/*/linux*/arch/arm/boot, and modifying the arm-test system
from QEMU's home page to use this kernel with the old-ABI busybox userland with
the command
This includes framebuffer support,
so you'll may want to add -append "console=ttyAMA0"
qemu-system-arm -kernel zImage.pbrook -M integratorcp1026 \
-initrd arm_root.img -nographic -append console=ttyAMA0
which boots into a shell prompt.