摘要:
驱动文件:qudong.c,make生成qudong.ko文件,烧录到ARM板上#include#include#include#include /* COPY_TO_USER */#include#define DEV_NAME "rwtest"static int major=0;static int MAX_BUF_LEN=1024;static char drv_buf[1024];static int WRI_LENGTH=0;/************************************写入****************************** 阅读全文
摘要:
#include#includestatic int __init hello_init(void){ printk("Hello init\n"); return 0;}static int __exit hello_exit(void){ printk("Hello exit\n");}module_init(hello_init);module_exit(hello_exit);交叉编译 Makefile文件(ARM):ifneq ($(KERNELRELEASE),)obj-m := hello.oelseKDIR := /usr/src/lin 阅读全文