From: me@tobin.cc (Tobin C. Harding)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Does anyone have experience about linux kernel dev and test in QEMU?
Date: Tue, 23 May 2017 12:50:50 +1000 [thread overview]
Message-ID: <20170523025050.GE8158@eros> (raw)
In-Reply-To: <SN1PR04MB2016EEEB0905B8839983B489ECF90@SN1PR04MB2016.namprd04.prod.outlook.com>
On Tue, May 23, 2017 at 12:29:09AM +0000, Douglas Su wrote:
> I used to develop and test kernel driver in virtual box with full Linux Debian installed. It works but not efficient due to that I have to install a full functional Linux distribution.
>
> Previously, in this mail list, I noted some friends said that to accelerate the development process by using QEMU, a lightweight and fast VM than QEMU. After some searching works, however, I barely find any reading material or tutorial about the details of using QEMU in kernel development, especially the driver development.
>
> Can anyone give a clue?
You can use the following command
$ qemu-system-x86_64
-kernel arch/x86_64/boot/bzImage
-drive
-file=/path/to/qemu-image.img,index=0,media=disk,format=raw
-append "root=/dev/sda console=ttyS0"
--enable-kvm
--nographic
You can run this command from the root directory of whichever kernel
tree you are hacking on. I can't remember how I built/got the QEMU
image though. There are tutorials online about creating a QEMU image.
Hope this helps,
Tobin.
next prev parent reply other threads:[~2017-05-23 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 0:29 Does anyone have experience about linux kernel dev and test in QEMU? Douglas Su
2017-05-23 2:50 ` Tobin C. Harding [this message]
2017-05-23 8:23 ` Roman Storozhenko
2017-05-26 18:05 ` Stephen Brennan
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=20170523025050.GE8158@eros \
--to=me@tobin.cc \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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).