* [Qemu-devel] [Help]: How to setup a VM based on kernel source code.
@ 2011-08-19 9:58 Zhi Yong Wu
2011-08-19 13:14 ` Stefan Hajnoczi
2011-08-20 21:41 ` Rob Landley
0 siblings, 2 replies; 4+ messages in thread
From: Zhi Yong Wu @ 2011-08-19 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, kvm
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.
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Help]: How to setup a VM based on kernel source code.
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
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2011-08-19 13:14 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: qemu-devel, kvm
On Fri, Aug 19, 2011 at 10:58 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote:
> 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?
You can build a kernel with all drivers (e.g. virtio-net, virtio-blk)
compiled in and then boot using -kernel and -append. I find that
simplest.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Help]: How to setup a VM based on kernel source code.
2011-08-19 13:14 ` Stefan Hajnoczi
@ 2011-08-20 14:14 ` Zhi Yong Wu
0 siblings, 0 replies; 4+ messages in thread
From: Zhi Yong Wu @ 2011-08-20 14:14 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, kvm
On Fri, Aug 19, 2011 at 9:14 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Fri, Aug 19, 2011 at 10:58 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote:
>> 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?
>
> You can build a kernel with all drivers (e.g. virtio-net, virtio-blk)
> compiled in and then boot using -kernel and -append. I find that
> simplest.
I tried this method, and it seemed to not work.:)
>
> Stefan
>
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Help]: How to setup a VM based on kernel source code.
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 21:41 ` Rob Landley
1 sibling, 0 replies; 4+ messages in thread
From: Rob Landley @ 2011-08-20 21:41 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: Stefan Hajnoczi, qemu-devel, kvm
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-20 21:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).