[英]Mobile Broadband Sierra Gobi 3000 drivers compile under kernel 3.2
我從這里得到了驅動程序: Codeaurora 。
我能夠在2.6.32內核下輕松構建驅動程序,但是由於其他問題,我不得不將內核從后端口壓縮升級到3.2。
現在我一切正常。 只是我不能再構建那些驅動程序了。
我發現有人向.c
文件添加提示:
#include <linux/module.h>
但這對我沒有用。 (我在這里讀到: https : //www.codeaurora.org/forums/viewtopic.php?f=15&t=141 )
這是我在make后得到的:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order
make -C /lib/modules/3.2.0-0.bpo.3-amd64/build SUBDIRS=/home/user/Desktop/gobi/GobiSerial modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-0.bpo.3-amd64'
CC [M] /home/user/Desktop/gobi/GobiSerial/GobiSerial.o
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c: In function ‘GobiOpen’:
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c:409: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c: In function ‘GobiClose’:
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c:485: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
Building modules, stage 2.
MODPOST 1 modules
CC /home/user/Desktop/gobi/GobiSerial/GobiSerial.mod.o
LD [M] /home/user/Desktop/gobi/GobiSerial/GobiSerial.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-0.bpo.3-amd64'
如果您有任何線索請。
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c: In function ‘GobiOpen’:
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c:409: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c: In function ‘GobiClose’:
/home/user/Desktop/gobi/GobiSerial/GobiSerial.c:485: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
該錯誤是由printk沒有正確的格式字符串引起的。 在格式字符串的正確位置使用%lu。
這在2.6中也可能被打破,但是由於在3.x內核中對編譯器進行了更嚴格的設置,因此可能已作為警告而不是錯誤通過。
給定您的編譯器輸出,我完全看不到構建失敗的地方:
LD [M] /home/user/Desktop/gobi/GobiSerial/GobiSerial.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-0.bpo.3-amd64'
看來我成功了。 檢查是否具有文件/home/user/Desktop/gobi/GobiSerial/GobiSerial.ko
,如果有,則通過volia正常工作。
令人驚訝的是,當您顯然沒有編寫此驅動程序並且顯然構建成功時,此處的其他所有人都回答了某些printk()格式。
你確定要運行make install
后make
之前modprobe GobiSerial
?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.