From: Jerone Young <jyoung5@us.ibm.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-ppc-devel <kvm-ppc-devel@lists.sourceforge.net>,
EHRHARDT@de.ibm.com, Hollis Blanchard <hollisb@us.ibm.com>,
arnd@arndb.de, kvm-devel@lists.sourceforge.net,
jeroney@us.ibm.com
Subject: Re: buliding and testing PowerPC KVM
Date: Tue, 25 Mar 2008 13:23:10 -0500 [thread overview]
Message-ID: <1206469390.31609.5.camel@thinkpadL> (raw)
In-Reply-To: <1206469310.31609.3.camel@thinkpadL>
* Sorry was going for paste, and somehow hit send.
So it's actually really easy using cross compiler to build everything. I
use my laptop and then copy over to our nfs root that our boards use.
Here are some instructions I wrote up for someone earlier. Excuse the
<fill me> parts but it is enough to get you going:
This is a run through of how to build kvmppc kernel & kvm-userspace
You will need (all will have info how to get and install):
- cross tools
- zlib
- Linux kernel with KVM powerpc patches
- kvm-userspace tools
1) Grabbing need tools
=======================
1a) Cross Tools
----------------
- If you are running on an x86 based machine you need these tools
- cross tools can be found at:
http://www.kegel.com/crosstool/crosstool-0.43.tar.gz
Installation
------------
- Untar tarball and go into folder
- If you are using Ubuntu linux .. replace /bin/sh symlink:
sudo ln -sf /bin/bash /bin/sh
- As root, create folder /opt/crosstool. Then change the
permissions to allow everyone write access..this can be done
by running:
"chmod 777 /opt/crosstool"
- As a normal user run:
./demo-powerpc-405.sh
- Once done you should have directory in that is something like:
/opt/crosstool/gcc-<version>-glibc-<version>
- Now you want to add the bin direcotry to your $PATH
/opt/crosstool/gcc-<version>-glibc-<version>/powerpc-405-linux-gnu/bin
- Done
1b) Zlib
----------------
- Now you need to compile a version of Zlib for powerpc
- This will be used when building qemu while building kvm-userspace
- zlib source can be found at:
http://www.zlib.net/zlib-1.2.3.tar.gz
Installation
------------
- Untar tarball and go into folder
- Type the following in the follwoing.
type in:
CC=powerpc405-linux-gnu-gcc ./configure
- The run:
make
- DO NOT INSTALL
- You will now want to keep this directory around for later.
1c) Linux kernel with KVM PPC
-----------------------------
- Currently patches are not upstream yet. You will need to get source
from Hollis Blanchard or myself
1d) Kvm-userspace
------------------
- You will need to get the bleeding edge latest version of
kvm-userspace
tools to work for powerpc.
- To get these you will have to grab them from the git repository.
- You must first install git tools that can be found here:
http://git.or.cz/
- Now you can grab the folder by running the command:
git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git
2) Compiling Linux Kernel with kvm powerpc
==========================================
- Untar and go into directory
2a) Compiling a host kernel
---------------------------
- You will first need to copy over the default configuration for the
board
you are running on.
-For 440EP Bamboo:
cp arch/powerpc/configs/bamboo_defconfig .config
-For 440EPx Sequioa:
cp arch/powerpc/configs/sequoia_defconfig .config
- Now go into the menuconfiguration with the follwoing command:
make ARCH=powerpc CROSS_COMPILE=powerpc405-linux-gnu- menuconfig
- Once in menu, enable menu option "Virtualization"
- Then enable Virtualization->Kernel-based Virtual Machine (KVM)
support
- Also enable Virtualization->KVM guest support for PowerPC 440
- Save configuration
- Now to compile your kernel
-For 440EP Bamboo:
- make ARCH=powerpc CROSS_COMPILE=powerpc405-linux-gnu- treeImage
-For 440EPx Sequioa:
- make ARCH=powerpc CROSS_COMPILE=powerpc440-linux-gnu- cuImage
- Once compilation is done you will find kernel in proper format in
arch/powerpc/boot/
-For 440EP Bamboo it will be "treeImage"
-For 440EPx Sequioa it will be "cuImage"
2b) Compiling a guest kernel for KVM
------------------------------------
- <will fill in, this is in the process of changing>
3) Builing kvm-userspace
------------------------------------
- you will need a zlib compiled for powerpc
- you will need a complied copy of Linux kernel with kvm powerpc
3a) Compiling kvm-userspace
---------------------------
- Go into kvm-userspace directory
- To configure kvm-userspace you need to run the follwing command.
NOTE to fill in areas where there is <?>:
./configure --arch=powerpc --cross-prefix=powerpc-405-linux-gnu- \
--with-patched-kernel --kerneldir=<compiled Linux kernel dir> \
--disable-sdl --disable-vnc-tls --disable-gfx-check
--disable-gcc-check \
--qemu-cflags="-I<zlib dir> -I<compile Linux kernel dir>" \
--qemu-ldflags="-L<zlib dir>" \
--disable-cpu-emulation
- Run make
- Once done you can grab the binary for qemu in:
qemu/ppcemb-softmmu/qemu-system-ppcemb
- This is the binary to use.
<will fill this in more, but again things are changing>
4) Running the code
===================
4a) Load kernel module & setup device node
------------------------------------------
<fill in>
4b) Running qemu
-----------------
<fill in>
>
> On Tue, 2008-03-25 at 18:56 +0200, Avi Kivity wrote:
> > Hollis Blanchard wrote:
> > > On Fri, 2008-03-21 at 13:02 +0200, Avi Kivity wrote:
> > >
> > >> Other than that, and the few minor comments that popped up, this
> > >> (very
> > >> nice) patchset will be very easy to merge. IIRC you mentioned it is
> > >> possible for me to get an s390 account; this will be very useful in
> > >> avoiding breaking this port, as happens quite often with ppc and
> > >> ia64.
> > >> I'd like to be able to do both build and run testing.
> > >>
> > >
> > > As for building the PowerPC code, cross-compiling is easy with
> > > http://kegel.com/crosstool . There are also a number of servers offering
> > > remote PowerPC ssh access: see http://penguinppc.org/dev/#remote .
> > >
> > >
> >
> > I now have a ppc account. Once you point me at the ppc kernel repo I
> > can start build testing.
> >
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-03-25 18:23 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 16:24 [RFC/PATCH 00/15] kvm on big iron Carsten Otte
2008-03-21 11:02 ` Avi Kivity
2008-03-21 11:22 ` [kvm-devel] " Carsten Otte
2008-03-21 19:44 ` buliding and testing PowerPC KVM Hollis Blanchard
2008-03-25 16:56 ` Avi Kivity
2008-03-25 18:18 ` Hollis Blanchard
2008-03-25 18:21 ` Jerone Young
2008-03-25 18:23 ` Jerone Young [this message]
2008-03-26 16:40 ` Avi Kivity
2008-03-22 17:02 ` [RFC/PATCH 00/15 v2] kvm on big iron Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 00/15 v3] " Carsten Otte
2008-03-27 12:02 ` Avi Kivity
[not found] ` <1206458154.6217.12.camel@cotte.boeblingen.de.ibm.com>
2008-03-25 17:47 ` [RFC/PATCH 01/15 v3] preparation: provide hook to enable pgstes in user pagetable Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 02/15 v3] preparation: host memory management changes for s390 kvm Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 03/15 v3] preparation: address of the 64bit extint parm in lowcore Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 04/15 v3] preparation: split sysinfo defintions for kvm use Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 05/15 v3] kvm-s390: s390 arch backend for the kvm kernel module Carsten Otte
2008-03-31 5:36 ` Arnd Bergmann
2008-04-02 10:20 ` Christian Borntraeger
2008-03-25 17:47 ` [RFC/PATCH 06/15 v3] kvm-s390: sie intercept handling Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 07/15 v3] kvm-s390: interrupt subsystem, cpu timer, waitpsw Carsten Otte
2008-03-31 5:43 ` Arnd Bergmann
2008-03-25 17:47 ` [RFC/PATCH 08/15 v3] kvm-s390: intercepts for privileged instructions Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 09/15 v3] kvm-s390: interprocessor communication via sigp Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 10/15 v3] kvm-s390: intercepts for diagnose instructions Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 11/15 v3] kvm-s390: add kvm to kconfig on s390 Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 12/15 v3] kvm-s390: API documentation Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 13/15 v3] kvm-s390: update maintainers Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 14/15 v3] guest: detect when running on kvm Carsten Otte
2008-03-25 17:47 ` [RFC/PATCH 15/15 v3] guest: virtio device support, and kvm hypercalls Carsten Otte
[not found] ` <1206203560.7177.45.camel@cotte.boeblingen.de.ibm.com>
2008-03-22 17:02 ` [RFC/PATCH 01/15 v2] preparation: provide hook to enable pgstes in user pagetable Carsten Otte
2008-03-24 21:50 ` Andrew Morton
2008-03-22 17:02 ` [RFC/PATCH 02/15 v2] preparation: host memory management changes for s390 kvm Carsten Otte
2008-03-24 21:52 ` Andrew Morton
2008-03-22 17:02 ` [RFC/PATCH 03/15 v2] preparation: address of the 64bit extint parm in lowcore Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 04/15 v2] preparation: split sysinfo defintions for kvm use Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 05/15 v2] kvm-s390: s390 arch backend for the kvm kernel module Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 06/15 v2] kvm-s390: sie intercept handling Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 07/15 v2] kvm-s390: interrupt subsystem, cpu timer, waitpsw Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 08/15 v2] kvm-s390: intercepts for privileged instructions Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 09/15 v2] kvm-s390: interprocessor communication via sigp Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 10/15 v2] kvm-s390: intercepts for diagnose instructions Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 11/15 v2] kvm-s390: add kvm to kconfig on s390 Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 12/15 v2] kvm-s390: API documentation Carsten Otte
2008-03-22 17:03 ` [RFC/PATCH 13/15 v2] kvm-s390: update maintainers Carsten Otte
2008-03-22 17:03 ` [RFC/PATCH 14/15 v2] guest: detect when running on kvm Carsten Otte
2008-03-22 17:03 ` [RFC/PATCH 15/15 v2] guest: virtio device support, and kvm hypercalls Carsten Otte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1206469390.31609.5.camel@thinkpadL \
--to=jyoung5@us.ibm.com \
--cc=EHRHARDT@de.ibm.com \
--cc=arnd@arndb.de \
--cc=avi@qumranet.com \
--cc=hollisb@us.ibm.com \
--cc=jeroney@us.ibm.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=kvm-ppc-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox