Start of topic | Skip to actions
LinuxModulesFirst ModuleI just inserted my first kernel module. being the hello world of modules its utterly useless except for making me feel good. i'm reading O'Reillys Linux Device Drivers 3 which they have gratiously provided for free (that also makes me feel good).
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
{
printk(KERN_ALERT "Hello, world\n");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye, cruel world\n");
}
module_init(hello_init);
module_exit(hello_exit);
while i'm getting the basics under my belt i probably won't post much here. please stay tuned...
real drivers
| |||||||