Sunday, October 25, 2009

First linux kernel module

echo "create xyz.c"
#include
MODULE_LICENSE("Dual BSD/GPL");




echo "create Makefile"
obj-m := nothing.o



echo "compile module"
make -C /usr/src/kernel-source-2.6.8 M=pwd modules



echo "install the module"
insmod xyz.ko



echo "check module is installed"
lsmod | grep xyz



echo "remove module"
rmmod xyz

No comments:

Post a Comment