os-70-350

os-70-350 Commit Details


Date:2013-12-14 22:23:30 (11 years 8 months ago)
Author:Natalie Adams
Branch:master
Commit:3e6b179b551503df74072568599ed1c451902e4a
Parents: e34323ddbed8f7c345246e9c44080869fc4e7597
Message:Adding sample Linux loadable kernel module

Changes:

File differences

loadable-kernel-module/Makefile
1
2
3
4
5
6
7
obj-m += mymodule.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
loadable-kernel-module/mymodule.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// http://www.tldp.org/LDP/lkmpg/2.6/html/hello2.html
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
int simple_init(void)
{
printk(KERN_INFO, "Loading Module\n");
return 0;
}
void simple_exit(void)
{
printk(KERN_INFO, "Removing Module\n");
}
module_init(simple_init);
module_exit(simple_exit);
MODULE_LICENSE("LICENSE");
MODULE_DESCRIPTION("Simple Module");
MODULE_AUTHOR("Your Name");

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.41411s using 14 queries.