Re-make driver - Linux

By Valerie
at 2013-12-19T22:18
at 2013-12-19T22:18
Table of Contents
我最近拿到一個Qualcomm的產品
因為插上linux PC後沒反應,去google後發現可以在qmi_wwan.c裡add這個產品
(ubuntu的版本是12.04 LTS,kernel為3.5.0.43)
但是make時一直有錯誤訊息,所以請教各位大大
Makefile:
obj-m := qmi_wwan.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/
all: clean
$(MAKE) -I./ -C $(KDIR) M=$(PWD) modules
install: all
mkdir -p $(OUTPUTDIR)
cp -f qmi_wwan.ko $(OUTPUTDIR)
depmod
clean:
rm -rf *.o *.ko .tmp_versions
Error message:
/home/qmi_wwan/qmi_wwan.c: In function ‘qmi_wwan_mac_addr’:
/home/work/qmi_wwan/qmi_wwan.c:127: error: implicit declaration of function ‘
eth_prepare_mac_addr_change’
/home/qmi_wwan/qmi_wwan.c:132: error: implicit declaration of function ‘
eth_commit_mac_addr_change’
/home/qmi_wwan/qmi_wwan.c: At top level:
/home/qmi_wwan/qmi_wwan.c:520: error: implicit declaration of function ‘
USB_DEVICE_INTERFACE_NUMBER’
/home/qmi_wwan/qmi_wwan.c:520: error: initializer element is not constant
/home/qmi_wwan/qmi_wwan.c:520: error: (near initialization for ‘
products[15].match_flags’)
/home/qmi_wwan/qmi_wwan.c:521: error: initializer element is not constant
(以下省略)
麻煩各位大大!
謝謝!
--
因為插上linux PC後沒反應,去google後發現可以在qmi_wwan.c裡add這個產品
(ubuntu的版本是12.04 LTS,kernel為3.5.0.43)
但是make時一直有錯誤訊息,所以請教各位大大
Makefile:
obj-m := qmi_wwan.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/
all: clean
$(MAKE) -I./ -C $(KDIR) M=$(PWD) modules
install: all
mkdir -p $(OUTPUTDIR)
cp -f qmi_wwan.ko $(OUTPUTDIR)
depmod
clean:
rm -rf *.o *.ko .tmp_versions
Error message:
/home/qmi_wwan/qmi_wwan.c: In function ‘qmi_wwan_mac_addr’:
/home/work/qmi_wwan/qmi_wwan.c:127: error: implicit declaration of function ‘
eth_prepare_mac_addr_change’
/home/qmi_wwan/qmi_wwan.c:132: error: implicit declaration of function ‘
eth_commit_mac_addr_change’
/home/qmi_wwan/qmi_wwan.c: At top level:
/home/qmi_wwan/qmi_wwan.c:520: error: implicit declaration of function ‘
USB_DEVICE_INTERFACE_NUMBER’
/home/qmi_wwan/qmi_wwan.c:520: error: initializer element is not constant
/home/qmi_wwan/qmi_wwan.c:520: error: (near initialization for ‘
products[15].match_flags’)
/home/qmi_wwan/qmi_wwan.c:521: error: initializer element is not constant
(以下省略)
麻煩各位大大!
謝謝!
--
Tags:
Linux
All Comments

By Belly
at 2013-12-21T09:25
at 2013-12-21T09:25

By Franklin
at 2013-12-22T04:02
at 2013-12-22T04:02
Related Posts
Unity與Gnome3的重啟方法

By Erin
at 2013-12-19T20:05
at 2013-12-19T20:05
expect 自動輸入選項 自動輸入數字

By Mia
at 2013-12-19T18:05
at 2013-12-19T18:05
expect 自動輸入選項 自動輸入數字

By Sierra Rose
at 2013-12-19T15:49
at 2013-12-19T15:49
kthread問題?

By Michael
at 2013-12-19T09:57
at 2013-12-19T09:57
expect 自動輸入選項 自動輸入數字

By Sandy
at 2013-12-19T06:23
at 2013-12-19T06:23