<=========================================>
1. 파일 작성
#include
#include
#include
static int hello_init(void)
{
printk("Juhyun BaBo~!\n");
return 0;
}
static void hello_exit(void)
{
printk("Juhyun Bye~!\n");
}
module_init(hello_init);
module_exit(hello_exit);
<=========================================>
2. 크로스컴파일
/]# arm-linux-gcc -D __KERNEL__ -DMODULE -I /root/(Linux Kernel Path)/include -O2 -c HelloWorld.c
3. module 추가
/]# insmod HelloWorld.o
4.module 확인
/]# lsmod
5.module 제거
/]# rmmod HelloWorld
댓글 없음:
댓글 쓰기