Kernel development training
Use:
$ make allFor compile
This create a bunch of files, but the *.ko generate is our kernel module
To install-it, can use modprobe (complete if you need dependency) or insmod tool
$ sudo insmod <path-to>/hellokernel.koTo see if was load successfully use lsmod tool
$ lsmodOr see in /proc/modules
$ cat /proc/modulesThis will list all kernel modules loaded in your system
Now, to see we message "Hello Kernel!", use the dmesg tool
$ dmesgTo unload the kernel module, can use modprobe (remove dependency), or the rmmod tool
$ sudo rmmod hellokernelAgain, use the dmesg tool to see message of exit.