linux硬件驅動層

 

1.make menuconfig

scripts/kconfig/lxdialog/menubox.o: In function `print_buttons':
menubox.c:(.text+0x4b1): undefined reference to `wrefresh'
collect2: ld 返回 1
make[1]: *** [scripts/kconfig/mconf] 錯誤 1
make: *** [menuconfig] 錯誤 2
 

解決方法:

http://www.cnblogs.com/Ph-one/p/4283122.html

 

2.

drivers/hello/hello.c: In function 'hello_create_proc':
drivers/hello/hello.c:238:14: error: 'struct proc_dir_entry' has no member named 'owner'
make[2]: *** [drivers/hello/hello.o] 錯誤 1
make[1]: *** [drivers/hello] 錯誤 2
make: *** [drivers] 錯誤 2
make: *** 正在等待未完成的任務....
root@phone-desktop:/opt/FriendlyARM/tiny4412/android/linux-3.0.31# make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/hello/hello.o
drivers/hello/hello.c: In function 'hello_create_proc':
drivers/hello/hello.c:238:14: error: 'struct proc_dir_entry' has no member named 'owner'
make[2]: *** [drivers/hello/hello.o] 錯誤 1
make[1]: *** [drivers/hello] 錯誤 2
make: *** [drivers] 錯誤 2
解決方法:


由錯誤信息可以看出struct proc_dir_entry結構體中沒有找到owner的成員。

 

看到引用的proc_fs.h頭文件,發現裏面的struct proc_dir_entry結構體中,的確沒有owner成員,

在該結構體中添加以下代碼:

  1. struct module *owner;  


保存後,重新編譯,OK了。

proc_fs.h文件在kernel源碼下的include/linux目錄下面

 

發佈了63 篇原創文章 · 獲贊 16 · 訪問量 17萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章