From: Rob Landley <rob@landley.net>
To: Zhi Yong Wu <zwu.kernel@gmail.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [Help]: How to setup a VM based on kernel source code.
Date: Sat, 20 Aug 2011 16:41:52 -0500 [thread overview]
Message-ID: <4E502A20.8020505@landley.net> (raw)
In-Reply-To: <CAEH94Li6dO_22adYS5ftJ5OnnwtOF+BdgzL6aAnY8xwRuHo_Qg@mail.gmail.com>
On 08/19/2011 04:58 AM, Zhi Yong Wu wrote:
> HI,
>
> I have met one scenario; currently i want to set up a VM based on
> latest kernel tree; but i only have latest kernel source code and
> compiled it on one fedora 15 workstation. To achieve the objective,
> what actions should i take next step? use -kernel -initrd options?
> other ways?
>
> If you have this experience, pls give me one hand. thanks.
I've done this, the project is at http://landley.net/aboriginal
It a big bash script that:
A) downloads source code
B) builds a cross compiler (for any of a dozen targets)
C) builds a new root filesystem and kernel
E) packages it up into a system image qemu can boot.
The system images include shell scripts that invoke qemu with the
appropriate command line arguments.
You can download the build scritps here:
http://landley.net/aboriginal/downloads
You can download prebuilt binary tarballs for each supported target here:
http://landley.net/aboriginal/downloads/binaries
What you probably want to do is grab something like
system-image-armv5l.tar.bz2, extract it, "./run-emulator.sh" (which
should give you a shell prompt inside the emulator, type "exit" when
done), and then once you're happy it works for you look at the
run-emulator.sh script to see how it's invoking qemu, then look at the
build scripts to see how it's compiling everything. (There's no make
magic or python or anything in there, it's all just bash scripts.)
Each of those system images has the relevant config files used to build
the kernel, uClibc, and busybox in the /usr/src directory.
A few years ago I wrote up a giant lump of documentation here:
http://landley.net/aboriginal/downloads/presentation.pdf
I'm putting together a 1.0.3 release with Linux 3.0, busybox 1.19.0, and
uClibc 0.9.32 this weekend. If you don't want to wait for the release,
go to http;//landley.net/hg/aboriginal and click on one of the download
links near the top to get a tarball of the current build scripts from
source control.
Rob
prev parent reply other threads:[~2011-08-20 21:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 9:58 [Qemu-devel] [Help]: How to setup a VM based on kernel source code Zhi Yong Wu
2011-08-19 13:14 ` Stefan Hajnoczi
2011-08-20 14:14 ` Zhi Yong Wu
2011-08-20 21:41 ` Rob Landley [this message]
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=4E502A20.8020505@landley.net \
--to=rob@landley.net \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=zwu.kernel@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).