Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 751 Bytes

File metadata and controls

39 lines (30 loc) · 751 Bytes

kernel-dev

Kernel development training

Use:

   $ make all

For 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.ko

To see if was load successfully use lsmod tool

   $ lsmod

Or see in /proc/modules

   $ cat /proc/modules

This will list all kernel modules loaded in your system

Now, to see we message "Hello Kernel!", use the dmesg tool

   $ dmesg

To unload the kernel module, can use modprobe (remove dependency), or the rmmod tool

   $ sudo rmmod hellokernel

Again, use the dmesg tool to see message of exit.