Thread (3 messages) 3 messages, 3 authors, 2011-08-15

Dev Environment?

From: Christophe Hauser <hidden>
Date: 2011-08-15 04:44:29

Possibly related (same subject, not in this thread)

On Sun, Aug 14, 2011 at 03:59:04PM +0700, Mulyadi Santosa wrote:
Hi :)

On Sun, Aug 14, 2011 at 11:51, Daniel Hilst Selli [off-list ref] wrote:
quoted
Thanks Mulyadi, I was installing gentoo with qemu.. but takes soo long to
install that I give up,
I was thinking in a minimal distro as dsl or lfs. What you suggest ?
Next time, pls keep kernelnewbies list address intact :)

About disk image, how about using prebuilt one provided in
http://wiki.qemu.org/Download? or ones in http://fs.devloop.org.uk/ ?
I think busybox might be a good fit for a tiny setup :)
I personally like to debootstrap a Debian and make a qcow2 image from it. You don't need the kernel to be on the image as you can directly pass a kernel to qemu with the -kernel option.

aptitude install debootstrap

#For a wheezy image :
debootstrap wheezy ./wheezy http://ftp.fr.debian.org/debian

# For a 1GB image :
dd if=/dev/zero of=fs.img bs=1M count=1000
mkfs.ext4 fs.img
mount -o loop fs.img /mnt
cp -a wheezy/* /mnt
umount /mnt

# Convert it in qcow2:
qemu-img convert fs.img -O qcow2 fs.qcow2

# Use it in qemu or kvm
qemu -hda fs.qcow2 -kernel arch/${ARCH}/boot/bzimage  -append
"${KERNEL_OPTIONS}"

If you are using vim, you can use pyclewn to control gdb from vim and
set breakpoints and stuff.
http://pyclewn.sourceforge.net/

--
Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help