PowerPC Host Userspace: Difference between revisions
(update qemu.git URL) |
(remove obsolete configure option) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== What You Need == | == What You Need == | ||
# A copy of the | # A copy of the [http://savannah.nongnu.org/git/?group=qemu qemu development source tree]. | ||
# A copy of the Linux kernel source tree. Note: <code>qemu.git</code> will not build with Linux 2.6.28 or earlier. | # A copy of the Linux kernel source tree. Note: <code>qemu.git</code> will not build with Linux 2.6.28 or earlier. | ||
# An installed copy of [http://git.jdl.com/gitweb/?p=dtc.git;a=summary libfdt], built for PowerPC. | # An installed copy of [http://git.jdl.com/gitweb/?p=dtc.git;a=summary libfdt], built for PowerPC. | ||
Line 40: | Line 40: | ||
./configure \ | ./configure \ | ||
--disable-sdl \ | --disable-sdl \ | ||
--target-list=ppcemb-softmmu \ | --target-list=ppcemb-softmmu \ | ||
--cross-prefix="$cross" \ | --cross-prefix="$cross" \ |
Latest revision as of 11:48, 26 August 2009
What You Need
- A copy of the qemu development source tree.
- A copy of the Linux kernel source tree. Note:
qemu.git
will not build with Linux 2.6.28 or earlier. - An installed copy of libfdt, built for PowerPC.
If you are cross-compiling from a non-PowerPC host, you also need:
- A cross-compiler, such as one built by crosstool.
- An installed copy of the zlib library, built for PowerPC.
Where to install the libraries
Before building qemu, you install the libfdt
and zlib
libraries where your toolchain will find them. If you are not cross-compiling, skip this section (because your toolchain will find them in the usual /usr/lib).
You can use cpp -v
to find your toolchain's built-in prefix. For example, if your toolchain was created by crosstool, cpp will say something like this:
% powerpc-440-linux-gnu-cpp -v
...
#include "..." search starts here:
#include <...> search starts here:
/opt/crosstool/gcc-3.4.5-glibc-2.3.6/powerpc-440-linux-gnu/lib/gcc/powerpc-440-linux-gnu/3.4.5/include
/opt/crosstool/gcc-3.4.5-glibc-2.3.6/powerpc-440-linux-gnu/lib/gcc/powerpc-440-linux-gnu/3.4.5/../../../../powerpc-440-linux-gnu/sys-include
/opt/crosstool/gcc-3.4.5-glibc-2.3.6/powerpc-440-linux-gnu/lib/gcc/powerpc-440-linux-gnu/3.4.5/../../../../powerpc-440-linux-gnu/include
End of search list.
The prefix here is /opt/crosstool/gcc-3.4.5-glibc-2.3.6/powerpc-440-linux-gnu/powerpc-440-linux-gnu
. (Basically pick the last ".../include" path and go up one directory.) Use that prefix to install zlib
and libfdt
.
Building Qemu for PowerPC KVM
Here is an example for the configure script at the top level of the kvm-userspace repository:
If cross-compiling, run this first:
cross=powerpc-440-linux-gnu-
./configure \
--disable-sdl \
--target-list=ppcemb-softmmu \
--cross-prefix="$cross" \
--kerneldir="/home/hollisb/source/kvmppc-dev.hg"
Build
make
will produce qemu/ppcemb-softmmu/qemu-system-ppcemb
. You must transfer that executable and qemu/pc-bios/bamboo.dtb
to the target.