LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2007, 05:12 AM   #1
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Rep: Reputation: 15
Make error with Madwifi


Hello,

I am trying to get some drivers installed and I am following a doc I downloaded from an experienced Wifi guy but I cant get it to work. Needless to say I am a little lost when it comes to interpreting errors when doing make commands.

Here is the output:

pichi@pichi-laptop:~/madwifi$ make
Makefile.inc:113: *** KERNELPATH: /lib/modules/2.6.15-26-386/build does not exist. Stop.
pichi@pichi-laptop:~/madwifi$


I am using Ubuntu 6.06 and please forgive me if this is a really dumb question.

Thanks,

Pedro
 
Old 02-13-2007, 05:21 AM   #2
bhert
Member
 
Registered: May 2006
Distribution: OpenSUSE 10.3 Kubuntu Hardy Heron
Posts: 268

Rep: Reputation: 30
You need to link the kernel source like so:
Code:
ln -s /usr/src/linux-`uname -r` /lib/modules/`uname -r`/build
If that did not work, then you don't have the kernel source.
Download it and link it again.

-bhert
 
Old 02-13-2007, 05:38 AM   #3
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Original Poster
Rep: Reputation: 15
OK thanks but when I run the command you gave me I get this:


pichi@pichi-laptop:~/madwifi$ ln -s /usr/src/linux-`uname -r` /lib/modules/`uname -r`/build
ln: creating symbolic link `/lib/modules/2.6.15-26-386/build' to `/usr/src/linux-2.6.15-26-386': Permission denied


What am I doing wrong now?
 
Old 02-13-2007, 05:48 AM   #4
bhert
Member
 
Registered: May 2006
Distribution: OpenSUSE 10.3 Kubuntu Hardy Heron
Posts: 268

Rep: Reputation: 30
Sorry, should have told you that you need to be root to do this
Here is how it's done in console:

su
then type your root password

-bhert
 
Old 02-13-2007, 06:38 AM   #5
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks so much for gatting back to me so quickly but looky here:




pichi@pichi-laptop:~/madwifi$ su
Password:
root@pichi-laptop:/home/pichi/madwifi# ln -s /usr/src/linux-`uname -r` /lib/modules/`uname -r`/buildroot@pichi-laptop:/home/pichi/madwifi# make
Makefile.inc:113: *** KERNELPATH: /usr/src/linux-2.6.15-26-386 does not exist. Stop.
root@pichi-laptop:/home/pichi/madwifi#



So where do I go from here? Is there something missing. Oh and while I have you attention can you recommend a good book for beginners? I am sure all of this is easy enough if I just knew a few basic ideas of what the heck I am trying to do.

Thanks again,

P.
 
Old 02-13-2007, 03:59 PM   #6
bhert
Member
 
Registered: May 2006
Distribution: OpenSUSE 10.3 Kubuntu Hardy Heron
Posts: 268

Rep: Reputation: 30
look in /usr/src and see if its in the right path, if it's in a different path, just link that path like you would normally do. If the source is not there, you need to download it and then link it.
The source file looks something like linux-2.6.15-26-386

BTW There are plenty of tutorials in the net, just google for it.

-bhert
 
Old 02-13-2007, 04:15 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
RTFM comes to mind for this one. Madwifi has a pretty extensive set of help documents on their site.

From: http://madwifi.org/wiki/UserDocs/Distro/Ubuntu
Quote:
Ubuntu

Ubuntu ships madwifi in the restricted component, which is enabled in the default install. Madwifi chipsets should therefore ‘just work’.

In case you did a manual install, try installing linux-restricted-modules-$(uname -r) and that’s it.
Madwifi and Linux-Restricted-Modules ¶

If you decide you absolutely need to compile madwifi from SVN, then you must stop the linux-restricted-modules package from providing the madwifi module ath_hal, via its so called volatile module mechanism. Do so by adding ath_hal to the list of DISABLED_MODULES in /etc/default/linux-restricted-modules-common.

# This file is sourced from the linux-restricted-modules-common init
# script and is used to disable the link-on-boot feature, one module
# at a time. This can be useful if you want to use hand-compiled
# versions of one or more modules, but keep linux-restricted-modules
# installed on your system, or just to disable modules you don't use
# and speed up your boot process by a second or two.
#
# Use a space-separated list of modules you wish to not have linked
# on boot. The following example shows a (condensed) list of all
# modules shipped in the linux-restricted-modules packages:
#
# DISABLED_MODULES="ath_hal fc fglrx ltm nv"
#
# Note that disabling "fc" disables all fcdsl drivers, "ltm" disables
# ltmodem and ltserial, and "nv" disables both the nvidia drivers.
# You can also name each module individually, if you prefer a subset.

DISABLED_MODULES="ath_hal"
 
Old 02-13-2007, 04:58 PM   #8
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks for your input, and yes I did try and follow the Instructions at MadWifi. The documentation out there is written for people who have some idea of how LINUX works. I dont and dont pretend to, and hence in my second post I asked for some help for a book with basic concepts and ideas so I am not wasting peoples time with stupid questions.

There is little assumption that the poeple who want to install wireless drivers need it spelled out a little better. Most of what I see is a lot of try this kind of approach. There are about 4-5 posts in this forum with almost the exact error message. No one had an answer.

This is definately frustrating for people like me who want to leave other Operating Systems in the dust because we are tired of clicking away without knowing what we are doing. I wont give up though.

Maybe making wireless drivers work with Kismet was not the best choice for my first LINUX project.

Currently reinstalling and will post when I find an answer.

Thanks to everyone.

Pete
 
Old 02-13-2007, 05:27 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
"Thanks for your input, and yes I did try and follow the Instructions at MadWifi."

So, madwifi wasn't already installed on your Ubuntu distro? That kinda sucks. If you actually do have to install madwifi, then the attitude to take toward it is that it's a kernel module; not just a program. As such, as you've discovered, it has to have access to the kernel header files in order to be able to compile properly for your kernel. You may have to install "kernel-package" and "linux-kernel-headers" (I think I've got those names right) before you make any progress. On my machine, where I mess with the kernel a lot, I have the following script that I use to rebuild madwifi and restart wpa_supplicant. I run it as root, of course.

Code:
#!/bin/sh
make clean
make
make install
modprobe ath_pci
kill `ps ax |grep wpa | grep -v grep | awk '{print$1}'`
/sbin/wpa_supplicant -Bw -Dwext -c/etc/wpa_supplicant.conf -iath0
dhcpcd ath0
 
Old 02-13-2007, 06:06 PM   #10
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Original Poster
Rep: Reputation: 15
Wow,

Thanks a lot. I have a feeling this script will come in handy! So, by running this script I will be able to safely undo any build attempt of MadWifi?

And yes I have finally figured out I am trying to do a manual install of these drivers and that I need to install the Kernel header files (what are kernel header files by the way?) first.

What may be my problem is when I issue a

Code:
sudo aptitude install update
I get long waits for servers here in SPain a 99% Waiting for headers) message. So I touched up the sources.list file to use USA servers but still I am getting 99% Waiting for headers message. So it looks like I am not getting the headers for some reason. It could be the wacky way I have my Ubuntu hooked (cross-cable) to my XP laptop that is running wireless out to the Internet. I can ping servers on the internet and surf but I will try tomorrow on a normal LAN connection and let everyone know ow it goes.

Till then thanks for all and ANY advice,

Pedro
 
Old 02-13-2007, 06:36 PM   #11
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
"Thanks a lot. I have a feeling this script will come in handy! So, by running this script I will be able to safely undo any build attempt of MadWifi?"

Well, you have to understand that this is what I use to make a new madwifi after I've built a new kernel; which of course doesn't have madwifi installed yet. In the case of having a working madwifi that you want to replace, you might have to do "rmmod madwifi" or maybe just "make uninstall".

"what are kernel header files by the way?"

They are just the header files that were used to compile the kernel. They establish prototypes of kernel functions, sizes of arrays, stuff like that that a module needs to be able to work with the running kernel.

"I get long waits for servers here in SPain a 99% Waiting for headers) message."

Don't know how I can help you on that. You might try apt-spy to see if it can find you better servers. Chances are it's your XP forwarder, though.
 
Old 02-14-2007, 04:01 AM   #12
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Original Poster
Rep: Reputation: 15
OK here we have another small problem but I am not too sure what it is. I am trying to run the following command:
Code:
 sudo aptutude install build-essential sharutils libncurses-dev linux-headers `uname –r` libpcap0.8-dev ruby1.9 ruby esvn
but then I get an error message:

Code:
uname: extra operand `–r'
Try `uname --help' for more information
Like a good boy I try the help command but I dont see anything that jumps out at me.

Thanks,

P.
 
Old 02-14-2007, 02:58 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
I think the problem here is that you don't understand what you're doing. There used to be a response from the system that drove me nuts - "not a typewriter" - when the computer had no clue what I was trying to do either.
Code:
uname: extra operand `–r'
So, I think what you want is this:
Code:
aptitude install linux-headers-`uname –r`
But, more important is for you to understand what this mess does so that you can either fix it yourself in the future, or do it a different way. Notice that the single quotes around uname -r are backward quotes. That tells the system to run whatever is between them as a command and output the response into the command you're running. You've also neglected to connect linux-headers to it with a hyphen, which I've corrected above. You also misspelled aptitude, which tells me that you didn't cut and paste the response which makes it difficult to figure out which are typing errors and which are things that simply didn't work.

But, back to business. In this case, uname -r is the version of linux that you're using. Let's pretend that you're using 2.6.15-26-386. In this case, what you're really trying to do is input the following to aptitude:
Code:
aptitude install linux-headers-2.6.15-26-386
The rest of the packages can be run one at a time, as well.
 
Old 02-15-2007, 03:59 AM   #14
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Original Poster
Rep: Reputation: 15
OK. First of all I am sorry I did not copy into my post the actual code I used, and as I get to know LINUX better I can see that not doing so is a serious no-no and I promise not to do it again. Forgive me. It just makes troubleshooting a lot harder and since people help out of the goodness of thier own heart, I dont want to make this any more difficult than it already is.

Thanks so much for you explination of what I am doing. It is invaluable to me.

I want to link to the documentation I am using for this install:

[HTML]http://www.pauldotcom.com/KarmaUbuntu.pdf[/HTML]


New problem. I run:

Code:
root@pete-laptop:~# svn checkout http://svn.madwifi.org/branches/madwifi-old madwifi
bash: svn: command not found
What is svn and where can I get it?

Once I get this all running I will may get in touch with Larry (Author of .pdf above) to expand the documentation for complete newbies like me.

Thanks again,

Pete
 
Old 02-15-2007, 07:07 AM   #15
Pete89
Member
 
Registered: Jan 2007
Location: Granada Spain
Distribution: Ubuntu, Slackware, Debian, OpenWRT
Posts: 35

Original Poster
Rep: Reputation: 15
OK here we go again. I was able to solve the svn problem with:

Code:
sudo aptitude install libpcap0.8-dev ruby1.9 ruby esvn
But somehow I have done full circle again:

I was still getting:

Code:
Makefile.inc:113: *** KERNELPATH: /usr/src/linux-2.6.15-26-386 does not exist. Stop.
When I ran make in /madwifi

I downloaded this file (right file?) to the /usr/src directory:

linux-image-2.6.15-28-386_2.6.15-28.51_i386.deb

I expanded it and it left me with this in the /usr/src directory:

control.tar.gz
linux-image-2.6.15-28-386_2.6.15-28.51_i386.deb
data.tar.gz
debian-binary
linux-headers-2.6.15-26-386 (this one was already there)
linux-headers-2.6.15-26 (this one too)


So I now create the directory the make commands wants in the error message (linux-2.6.15-26-386) and copy the results of the expanded .deb in there. I expand the two tar files and now I have this in the /usr/src/linux-2.6.15-26-386 directory:

boot
control
control.tar.gz
data.tar.gz
debian-binary
lib
postinst
postrm
preinst
prerm
usr

I then try to run the make command for MadWifi and I get this:

Code:
Makefile.inc:139: *** KERNELCONF: /usr/src/linux-2.6.15-28-386/.config does not exist..  Stop.
I dont know if this can be called an improvement on the old error but at least its something. Am I close or am I still a hundred miles from nowhere?

P.
 
  


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
Madwifi won't make in Etch 1madstork Debian 4 05-18-2006 01:11 PM
Cannot 'make' in madwifi directory Katlyn Linux - Software 11 03-11-2006 04:44 AM
Madwifi make error coderasm Linux - Wireless Networking 1 01-12-2006 09:45 PM
MadWiFi make errors PhilHalf Linux - Newbie 1 07-07-2005 04:24 AM
Madwifi make problem... EduFer Linux - Hardware 7 04-22-2004 08:24 PM


All times are GMT -5. The time now is 08:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration