OK6410A学习笔记二:嵌入式Linux驱动开发环境的配置和测试
Window7 32-bit OS + VMware Workstation 6.5 + Ubuntu9.10
本文引用地址: //m.amcfsurvey.com/article/201611/319309.htmFORLINXOK6410A开发板
嵌入式Linux驱动开发环境的搭建
1.
2.
3.
嵌入式Linux驱动开发环境的测试
最好的方法莫过于用HelloWorld实例来测试一下。
//hello.c
#include
#include
MODULE_LICENSE("Dual BSD/GPL");
static int __init s3c6410_hello_init(void)
{
}
static void __exit s3c6410_hello_exit(void)
{
}
module_init(s3c6410_hello_init);
module_exit(s3c6410_hello_exit);
//Makefile
obj-m:=hello.o
KERNELDIR?=/usr/src/linux-3.0.1
default:
clean:
以上部分是源码和Makefile文件,执行#make进行编译,#make clean清除编译生成的文件。
接下来,将hello.ko文件拷贝到SD卡中,给OK6410A开发板上电,进入sdcard目录(使用DNW工具进行调试),执行#insmod hello.ko加载hello.ko模块进入内核,执行#lsmod查看系统当前的驱动模块。
评论