Linux 内核模块设计

一.  内核模块函数

  1.  头文件 Linux/init.h  和 Linux/module.hblog

  2.  装载内核 insmod  对应的转载函数 module_init();开发

  3.  卸载内核 rmmod  对应的卸载函数 module_exit();it

二.  编写 helloworld.cmodule

  

三。编写Makefile file

四 .  把 helloworld.ko 移到Part3/rootfs 打开开发板下载。下载

  直接运行Ubootim

  insmod 挂载一下 helloworld.ko查询

  lsmod   查询一下img

  rmmod 卸载一下

相关文章
相关标签/搜索