Eu compro uma nova placa de rede, a D-Link DGE-528T.
Meu sistema operacional é o kernel Debian (Jessie): 3.16.0-4-amd64
mas não pode detectar a nova placa de rede, então devo compilar o driver sozinho.
siga o arquivo README.
Primeiro, eu removo meu driver de placa de rede original, r8169
começar a compilar
$ sudo make clean modules
Recebi um erro: erro fatal: asm / system.h: nenhum arquivo ou diretório desse tipo
então eu refiro asm / system.h arquivo de cabeçalho linux
Remova #include <asm/system.h>
e tente novamente.
Em seguida, recebi outro erro, mas não tenho ideia de como resolvê-lo.
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
O que devo fazer?