一. 内核模块
1. 头文件 Linux/init.h 和 Linux/module.h
2. 装载内核 insmod 对应的转载函数 module_init();
3. 卸载内核 rmmod 对应的卸载函数 module_exit();
二. 编写 helloworld.c
三。编写Makefile
四 . 把 helloworld.ko 移到Part3/rootfs 打开开发板下载。
直接运行Uboot
insmod 挂载一下 helloworld.ko
lsmod 查询一下
rmmod 卸载一下
原文:http://www.cnblogs.com/lvxiaoning/p/5020589.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!