作者BCRK7 (K7)
看板Linux
标题[问题] Compile 网路卡驱动程式错误讯息
时间Fri Apr 24 02:15:54 2015
最近小弟买了一张D-Link DGE-528T 的网卡
系统环境是 Debian(Jessie) 3.16.0-4-amd64 Debian
linux-header 跟 build-essential 都装了
由於 OS 没抓到网卡的驱动程式,於是只能自己 compile了。
--------------------------------------------------------------------------
首先我照 README 步骤
先侦测系统有无 r8168 模组 ( 我原本系统有内建 ),有的话先将其移除。
当然我就移除了,但也意味着我暂时不能使用网路了。
然後开始 compile,
$ sudo make clean modules
错误讯息: fatal error: asm/system.h: No such file or directory
接着上网找解法,接着把 # include <asm/system.h> 注解掉,然後再试一次
但接下来出现的错误讯息我就无从求解了 @@? 内容如下:
make -C src/ modules
make[1]: Entering directory
'/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src'
make -C /lib/modules/3.16.0-4-amd64/build
SUBDIRS=/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src modules
make[2]: Entering directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CC [M] /home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.o
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c: In
function ‘rtl8169_rx_vlan_skb’:
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:949:3:
error: too few arguments to function ‘__vlan_hwaccel_put_tag’
__vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
^
In file included from
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:47:0:
/usr/src/linux-headers-3.16.0-4-common/include/linux/if_vlan.h:350:31: note:
declared here
static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c: In
function ‘rtl8169_set_features’:
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1006:22:
error: ‘NETIF_F_HW_VLAN_RX’ undeclared (first use in this function)
if (dev->features & NETIF_F_HW_VLAN_RX)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1006:22:
note: each undeclared identifier is reported only once for each function it
appears in
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c: At top
level:
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:2611:1:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘
rtl8169_init_one’
rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:2867:1:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘
rtl8169_remove_one’
rtl8169_remove_one(struct pci_dev *pdev)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c: In
function ‘rtl8169_schedule_work’:
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:3303:2:
error: implicit declaration of function ‘PREPARE_DELAYED_WORK’
[-Werror=implicit-function-declaration]
PREPARE_DELAYED_WORK(&tp->task, task);
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c: At top
level:
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:4199:12:
error: ‘rtl8169_init_one’ undeclared here (not in a function)
.probe = rtl8169_init_one,
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:4200:2:
error: implicit declaration of function ‘__devexit_p’
[-Werror=implicit-function-declaration]
.remove = __devexit_p(rtl8169_remove_one),
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:4200:25:
error: ‘rtl8169_remove_one’ undeclared here (not in a function)
.remove = __devexit_p(rtl8169_remove_one),
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:2464:13:
warning: ‘rtl8169_phy_power_up’ defined but not used [-Wunused-function]
static void rtl8169_phy_power_up (struct net_device *dev)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:3889:12:
warning: ‘rtl8169_poll’ defined but not used [-Wunused-function]
static int rtl8169_poll(napi_ptr napi, napi_budget budget)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:450:21:
warning: ‘rtl8169_xmii_reset_pending’ defined but not used
[-Wunused-function]
static unsigned int rtl8169_xmii_reset_pending(struct net_device *dev)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:465:21:
warning: ‘rtl8169_xmii_link_ok’ defined but not used [-Wunused-function]
static unsigned int rtl8169_xmii_link_ok(struct net_device *dev)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:480:13:
warning: ‘rtl8169_xmii_reset_enable’ defined but not used
[-Wunused-function]
static void rtl8169_xmii_reset_enable(struct net_device *dev)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:708:12:
warning: ‘rtl8169_set_speed_xmii’ defined but not used [-Wunused-function]
static int rtl8169_set_speed_xmii(struct net_device *dev,
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1021:13:
warning: ‘rtl8169_gset_xmii’ defined but not used [-Wunused-function]
static void rtl8169_gset_xmii(struct net_device *dev, struct ethtool_cmd *cmd)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1236:27:
warning: ‘rtl8169_ethtool_ops’ defined but not used [-Wunused-variable]
static struct ethtool_ops rtl8169_ethtool_ops = {
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1271:13:
warning: ‘rtl8169_get_mac_version’ defined but not used [-Wunused-function]
static void rtl8169_get_mac_version(struct rtl8169_private *tp, void __iomem
*ioaddr)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1316:13:
warning: ‘rtl8169_print_mac_version’ defined but not used
[-Wunused-function]
static void rtl8169_print_mac_version(struct rtl8169_private *tp)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1321:13:
warning: ‘rtl8169_get_phy_version’ defined but not used [-Wunused-function]
static void rtl8169_get_phy_version(struct rtl8169_private *tp, void __iomem
*ioaddr)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1343:13:
warning: ‘rtl8169_print_phy_version’ defined but not used
[-Wunused-function]
static void rtl8169_print_phy_version(struct rtl8169_private *tp)
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1645:13:
warning: ‘rtl8169_release_board’ defined but not used [-Wunused-function]
static void rtl8169_release_board(struct pci_dev *pdev, struct net_device
*dev,
^
/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.c:1732:13:
warning: ‘rtl8169_init_phy’ defined but not used [-Wunused-function]
static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private
*tp)
^
cc1: some warnings being treated as errors
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for
target
'/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.o' failed
make[5]: ***
[/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src/r8169_n.o] Error
1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target
'_module_/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src' failed
make[4]: ***
[_module_/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[3]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:53: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory
'/home/kai7/NetCardDriver/Driver/LINUX/2.4.x_2.6.x_3.2.x/src'
Makefile:41: recipe for target 'modules' failed
make: *** [modules] Error 2
抱歉,讯息非常长...,因为我抓不到哪里是主要的问题点。
所以想请问前辈们有没有高见?
Remark:
结果为了安装第2张网卡的 driver,把原本的网卡驱动程式移除掉,现在两张网卡都不能
用了 ................... 该怎麽办?不能上网... 只能重灌吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 125.224.177.76
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Linux/M.1429812957.A.11A.html
※ 编辑: BCRK7 (125.224.177.76), 04/24/2015 02:18:02
1F:→ tjjh89017: 何不直接去找网卡drvier呢?应该会有人编好module包deb 04/24 10:27
※ 编辑: BCRK7 (114.46.46.64), 04/25/2015 16:29:45