Dev Environment?
Hey people.. I start to read a book about kernel, and want to make some changes to it, for study purpose. ue I think in edit it, an use qemu to test it with some minimal distribution installation.
So how people usually do?
Thanks!
--
"Do or do not... there is no try" Yoda Master
Hi..
Quoted 6 lines · Daniel Hilst Selli
Hey people.. I start to read a book about kernel, and want to make some changes to it, for study purpose. ue I think in edit it, an use qemu to test it with some minimal distribution installation.
So how people usually do?
That's really subjective...btw, i am not developer, but here's my "setup":
- cscope plus vim for source code navigation. if I am lazy, I simply go to lxr.linux.no for online code browsing
- plain qemu or qemu+kvm for running the kernel plus activating its gdb stub. Then hook gdb into it so I can freely stop kernel execution anywhere I like
- of course, gcc as the compiler.
- ccache, if you wanna to speed up repetitive compilation
- "screen" tool running all of the above as its sessions :)
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi :)
Quoted 3 lines · Daniel Hilst Selli
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 :)
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Em 14-08-2011 05:59, Mulyadi Santosa escreveu:
Quoted 13 lines
Hi :)
Quoted 3 lines · Daniel Hilst Selli
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 :)
Ohh, sorry about list, I just click at reply (where should be reply for all), I'll
pay more attention next time.
prebuilt disk images? Sounds handy!! Thanks again!
Signature · 1 line
"Do or do not... there is no try" Yoda Master
A message that is not in the archive (sent off-list or not yet received): 20110815043805.GB3166@localhost
Hi :)
Quoted 1 line · Christophe
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.
I agree, just to add that AFAICT the provided qemu image in the links I mentioned has no kernel image inside them
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Quoted 7 lines · Mulyadi Santosa
Hi :)
Quoted 3 lines · Daniel Hilst Selli
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 ?
Quoted 5 lines
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