pdk를 설치한 이후 /external/qemu/hw/goldfish_mmc.c에서 서printk를 사용하여서 adb shell로 연결해서 메시지를 출력하는 것이 목표입니다.
printk를 사용하기 위하여
라이브러리
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
을 추가 하고 printk문을
printk( "MMC_SWITCH : arg=%x\n",arg);
위와 같이 사용하고 make로 컴파일을 하니
host C: emulator-target-arm <= external/qemu/hw/goldfish_mmc.c
external/qemu/hw/goldfish_mmc.c:17:54: error: linux/module.h: No such file or directory
external/qemu/hw/goldfish_mmc.c:21:52: error: linux/init.h: No such file or directory
external/qemu/hw/goldfish_mmc.c: In function 'goldfish_mmc_do_command':
external/qemu/hw/goldfish_mmc.c:362: warning: implicit declaration of function 'printk'
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/emulator-target-arm_intermediates/hw/goldfish_mmc.o] 오류 1
위와 같은 에러가 나와서 질문을 드립니다. 어떻게 해결해야 될까요?? 라이브러리가 잘못된건가요?