LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-03-2004, 06:31 AM   #1
Minuteman
LQ Newbie
 
Registered: Mar 2003
Location: Switzerland
Distribution: Redhat, Slackware
Posts: 20

Rep: Reputation: 0
Compiling r8169.c network card driver on Alpha...


Hello all, I have an Alpha EV56 system with 64bit PCI slots, so I bought a Planet ENW-9604 Gigabit adapter (Realtek 8169 chip).

I'm running RedHat Linux 7.2 for Alpha (maintained by HP on http://h18000.www1.hp.com/products/s...-tools/redhat/) 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:

Quote:
[root@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
 
Old 04-03-2004, 06:59 AM   #2
Minuteman
LQ Newbie
 
Registered: Mar 2003
Location: Switzerland
Distribution: Redhat, Slackware
Posts: 20

Original Poster
Rep: Reputation: 0
Ah just an aditional stupid question...does the card need to be present in the system when I compile the driver? I saw this code in the source and it makes me doubt...

Quote:
#define RTL_PRINT_MAC_VERSION(mac_version) \
{\
switch(mac_version) \
{ \
case RTL_GIGA_MAC_VER_E: \
DBG_PRINT("mac_version == RTL_GIGA_MAC_VER_E (0002)\n"); \
break; \
case RTL_GIGA_MAC_VER_D: \
DBG_PRINT("mac_version == RTL_GIGA_MAC_VER_D (0001)\n"); \
break; \
case RTL_GIGA_MAC_VER_B: \
DBG_PRINT("mac_version == RTL_GIGA_MAC_VER_B (0000)\n"); \
break; \
default: \
DBG_PRINT("mac_version == Unknown\n"); \
break; \
} \
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling rtl8139.c driver for NIC card stielinc Linux - Networking 4 02-11-2005 10:10 PM
GCC cross compiling to alpha sparc? jon_k Linux - Software 2 12-07-2004 02:23 PM
_very_ strange problems with r8169 nic driver outwardlymobile Linux - Hardware 3 11-24-2004 03:41 PM
nforce network driver not compiling under gentoo rcrules Linux - Networking 2 10-14-2003 01:36 PM
Compiling A Sound Card Driver From .h And .c Files davescafe Linux - Newbie 1 01-28-2003 07:04 PM


All times are GMT -5. The time now is 05:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration