Sample Linux kernel module that prints hello world.
Install dev tools and kernel-devel:
sudo dnf install kernel-devel make gcc
Now you can compiled the module:
cd src
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
Remove the module and build files with:
make clean
sudo insmod ./hello.ko
sudo rmmod hello
dmesg