[netdrivers] How to compile sundance.c on fedora core 2 linuxbox

Rizzo Lorenzo (GRTN) lorenzo.rizzo at grtn.it
Thu Sep 29 03:21:51 PDT 2005


Hi,
I've a linuxbox running FC2 with 4 ethernet card Dlink DFE550TX that doesn't work well.
I'm trying to uptdate the sundance driver according with the last release downloaded from your site but I wasn't able to compile the module.
I got an error compiling pci-sca.c but after modified to the following lines :

modified : pci-scan.c

#include <linux/version.h>
#if defined(MODVERSIONS)
/* #include <linux/modversions.h> */
#include "/lib/modules/2.6.5-1.358/build/include/config/modversions.h"
#endif

i'd compiled it with the attached warning:

[root at fc2node1 mymod]# make pci-scan.o
Makefile:46: No kernel version has been specified.
 Assuming 2.6.5-1.358.
 Set the KERNVER variable to specify a different kernel.
cc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -I/lib/modules/2.6.5-1.358/build/include/  -pipe -fno-strength-reduce -DMODVERSIONS   -c -o pci-scan.o pci-scan.c
In file included from /lib/modules/2.6.5-1.358/build/include/asm/processor.h:18,
                 from /lib/modules/2.6.5-1.358/build/include/asm/thread_info.h:16,
                 from /lib/modules/2.6.5-1.358/build/include/linux/thread_info.h:21,
                 from /lib/modules/2.6.5-1.358/build/include/linux/spinlock.h:12,
                 from /lib/modules/2.6.5-1.358/build/include/linux/capability.h:45,
                 from /lib/modules/2.6.5-1.358/build/include/linux/sched.h:7,
                 from /lib/modules/2.6.5-1.358/build/include/linux/module.h:10,
                 from pci-scan.c:62:
/lib/modules/2.6.5-1.358/build/include/asm/system.h: In function `__set_64bit_var':
/lib/modules/2.6.5-1.358/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.6.5-1.358/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
pci-scan.c: In function `pci_drv_register':
pci-scan.c:225: warning: `check_region' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/ioport.h:121)
pci-scan.c:279: warning: `MOD_INC_USE_COUNT' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/module.h:501)
pci-scan.c: In function `pci_drv_unregister':
pci-scan.c:442: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/module.h:513)
[root at fc2node1 mymod]# 

I'm still not able to compile sundance.c this are the error messages:

[root at fc2node1 mymod]# make sundance.o
Makefile:46: No kernel version has been specified.
 Assuming 2.6.5-1.358.
 Set the KERNVER variable to specify a different kernel.
cc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -I/lib/modules/2.6.5-1.358/build/include/  -pipe -fno-strength-reduce -DMODVERSIONS   -c -o sundance.o sundance.c
In file included from /lib/modules/2.6.5-1.358/build/include/asm/processor.h:18,
                 from /lib/modules/2.6.5-1.358/build/include/asm/thread_info.h:16,
                 from /lib/modules/2.6.5-1.358/build/include/linux/thread_info.h:21,
                 from /lib/modules/2.6.5-1.358/build/include/linux/spinlock.h:12,
                 from /lib/modules/2.6.5-1.358/build/include/linux/capability.h:45,
                 from /lib/modules/2.6.5-1.358/build/include/linux/sched.h:7,
                 from /lib/modules/2.6.5-1.358/build/include/linux/module.h:10,
                 from sundance.c:127:
/lib/modules/2.6.5-1.358/build/include/asm/system.h: In function `__set_64bit_var':
/lib/modules/2.6.5-1.358/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.6.5-1.358/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /lib/modules/2.6.5-1.358/build/include/linux/irq.h:20,
                 from /lib/modules/2.6.5-1.358/build/include/asm/hardirq.h:6,
                 from /lib/modules/2.6.5-1.358/build/include/linux/interrupt.h:11,
                 from sundance.c:139:
/lib/modules/2.6.5-1.358/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /lib/modules/2.6.5-1.358/build/include/asm/hardirq.h:6,
                 from /lib/modules/2.6.5-1.358/build/include/linux/interrupt.h:11,
                 from sundance.c:139:
/lib/modules/2.6.5-1.358/build/include/linux/irq.h: At top level:
/lib/modules/2.6.5-1.358/build/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)
In file included from /lib/modules/2.6.5-1.358/build/include/linux/irq.h:72,
                 from /lib/modules/2.6.5-1.358/build/include/asm/hardirq.h:6,
                 from /lib/modules/2.6.5-1.358/build/include/linux/interrupt.h:11,
                 from sundance.c:139:
/lib/modules/2.6.5-1.358/build/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
/lib/modules/2.6.5-1.358/build/include/asm/hw_irq.h:32: error: `NR_IRQS' undeclared here (not in a function)
sundance.c: In function `sundance_probe1':
sundance.c:491: warning: implicit declaration of function `init_etherdev'
sundance.c:491: warning: assignment makes pointer from integer without a cast
sundance.c: In function `netdev_open':
sundance.c:728: warning: `MOD_INC_USE_COUNT' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/module.h:501)
sundance.c:730: warning: passing arg 2 of `request_irq' from incompatible pointer type
sundance.c:731: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/module.h:513)
sundance.c: In function `set_rx_mode':
sundance.c:1317: warning: passing arg 2 of `set_bit' from incompatible pointer type
sundance.c: In function `sundance_pwr_event':
sundance.c:1392: warning: `MOD_INC_USE_COUNT' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/module.h:501)
sundance.c:1424: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/module.h:513)
sundance.c: In function `netdev_close':
sundance.c:1504: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /lib/modules/2.6.5-1.358/build/include/linux/module.h:513)
make: *** [sundance.o] Error 1
[root at fc2node1 mymod]# 

tanks, Lorenzo Rizzo

                   Lorenzo Rizzo
     \|||||/       GRTN S.p.A. ST-Torino
     /_   _\       Via S. Botticelli, 139 - 10154 TORINO
oOOo (.) (.) oOOo  Tel. 0112468151 Cel. 3484077738
------------------ rizzo.lorenzo at grtn.it 





More information about the netdrivers mailing list