From mboxrd@z Thu Jan 1 00:00:00 1970 From: steven.moix at axianet.ch (Axianet.ch - Steven Moix) Date: Sat, 3 Apr 2004 16:02:37 +0200 (CEST) Subject: Compiling r8169.c network card driver on RH 7.2 Message-ID: <2678.192.168.0.130.1081000957.squirrel@webmail.axianet.ch> Hello all, this is my first post here (great list, I found lots of info I always wanted to kow) I have an Alpha EV56 system with 64bit PCI slots (PC164 mobo), so I bought a Planet ENW-9604 Gigabit adapter (Realtek 8169 chip). It is correctly detected, I can see it via /proc/pci I'm running RedHat Linux 7.2 for Alpha and there is no included driver for it, so I have to compile my own driver. The C code is provided by Planet here: ftp://ftp1.planet.com.tw/NIC/ENW-9605A/DR-ENW960x.zip So I unzip it, I change the NEW_INCLUDE_PATH in the Makefile to /usr/src/linux-2.4.18-27.7.x.hp/include/ and launch "make" to compile the whole thing, then I got this: [root at ev56 root]# make gcc -DMODULE -D__KERNEL__ -DLINUX -O6 -Wall -I /usr/src/linux-2.4.18-27.7.x.hp/include/ -c r8169.c In file included from /usr/src/linux-2.4.18-27.7.x.hp/include/asm/semaphore.h:11, from /usr/src/linux-2.4.18-27.7.x.hp/include/linux/fs.h:200, from /usr/src/linux-2.4.18-27.7.x.hp/include/linux/capability.h:17, from /usr/src/linux-2.4.18-27.7.x.hp/include/linux/binfmts.h:5, from /usr/src/linux-2.4.18-27.7.x.hp/include/linux/sched.h:9, from /usr/src/linux-2.4.18-27.7.x.hp/include/linux/skbuff.h:19, from /usr/src/linux-2.4.18-27.7.x.hp/include/linux/netdevice.h:147, from r8169.c:54: /usr/src/linux-2.4.18-27.7.x.hp/include/asm/current.h:4: warning: call-clobbered register used for global register variable r8169.c:216: parse error before `__devinitdata' r8169.c:216: warning: type defaults to `int' in declaration of `__devinitdata' r8169.c:217: warning: braces around scalar initializer r8169.c:217: warning: (near initialization for `__devinitdata') r8169.c:217: warning: excess elements in scalar initializer r8169.c:217: warning: (near initialization for `__devinitdata') r8169.c:217: warning: excess elements in scalar initializer r8169.c:217: warning: (near initialization for `__devinitdata') r8169.c:217: warning: excess elements in scalar initializer r8169.c:217: warning: (near initialization for `__devinitdata') r8169.c:217: warning: excess elements in scalar initializer r8169.c:217: warning: (near initialization for `__devinitdata') r8169.c:217: warning: excess elements in scalar initializer r8169.c:217: warning: (near initialization for `__devinitdata') r8169.c:217: warning: excess elements in scalar initializer r8169.c:217: warning: (near initialization for `__devinitdata') r8169.c:218: warning: braces around scalar initializer r8169.c:218: warning: (near initialization for `__devinitdata') r8169.c:218: warning: excess elements in scalar initializer r8169.c:218: warning: (near initialization for `__devinitdata') r8169.c:219: warning: data definition has no type or storage class r8169.c:223: `rtl8169_pci_tbl' undeclared here (not in a function) r8169.c: In function `RTL8169_WRITE_GMII_REG': r8169.c:462: warning: implicit declaration of function `writel' r8169.c:467: warning: implicit declaration of function `readl' r8169.c: In function `rtl8169_phy_timer_t_handler': r8169.c:533: warning: implicit declaration of function `readb' r8169.c: At top level: r8169.c:560: parse error before `rtl8169_init_board' r8169.c:561: warning: return type defaults to `int' r8169.c: In function `rtl8169_init_board': r8169.c:619: warning: implicit declaration of function `ioremap' r8169.c:619: warning: assignment makes pointer from integer without a cast r8169.c:628: warning: implicit declaration of function `writeb' r8169.c: At top level: r8169.c:686: parse error before `rtl8169_init_one' r8169.c:687: warning: return type defaults to `int' r8169.c:860: parse error before `rtl8169_remove_one' r8169.c:861: warning: return type defaults to `int' r8169.c: In function `rtl8169_remove_one': r8169.c:869: warning: implicit declaration of function `iounmap' r8169.c:877: warning: control reaches end of non-void function r8169.c: In function `rtl8169_open': r8169.c:908: warning: implicit declaration of function `virt_to_bus' r8169.c: In function `rtl8169_hw_start': r8169.c:1090: warning: implicit declaration of function `writew' r8169.c:1099: warning: implicit declaration of function `readw' r8169.c: At top level: r8169.c:1629: `rtl8169_pci_tbl' undeclared here (not in a function) r8169.c:1629: initializer element is not constant r8169.c:1629: (near initialization for `rtl8169_pci_driver.id_table') r8169.c:1631: warning: initialization from incompatible pointer type r8169.c:1634: initializer element is not constant r8169.c:1634: (near initialization for `rtl8169_pci_driver') r8169.c:1641: parse error before `rtl8169_init_module' r8169.c:1642: warning: return type defaults to `int' r8169.c:1650: parse error before `rtl8169_cleanup_module' r8169.c:1651: warning: return type defaults to `int' r8169.c: In function `rtl8169_cleanup_module': r8169.c:1653: warning: control reaches end of non-void function r8169.c: At top level: r8169.c:1659: warning: type defaults to `int' in declaration of `module_init' r8169.c:1659: warning: parameter names (without types) in function declaration r8169.c:1659: warning: data definition has no type or storage class r8169.c:1660: warning: type defaults to `int' in declaration of `module_exit' r8169.c:1660: warning: parameter names (without types) in function declaration r8169.c:1660: warning: data definition has no type or storage class make: *** [r8169.o] Error 1 Anyone has an idea what the problem is? Installed I have: - Kernel 2.4.18-27.7.x.hp - Kernel source 2.4.18-27.7.x.hp - gcc 2.96 Could the gcc version be the problem? Have a nice day Steven