LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-13-2004, 04:31 AM   #1
prashantbss
LQ Newbie
 
Registered: Mar 2004
Location: India
Posts: 1

Rep: Reputation: 0
Problem in Enternet Card detection


I have problem in installing my Ethernet card in linux 9.0 with kernel(2.4.20.14).

Configuration:-
1. type - Myson MTD80X Based Fast Ethernet Card
2. files in floppy - "mtd80x.c", "pci-scan.c", "kern_compat.h", "pci-scan.h", "makefile".
3. Coding in make file:-

**************************** makefile *******************************************************
#!/usr/bin/make all
# Makefile for building updated Linux PCI network device drivers as modules.
# $id$

# PREFIX may be set by the RPM build to set the effective root.
PREFIX=
PCMCIA=/usr/src/pcmcia/include
CC=gcc

ifeq ($(KERNVER),)
MODULEDIR=$(PREFIX)/lib/modules/`uname -r`
LINUX=/usr/src/linux-2.4
else
MODULEDIR=$(PREFIX)/lib/modules/$(KERNVER)
LINUX=/usr/src/linux-$(KERNVER)
endif

CFLAGS = -DMODULE -D__KERNEL__ -I$(LINUX)/include -O -Wall -Wstrict-prototypes

# Work around Red Hat 7.0 lossage.
ifneq ($(wildcard /usr/bin/kgcc),)
CC=kgcc
endif

# If the modversion.h file exists we should pass a flag.
# Most of my drivers have been updated to not need this, but not the other
# kernel source files.

# If you are using Mandrake 8.0/RedHat 7.3 and you have problems when insmod
# the driver, please remove "-DMODVERSIONS" option from makefile.
MODVER_H = $(LINUX)/include/linux/modversions.h
ifneq ($(wildcard $(MODVER_H)),)
CFLAGS += -DMODVERSIONS
endif

DRV_OFILES = mtd80x.o

OFILES= $(DRV_OFILES) pci-scan.o

all: pci-scan.o $(DRV_OFILES)

$(OFILES) pci-scan.o: pci-scan.h kern_compat.h

pci-scan.o: pci-scan.h

install: $(OFILES)
install -m 444 pci-scan.o $(DRV_OFILES) $(MODULEDIR)/net/
@if [ -r cb_shim.o ]; then install -m 444 cb_shim.o $(MODULEDIR)/pcmcia/; fi
@if [ "$(PREFIX)" = "" ]; then /sbin/depmod -a $(KERNVER);\
else echo " *** Run '/sbin/depmod -a' to update the module database.";\
fi

clean:
-rm -f *.o
********************************************************************************************


4. Error when compling:-

**************************** ERROR *******************************************************
[root@localhost linux-2.4.x]# make all
gcc -DMODULE -D__KERNEL__ -I/usr/src/linux-2.4/include -O -Wall -Wstrict-prototypes -c -o pci-scan.o pci-scan.c
In file included from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from /usr/include/linux/mm.h:4,
from pci-scan.c:62:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
In file included from /usr/include/linux/sched.h:14,
from /usr/include/linux/mm.h:4,
from pci-scan.c:62:
/usr/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/include/linux/bitops.h:69,
from /usr/include/asm/system.h:7,
from /usr/include/linux/sched.h:16,
from /usr/include/linux/mm.h:4,
from pci-scan.c:62:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in userspace: atomicity not guaranteed
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from /usr/include/linux/mm.h:4,
from pci-scan.c:62:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from /usr/include/linux/mm.h:4,
from pci-scan.c:62:
/usr/include/linux/timer.h:45: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: parse error before '}' token
/usr/include/linux/timer.h:67: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
In file included from pci-scan.c:67:
/usr/include/linux/malloc.h:3:2: warning: #warning The Use of linux/malloc.h is deprecated, use linux/slab.h
pci-scan.c: In function `pci_drv_register':
pci-scan.c:149: warning: implicit declaration of function `pci_find_class'
pci-scan.c:149: warning: assignment makes pointer from integer without a cast
pci-scan.c:157: warning: implicit declaration of function `pci_read_config_dword'
pci-scan.c:163: warning: implicit declaration of function `printk'
pci-scan.c:163: `KERN_DEBUG' undeclared (first use in this function)
pci-scan.c:163: (Each undeclared identifier is reported only once
pci-scan.c:163: for each function it appears in.)
pci-scan.c:163: parse error before string constant
pci-scan.c:164: warning: left-hand operand of comma expression has no effect
pci-scan.c:164: warning: left-hand operand of comma expression has no effect
pci-scan.c:164: parse error before ')' token
pci-scan.c:178: dereferencing pointer to incomplete type
pci-scan.c:187: `KERN_INFO' undeclared (first use in this function)
pci-scan.c:187: parse error before string constant
pci-scan.c:188: dereferencing pointer to incomplete type
pci-scan.c:188: warning: left-hand operand of comma expression has no effect
pci-scan.c:188: warning: left-hand operand of comma expression has no effect
pci-scan.c:188: warning: left-hand operand of comma expression has no effect
pci-scan.c:188: parse error before ')' token
pci-scan.c:191: dereferencing pointer to incomplete type
pci-scan.c:191: dereferencing pointer to incomplete type
pci-scan.c:192: dereferencing pointer to incomplete type
pci-scan.c:193: `KERN_WARNING' undeclared (first use in this function)
pci-scan.c:193: parse error before string constant
pci-scan.c:208: warning: implicit declaration of function `ioremap'
pci-scan.c:210: parse error before string constant
pci-scan.c:216: warning: implicit declaration of function `pci_read_config_word'
pci-scan.c:219: parse error before string constant
pci-scan.c:222: warning: implicit declaration of function `pci_write_config_word'
pci-scan.c:226: dereferencing pointer to incomplete type
pci-scan.c:231: warning: implicit declaration of function `pci_set_master'
pci-scan.c:234: warning: implicit declaration of function `pci_read_config_byte'
pci-scan.c:236: parse error before string constant
pci-scan.c:239: warning: implicit declaration of function `pci_write_config_byte'
pci-scan.c:246: warning: implicit declaration of function `kmalloc'
pci-scan.c:246: `GFP_KERNEL' undeclared (first use in this function)
pci-scan.c:246: warning: initialization makes pointer from integer without a cast
pci-scan.c:259: warning: implicit declaration of function `atomic_inc'
pci-scan.c:259: union has no member named `usecount'
pci-scan.c: In function `pci_drv_unregister':
pci-scan.c:422: warning: implicit declaration of function `atomic_dec'
pci-scan.c:422: union has no member named `usecount'
pci-scan.c:429: warning: implicit declaration of function `kfree'
pci-scan.c: In function `acpi_wake':
pci-scan.c:489: warning: implicit declaration of function `pci_write_config_dword'
pci-scan.c: In function `cleanup_module':
pci-scan.c:522: `KERN_WARNING' undeclared (first use in this function)
pci-scan.c:522: parse error before string constant
make: *** [pci-scan.o] Error 1
[root@localhost linux-2.4.x]#

********************************************************************************************

5. Please Sugget the write Soloution.


Regards:-
Prashant Singh Rana
 
  


Reply



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
Problem wifi card detection pierre44 Linux - Wireless Networking 3 07-28-2005 07:01 AM
Sound Card Detection Problem with RHL9 rupak Linux - Distributions 1 01-04-2004 11:40 PM
Network card detection problem rui Linux - Networking 0 11-27-2003 09:35 AM
sound card detection problem jaylee Linux - General 9 06-21-2003 09:54 PM
Enternet 300 h1cks Linux - Networking 1 02-10-2002 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration