이제 막 디바이스 드라이버 공부를 해볼려고 ㅡ.ㅡa
여기 저기 뒤져서 간단한 예제를 실행해봤는데.. 에러가..
#include <linux/module.h>
int init_module()
{
printk ("hello\n");
return 0;
}
void cleanup_module()
{
printk ("end\n");
}
이걸 컴파일하게 되면
gcc -o hello.o -c -D__KERNEL__ -DMODULE -O -Wall -I/usr/include/linux hello.c
이렇게 하게 되니까
#error incorrectly using glibc headers for a kernel module 이라고 에러가 나네요..
/usr/include/linux 요기에 module.h 파일이 있는데