linux硬體驅動層

來源:互聯網
上載者:User

標籤:

 

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: *** 正在等待未完成的任務....
[email protected]:/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目錄下面

 

linux硬體驅動層

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.