Linux Kernel Development Diary 3
Third Tutorial
For the third entry of this series of posts, the tutorial is named “Introduction to Linux kernel build configuration and modules”. Again, the name is self-explainable.
Briefly, we created a simple kernel module (code that is not embedded in the monolithic kernel binary) that prints strings when loaded and unloaded from the VM.
This time, there were no complications (other than the undefined VM_MOUNT_POINT, but its value was easily inferable). The solution to the unresponsive VM - which I thought was not loading, but was - was to force getting the IP address and connect to it via SSH, which I did nor manage to accomplish in the last diary.
Even though it did work, a friend of mine told me to make some adjusts on the kw build –menu so the virsh –console <VM> worked as expected. Since then I did not run into any problems like the last one.
The implementation, compilation, building and deploying of the module in the kernel was quite simple, fast and easy to understand. Everything worked as expected.
Fourth Tutorial
This tutorial is a little extension of the third.
It simply implements another module that depends on the module created on the one created then. By loading ir with modprobe, it also loads the other module.
I think the greatest thing in this tutorial was to compile and deploy the module without help - that is, having to use the commands already seen in other tutorials, specially the third one.