Skip to content

Commit b91ea71

Browse files
author
ming.li
committed
add
1 parent 8b9c4c0 commit b91ea71

6 files changed

Lines changed: 74 additions & 0 deletions

File tree

doc/android/Recovery.pdf

1.89 MB
Binary file not shown.

doc/android/vold.pdf

971 KB
Binary file not shown.

tools/vim/vim-files.zip

5.02 MB
Binary file not shown.

tools/vim/vimrc.zip

3.37 KB
Binary file not shown.

workspace/misc/TEMPLATE/Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# If KERNELRELEASE is defined, we've been invoked from the
2+
# kernel build system and can use its language.
3+
4+
# module name
5+
OBJ = TEMPLATE
6+
7+
# module execute objs
8+
$(OBJ)-objs = test.o
9+
10+
ifneq ($(KERNELRELEASE),)
11+
obj-m := $(OBJ).o
12+
# Otherwise we were called directly from the command
13+
# line; invoke the kernel build system.
14+
else
15+
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
16+
PWD := $(shell pwd)
17+
default:
18+
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
19+
install:
20+
sudo insmod $(OBJ).ko
21+
uninstall:
22+
sudo rmmod $(OBJ)
23+
clean:
24+
$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
25+
check:
26+
@sudo lsmod |grep $(OBJ)
27+
endif
28+
29+
#multi files
30+
#obj-m := module.o
31+
#module-objs := file1.o file2.o
32+
#

workspace/misc/TEMPLATE/test.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#include <linux/init.h>
2+
#include <linux/module.h>
3+
4+
5+
MODULE_AUTHOR("ming.li");
6+
//MODULE_DESCRIPTION(description);
7+
//MODULE_VERSION(version_string);
8+
//MODULE_DEVICE_TABLE(table_info);
9+
//MODULE_ALIAS(alternate_name);
10+
11+
MODULE_LICENSE("Dual BSD/GPL");
12+
13+
//#include <linux/moduleparam.h>
14+
//module_param(variable, type, perm);
15+
//module_param_array(name, type, nump, perm)
16+
17+
//#include <linux/sched.h>
18+
//struct task_struct *current;
19+
//current->pid
20+
//current->comm
21+
22+
23+
24+
static __init int test_init(void)
25+
{
26+
printk(KERN_DEBUG "Hello,test!\n");
27+
28+
return 0;
29+
}
30+
31+
static __exit void test_exit(void)
32+
{
33+
printk(KERN_DEBUG "Bye, test!\n");
34+
}
35+
36+
//EXPORT_SYMBOL (symbol);
37+
//EXPORT_SYMBOL_GPL (symbol);
38+
//
39+
40+
module_init(test_init);
41+
module_exit(test_exit);
42+

0 commit comments

Comments
 (0)