C/C++ Programming
Linux Kernel Module
A simple kernel module.
For the first time I wrote a kernel module.
Basic features:
- can allocate memory
- can create /proc entry
- can read/write to /proc file
- loads and unloads cleanly
- floods with kernel messages
Compilation:
- make sure that you have kernel headers for currently running kernel, we look for a symlink in makefile (/lib/modules/2.6.15-26-amd64-k8/build) which we build using "/lib/modules/"+ uname -r + "/buid". So build should point into a linux headers directory.
# make
make -C /lib/modules/2.6.15-26-amd64-k8/build M=/home/flexray/source/64/kernel_module/moj_modul
flexray – Thu, 2006 – 10 – 26 15:51
