I have couple years c programming experience. Now I decided to working towards Linux kernel module development. However, I can't even get start. I have compiled this code in ubuntu.
#include <linux/module.h>
int init_module(void){ printk("<1> hellp"); return 0;}
void cleanup_module(void){ printk("<1> bye");}
however, the insmod is not working the error message is "Invalid module format". after googling i figured it may be some problem with version compatibility. And there is no good way to solve it. So Can some real kernel module developer give me some advice? what environment should I prepare before I start learning?
Thanks!