LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2006, 01:05 AM   #1
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Rep: Reputation: 0
Cannot 'make' in madwifi directory


Iam currently trying to use madwifi to get my DWL-G10 wireless card to work. When I try to use make in the directory where madwifi, is, though, I get this error message:

Makefile.inc:124: *** KERNELCONF: /lib/modules/2.6.13-15-default/build/.config does not exist.. Stop.


I've been doing reading on the internet for a couple hours, but I still don't really understand what the message means, or what to do about it. I apologize if the question has been asked before, but this is my first time using Linux, and I'm still learning the ropes.

Any help or pointers would be greatly appreciated!
 
Old 03-08-2006, 02:32 AM   #2
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
Do your have your kernell source available ?
 
Old 03-08-2006, 11:05 AM   #3
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by zeitounator
Do your have your kernell source available ?
How do you know if your kernel source is available? I'm not even sure where to look.

Edit: I went into Yast and downloaded packages labeled 'kernel-source', but I still cannot use make. What else do I need to do?

Last edited by Katlyn; 03-08-2006 at 03:28 PM.
 
Old 03-09-2006, 08:02 PM   #4
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Okay, I've been reading, and this is what I think I've learned. Please tell me if I'm heading in the right direction at all.

a) In order to use 'make', I have to be able to access the config files for my kernel source
b) I checked my directories where I *think* my kernel sources should be. The .conf file does not exist
c) In order to create the configuration file, I need to rebuild my kernel


Am I correct? Do I really need to rebuild my kernel? Because, quite frankly, I've had Linux for about 2 days, and I'm terrified to build the kernel, because I'm pretty likely to just break everything.


What do the kernel source files look like? I went into Yast and downloaded them, but I don't know where exactly they are, or if they're configured or anything. If they aren't, is there a way I can configure them without rebuilding the kernel?


Any answers at all would be greatly appreciated.
 
Old 03-10-2006, 01:45 AM   #5
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Okay, so I went back into Yast and updated my kernel. Now 'make' will run just fine. When I went to 'make install' it asked me if I wanted to remove modules from previous installations - I said yes. This seemed to go well too. But when I type in 'modprobe ath_pci' I get this error: FATAL: Module ath_pci not found.

::headdesk:: I just seem to run into more and more problems.

Edit: I went into the directory where ath_pci should be, and it isn't there. So I'm assuming I need to install that module, but I'm not really sure how to. Any pointers?

Last edited by Katlyn; 03-10-2006 at 01:59 AM.
 
Old 03-10-2006, 02:16 AM   #6
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
This is my output from 'make install'

h scripts/find-madwifi-modules.sh /lib/modules/2.6.13-15.8-default
for i in ./ath_hal ./net80211 ath_rate/sample ./ath; do \
make -C $i install || exit 1; \
done
make[1]: Entering directory `/home/katlyn-kun/madwifi-ng/ath_hal'
test -d //usr/share/modules/versions:/usr/share/modules/modulefiles || mkdir -p //usr/share/modules/versions:/usr/share/modules/modulefiles
strip -S ath_hal.ko
cp ath_hal.ko //usr/share/modules/versions:/usr/share/modules/modulefiles
make[1]: Leaving directory `/home/katlyn-kun/madwifi-ng/ath_hal'
make[1]: Entering directory `/home/katlyn-kun/madwifi-ng/net80211'
test -d //usr/share/modules/versions:/usr/share/modules/modulefiles || mkdir -p //usr/share/modules/versions:/usr/share/modules/modulefiles
for i in wlan.o wlan_wep.o wlan_tkip.o wlan_ccmp.o wlan_acl.o wlan_xauth.o wlan_scan_sta.o wlan_scan_ap.o; do \
f=`basename $i .o`; \
strip -S $f.ko; \
cp $f.ko //usr/share/modules/versions:/usr/share/modules/modulefiles; \
done
make[1]: Leaving directory `/home/katlyn-kun/madwifi-ng/net80211'
make[1]: Entering directory `/home/katlyn-kun/madwifi-ng/ath_rate/sample'
test -d //usr/share/modules/versions:/usr/share/modules/modulefiles || mkdir -p //usr/share/modules/versions:/usr/share/modules/modulefiles
strip -S ath_rate_sample.ko
cp ath_rate_sample.ko //usr/share/modules/versions:/usr/share/modules/modulefiles
make[1]: Leaving directory `/home/katlyn-kun/madwifi-ng/ath_rate/sample'
make[1]: Entering directory `/home/katlyn-kun/madwifi-ng/ath'
test -d //usr/share/modules/versions:/usr/share/modules/modulefiles || mkdir -p //usr/share/modules/versions:/usr/share/modules/modulefiles
strip -S ath_pci.ko
cp ath_pci.ko //usr/share/modules/versions:/usr/share/modules/modulefiles
make[1]: Leaving directory `/home/katlyn-kun/madwifi-ng/ath'
(export MODULEPATH=/usr/share/modules/versions:/usr/share/modules/modulefiles; /sbin/depmod -ae)
make -C ./tools install || exit 1
make[1]: Entering directory `/home/katlyn-kun/madwifi-ng/tools'
install -d /usr/local/bin
for i in athstats 80211stats athkey athchans athctrl athdebug 80211debug wlanconfig; do \
install $i /usr/local/bin/$i; \
strip /usr/local/bin/$i; \
done
install -d /usr/local/man/man8
install -m 0644 man/*.8 /usr/local/man/man8
make[1]: Leaving directory `/home/katlyn-kun/madwifi-ng/tools'
 
Old 03-10-2006, 02:23 AM   #7
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I've checked the directories

/usr/share/modules/versions:/usr/share/modules/modulefiles

and my madwifi directory, they both have pci_ath in them! And from the the make install log, it looks like the modulepath is pointing to the right directory. So what's going on?
 
Old 03-10-2006, 03:06 AM   #8
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Did you run "depmod -a" ? to update the modules dependency info?
But I fear this will still not work, because:
The file .config in the kernel source directory (/usr/src/linux) exists only after you at least have run the configuration part for the kernel.
Then this file is present - and your madwifi... will build - because the check it does is successful.
Since you build a kernel-module to be inserted into the running kernel, this module needs to "fit" the currently running kernel.
It was built against the kernel-source you have - but probably does not "fit" the currently running kernel, that is why inserting it will fail.
You need to be running the kernel which you built your madwifi module for.
That means: build it, install it, boot it - then check if your module still does not work.
Hint: install it by adding it to your bootloader under a distinct name. Do not replace your current kernel-image with the one you are going to build.
This way you still can boot your old kernel, in case the new one is not working as expected.
 
Old 03-10-2006, 03:24 AM   #9
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jomen
Did you run "depmod -a" ? to update the modules dependency info?
But I fear this will still not work, because:
The file .config in the kernel source directory (/usr/src/linux) exists only after you at least have run the configuration part for the kernel.
Then this file is present - and your madwifi... will build - because the check it does is successful.
Since you build a kernel-module to be inserted into the running kernel, this module needs to "fit" the currently running kernel.
It was built against the kernel-source you have - but probably does not "fit" the currently running kernel, that is why inserting it will fail.
You need to be running the kernel which you built your madwifi module for.
That means: build it, install it, boot it - then check if your module still does not work.
Hint: install it by adding it to your bootloader under a distinct name. Do not replace your current kernel-image with the one you are going to build.
This way you still can boot your old kernel, in case the new one is not working as expected.

I did run depmod -a, it didn't make a difference.

I am confused about the rest of what you wrote - do I need to rebuild madwifi or the kernel?

I don't know if it helps clarify the situation any farther, but 'lsmod' does not show ath_pci. (I'm not sure if it's supposed to, though!)

Thank you so much for replying!
 
Old 03-10-2006, 03:36 AM   #10
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
First the kernel - then madwifi.
Not just rebuild - but also run it...

About the last hint: the kernel image is usually called bzImage or vmlinuz...
if you just copy the new one - and the old one has the same name - you will end up with just the new one and no way to go back in case you need to, because the new one did not work, for instance.
 
Old 03-10-2006, 07:26 PM   #11
Katlyn
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jomen
First the kernel - then madwifi.
Not just rebuild - but also run it...

About the last hint: the kernel image is usually called bzImage or vmlinuz...
if you just copy the new one - and the old one has the same name - you will end up with just the new one and no way to go back in case you need to, because the new one did not work, for instance.


Well.. I gave it my best, and tried to rebuild my kernel... I failed miserably. XD In the process, even though I attempted to back up my old configuration, I also screwed that up, so now I'm reinstalling...I think I will leave off rebuilding the kernel until I have a lot more Linux experience, the wireless card will just have to wait. Thank you for all your help though, and if you could point me towards any guides or books that I might not have come across yet that could help me learn more about Linux, I'd be very greatful.
 
Old 03-11-2006, 03:44 AM   #12
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Some hints for your next try compiling the kernel:

If you can, start with the kernel-configuration you already have. Look for a file in /proc called config.gz
Code:
ls -l /proc/config.gz
If it is there, it contains the configuration used to build you currently running kernel.
This command will unpack this compressed file and put it to the kernel-source-directory and then you have a surely working starting point for your new kernel.
Code:
zcat /proc/config.gz > /usr/src/linux/.config
Then go there and run make menuconfig or make xconfig... and just look through the options that are enabled - to learn...but don't change anything.
Then build the kernel.
Code:
make
make modules_install
When finished building, the new kernel is in /usr/src/linux/arch/i386/boot/bzImage
Copy this file to /boot - where your working kernel already is.
Code:
cp /usr/src/linux/arch/i386/boot/bzImage /boot/my_new_kernel
then your new kernel is in /boot and its name is my_new_kernel
Add another two lines to /boot/grub/menu.lst - take the lines already there as a reference and change just the name of the kernel to the one you gave it.

like this:
Code:
...

title=the_old_and_working_one
kernel /the_name_it_has root=/dev/hda3

title=the_new_one
kernel /my_new_kernel root=/dev/hda3


The "/dev/hda3" is just an example - might be different for you - I just took my configuration and pasted it here...
Now you can boot the old or the new one - if the new one does not work - you still have the old one.

To back up your old and working configuration before you change anything do:
Code:
cp -a /boot/grub/menu.lst /boot/grub/menu.lst-backup
--> to copy the grub config to menu.lst-backup
Also copy the kernel configuration - if it was there - to a place you will find it again:
Code:
cp /usr/src/linux/.config /root/
This way you can safely mess up a thousand kernel compiles - and still have the first and working kernel available to boot your system and try again - no need to reinstall every time you miss something when you configure the kernel.
 
  


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
madwifi make install problems dstill Linux - Wireless Networking 2 02-09-2006 05:25 PM
Madwifi make error coderasm Linux - Wireless Networking 1 01-12-2006 08:45 PM
MadWiFi make errors PhilHalf Linux - Newbie 1 07-07-2005 03:24 AM
madwifi fails to 'make' Vincent_Vega Linux - Wireless Networking 1 12-31-2004 05:00 PM
Madwifi make problem... EduFer Linux - Hardware 7 04-22-2004 07:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:12 PM.

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