Linux Device Driver(2)
-
2022-06-13 리눅스_디바이스_드라이버_5
Makefile 연습 main.c #include int main(void){ printf("hello\n"); #ifdef SCULL_DEBUG printf("World\n"); #endif return 0; } Makefile TARGET = main SOURCE = main.c CC = gcc all : $(CC) $(SOURCE) -O2 -o $(TARGET) clean : rm -f $(TARGET) -O2 : Optimization 최적화, 최적화 레벨 2 최적화 옵션 : 실행 파일의 크기를 줄이고, 실행 속도를 향상시킨다. -O0 : 최적화를 수행하지 않는다. -O1 : -O0보다는 높은 수준의 최적화. (= -O) -O2 : 가장 많이 사용하는 수준의 최적화. 일반 응용 프로그램이나 커널을..
2022.06.13 -
2022-06-13 리눅스_디바이스_드라이버_4
/dev 디렉터리 cd /dev /dev 디렉터리?? In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. Linux의 모든 디바이스는 /dev 디렉터리 아래에 위치하고, 모두 file로 인식된다. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. 모든 디바이스 제어는 결국 /..
2022.06.13