Tzahi Fadida wrote:
Hi,
As you might guess from a previous thread, i am trying to learn modules
development. I use kubuntu as my dist.
My first goal is to be able to run the hello world module example in the linux
device drivers 3rd edition book.
Apparently in 2.6 you need to have the whole kernel compiled just to build one
module, which is not a problem though i don't want to start spending days
tuning it up to work correctly with my system.
one nice thing in both Redhat RHES 4, and Suse SLES10 (their server
editions), is that they have a package that allows compiling out-of-tree
kernel modules, without having to recompile the entire kernel.
they only contain the build system (Makefiles and all) and header files.
if you're using a kubuntu system - check if it has a similar package - i
imagine it does - my ubuntu (6.06) has a package named 'linux-headers'
that appears to be meant for the same purpose.
What should be my workspace so i can start learning:
User mode linux? qemu? vmware? XEN :) ?
i think you need to first work on your live system. after the first time
you wipe out your root file-system - install user-mode-linux and work in
that environment ;)
you need to have your module completely wipe your system at least once,
in order to appreciate the difference between kernel-mode and user-mode
development.
user-mode-linux is very good, because it allows you to run the kernel
(and its module) under gdb - something that's not possible with the
other virtualization options (at least not simply, and not safely).
i imagine it will take you 1-2-3 full days until you manage to setup a
UML (user-mode-linux) environment that is optimal for modules
development. note that even under UML - you'll need to have some
compiled kernel tree.
by the way - you don't need to realy fully-compile the kernel. all you
need to do is take the .config file of your currently running kernel
(from /boot/config-*, at least on ubuntu and redhat and fedora), put it
in the kernel source tree under the name '.config', run 'make oldconfig'
and perhaps also 'make prepare' - and the kernel source tree will be
configured enough to compile out-of-kernel-tree kernel modules.
P.s.: naturally i am impatient to start coding yesterday :)
then go to the supermarket and buy some patience - kernel development
does not work without a _lot_ of patience.
--guy
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]