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 卸載一下

相關文章
相關標籤/搜索