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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html