PowerPC Host Userspace: Difference between revisions
ShaharMintz (talk | contribs) No edit summary |
(update qemu.git URL) |
||
Line 1: | Line 1: | ||
== What You Need == | == What You Need == | ||
# A copy of the qemu development source tree ( | # A copy of the qemu development source tree (http://savannah.nongnu.org/git/?group=qemu). | ||
# 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. |
Revision as of 15:55, 13 May 2009
What You Need
- A copy of the qemu development source tree (http://savannah.nongnu.org/git/?group=qemu).
- 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 \
--disable-gfx-check \
--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.