LinuxQuestions.org
Help answer threads with 0 replies.
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 11-23-2003, 10:26 PM   #1
odious1
Member
 
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252

Rep: Reputation: 30
how to compile a wireless driver?


I have D-link pci wireless card that user the atheros chip. I found a driver that which supports my chip but it is unlike anything I have seen befor. The file is madwifi-20030802.gz I decompressed but it appears to be a script not a directory. When I run make I get an error about there being no source. The file itself says that the Makefile may need to be edited to reflect the source directory. The only Makefile I am familiar with is the on where my kernel source files are located. I know this needs to be compiled but I do not know where to begin.

Is it possible that this file is missing some necessary components?

Any thoughts would be appreciated.

kernel 2.4.7-10 rh7.2

Thanks
 
Old 11-24-2003, 12:57 AM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
try this

sh filename
 
Old 11-24-2003, 08:52 AM   #3
odious1
Member
 
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252

Original Poster
Rep: Reputation: 30
When I tried this it said "cannot execute binary file". sh seems to be the equivalent of ./fieletoexecute. Learn something every day. I wonderd how I could run a file from a script. I may have misled you on this, in saying I thought it was a script, I do not know what it is. It does not have the #!/bin/sh I have become accustomed to seeing. I will attach one of the sections labeled makefile of wich ther are many in the file. Possibly someone can tell me what to do with it.

#
# Makefile for the Atheros HAL Module.
#
# NB: we can't support MODVERSIONS because it requires building
# from source which may not be available
#
DEPTH= ..

KMODNAME= ath_hal

include ${DEPTH}/Makefile.inc

HALINCS=-I${HAL} -I${HAL}/linux -I${ATH_HAL}

SRCS= ${HAL}/linux/ah_osdep.c
OBJS= ah_osdep.o hal.o
INCS+= ${HALINCS} -I${LINUX} -I${DEPTH}

CLEANFILES+= opt_ah.h

ifneq (${LINUX_VERSION}, 204)
OBJS+= ah_osdep.mod.o
endif

ALL= ${KMODNAME}.${KMODSUF}
CFLAGS= ${INCS} -D__KERNEL__ -DMODULE ${MODOPTS} ${COPTS}

all: ${ALL}

${KMODNAME}.${KMODSUF}: ${OBJS} ${HAL}/version.h Makefile
${LD} -o $@ -r -x ${OBJS}

ifdef HAL_SRC
include ${HAL}/linux/Makefile.inc
else
UUDECODE?=uudecode

hal.o: ${HAL}/linux/i386-elf.hal.o.uu
${UUDECODE} < ${HAL}/linux/i386-elf.hal.o.uu
opt_ah.h: ${HAL}/linux/opt_ah.h
cp ${HAL}/linux/opt_ah.h opt_ah.h
endif

ah_osdep.o: ${HAL}/linux/ah_osdep.c
${CC} -c -o $@ ${CFLAGS} $<

ifneq (${LINUX_VERSION}, 204)
ah_osdep.mod.c: ah_osdep.o
${KERNEL_PATH}/scripts/modpost ${KERNEL_PATH}/vmlinux $<
ah_osdep.mod.o: ah_osdep.mod.c
${CC} -c -o $@ ${CFLAGS} $<
endif

install: all
test -d ${DESTDIR}/${MODULE_PATH} || mkdir ${DESTDIR}/${MODULE_PATH}
cp ${ALL} ${DESTDIR}/${MODULE_PATH}

clean:
rm -f ${ALL} ${OBJS} ${CLEANFILES}

depend: beforedepend .depend afterdepend
.depend: ${SRCS} opt_ah.h
rm -f .depend
${CC} -M ${CFLAGS} ${SRCS} > .depend
beforedepend:
afterdepend:
-include .depend

Thanks
 
Old 11-24-2003, 10:35 AM   #4
charliecron
LQ Newbie
 
Registered: Nov 2003
Posts: 8

Rep: Reputation: 0
Well, according to this page, http://www.stat.ufl.edu/~presnell/Laptop/dwl-g650.txt ,

edit the Makefile.inc file to point to your kernel .config. He points to a directory of default redhat kernel configs that you would typically copy to the /usr/src/linux(-2.4?) dir, and then run make oldconfig from the kernel source dir.

Wierd though he says its no longer neccessary to edit the file, and then in his instructions it says to edit the file, go figure. But since your source says to edit the file, go ahead and do it.

Charlie
 
Old 11-24-2003, 10:52 AM   #5
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Yes, it looks like a makefile it should be named Makefile.
 
Old 11-24-2003, 12:26 PM   #6
odious1
Member
 
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252

Original Poster
Rep: Reputation: 30
Ok if this ia a Makefile shouldn't there be something else to run aginst it? When I downloaded the .gz file I gzip -dv and got a single file madwifi-20030802 not a directory. My experiences have been extracting a tar or gzip and then cd to that directory and running make from within.

This is wher I am confused, all I have is this one file, nothing else; no Makefile, build, build.conf or anything. Do I copy this one file into a directory which contains the other elements and rename to Makefile and run make or is there a way to compile one file?


Thanks
 
Old 11-24-2003, 12:30 PM   #7
charliecron
LQ Newbie
 
Registered: Nov 2003
Posts: 8

Rep: Reputation: 0
Well then it may be an improperly named file, maybe a tar file. Run:

file filename

If it is a tar archive well then you know what to do, tar xvf filename.

Charlie
 
Old 11-24-2003, 12:40 PM   #8
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Most likely there is another file that you will need that goes with that one, not sure the name of it.
 
Old 11-24-2003, 12:54 PM   #9
odious1
Member
 
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252

Original Poster
Rep: Reputation: 30
Talking

Pow! that was it... The file was named wrong changed from *.gz to *.tar.gz and extracted a directory full of stuff I do not understand for the most part, everything is back to normal.

I would have never thought of a bad filename.

Thx
 
  


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
Wireless driver won't compile in FC4 litlmary Fedora 3 02-01-2006 12:55 AM
Can't compile wireless driver - missing include file?! soultaco Linux - Laptop and Netbook 1 05-12-2004 11:14 PM
please help with installing the hostap-driver-o.1.3 driver for wireless card chrisseattle Linux - Wireless Networking 1 03-26-2004 12:46 PM
driver compile rcarlino Mandriva 0 08-25-2003 07:22 AM
How do I compile a driver lexy Linux - Newbie 3 12-16-2002 04:35 PM


All times are GMT -5. The time now is 05:14 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