LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 03-20-2005, 09:07 PM   #1
batard
LQ Newbie
 
Registered: Jan 2005
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 16

Rep: Reputation: 0
Where do I get just the kernel source?


I'm trying to install a wireless driver in Mandrake 10.1, but to do so I need the kernel source, and it wasn't included in the Mandrake 3-Cd install. I tried downloading the source tarball from kernel.org (my kernel here is 2.6.8.1) but once I unpacked it, it appeared that the whole kernel was there, waiting to be installed, whereas I just needed the source. I tried moving the directory the tarball created (linux-2.6.8.1) into /usr/src, but that didn't solve the problem. So is there any way to get just the source and create a directory for it in /usr/src? I'm also wondering if there's any difference between the source for linux-2.6.8.1 and the 2.6.8.1-12mdk kernel that's specific to Mandrake? I went to their web site and did a google search, but I couldn't seem to find that either.

Any help much appreciated. Please excuse my newbieness
 
Old 03-20-2005, 09:13 PM   #2
t3gah
Member
 
Registered: Dec 2004
Distribution: SuSE, RedHat, ubuntu, Debian
Posts: 734

Rep: Reputation: 30
Re: Where do I get just the kernel source?

Quote:
Originally posted by batard
I'm trying to install a wireless driver in Mandrake 10.1, but to do so I need the kernel source, and it wasn't included in the Mandrake 3-Cd install. I tried downloading the source tarball from kernel.org (my kernel here is 2.6.8.1) but once I unpacked it, it appeared that the whole kernel was there, waiting to be installed, whereas I just needed the source. I tried moving the directory the tarball created (linux-2.6.8.1) into /usr/src, but that didn't solve the problem. So is there any way to get just the source and create a directory for it in /usr/src? I'm also wondering if there's any difference between the source for linux-2.6.8.1 and the 2.6.8.1-12mdk kernel that's specific to Mandrake? I went to their web site and did a google search, but I couldn't seem to find that either.

Any help much appreciated. Please excuse my newbieness
Are you talking about the patch so it will update? Thats at kernel.org unless the mandrake ftp site doesn't have it. You can also check the planetmirror link below too.

http://www.mandrakelinux.com/en/ftp.php3

ftp://ftp.planetmirror.com/pub/Mandrake/
 
Old 03-20-2005, 09:27 PM   #3
batard
LQ Newbie
 
Registered: Jan 2005
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 16

Original Poster
Rep: Reputation: 0
Are you talking about the patch so it will update?

Not exactly. At least, I don't think so. Basically, I unpack the wireless driver I'm trying to install (it's a CVS archive), and then I go to install it and it asks for the kernel source. the Driver itself consists of three modules that I have successfully applied to the kernel in FC3 in the past (my FC3 has the source installed).

So I type ...

# cd madwifi
# make

Then it gives me an error that says to specify a KERNELPATH. So I say, OK, I should read up on this. So I read the readme that comes with the driver, and it says if it asks for a KERNELPATH, either make that into an environment variable or specify its path after # make. So I assumed that I would have kernel source in /usr/src/linux-2.6.8.1-12mdk. But there was no such thing. I tried anyway, typing

# make KERNELPATH=/usr/src/linux-2.6.8.1-12mdk
and
# make KERNELPATH=/lib/modules/2.6.8.1-12mdk/

both without any success. There is only one thing in /usr/src, and that's a directory called ATI, created when I installed an ATI driver. This just seems odd to me, coming from FC3.

I hope that explains it a little better.
 
Old 03-20-2005, 10:49 PM   #4
mpetrov
LQ Newbie
 
Registered: Aug 2004
Distribution: Gentoo
Posts: 18

Rep: Reputation: 0
Why don't you try to move your unpacked kernel into the /usr/src/linux-2.6.8-1 and then define it as an environment variable?
I assume it didn't work because your KERNELPATH was pointing to a non existent folder.

Best Regards,
mpetrov
 
Old 03-21-2005, 10:23 AM   #5
batard
LQ Newbie
 
Registered: Jan 2005
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Why don't you try to move your unpacked kernel into the /usr/src/linux-2.6.8-1 and then define it as an environment variable?
Yes, unfortunately, I did try that and it didn't work. I forgot to mention that in the earlier post. I'm thinking of trying to recompile the kernel in the hope that it installs the source when it does that. I'm a little antsy about trying that - I've never done anything like that - but I can format and reinstall mandrake if necessary.
 
Old 03-21-2005, 10:48 AM   #6
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
I'm assuming you will use the kernel sources from kernel.org. Then, you don't need to format and reinstall if the compile goes wrong. Just don't delete the old kernel image and the entry in the bootloader. This way you can always boot back with the old kernel and recompile untill you get it working.
One thing though, compiling a kernel won't install the sources, that must be done by you by extracting the kernel-source tarball into /usr/src/linux-kernel_version (if it doesn't exist, create it).
And compiling a kernel isn't that hard, even though it looks scary. Just use your common-sense for setting most of the options during the config stage, then go ahead and make bzImage, make modules, make modules_install, copy the kernel image, add the new kernel entry in the bootloader's config file and that should be it.
You can always post your doubts and questions here if you're not satisfied with something.
Also, take a look here: http://www.linuxquestions.org/questi...threadid=73436 it's fairly understandable written and may give you a start.
Good luck!
 
Old 03-21-2005, 10:54 AM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you need the mandrake kernel-source rpm for the kernel you are running. try to use urpmi to get it.

the problem you will run into with the kernel.org sources is if mandrake applied patches to the kernel source ( highly likely this is the case), then the kernel.org sources will not help you unless you know exactly what patches are added, and patch the vanilla sources with those packages. you basically have two choices:

either find the kernel-source package for your distro

or compile a new kernel. note that if you compile a new kernel, don't move the sources to /usr/src - this is no longer required and advised against by the kernel team.
 
Old 03-23-2005, 05:29 PM   #8
batard
LQ Newbie
 
Registered: Jan 2005
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the guidance. I did what you suggested and actually discovered that the kernel source is located on CD 3 of the mandrake 10.1 CD set. I followed the directions posted here: http://www.speculation.org/garrick/kernelprep.html. I used urpmi, and kept to the directions to the last detail, because almost all of the commands there are unfamiliar. Then I went to install the madwifi driver, and I got a ton of errors about variables already being defined (and I mean a TON of errors). Both # make and # make install gave me trouble and quit out before finishing. I don't have the faintest idea what's going on here...
 
  


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
Debain kernel source or Linux kernel source? kushalkoolwal Debian 4 11-28-2005 01:56 PM
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 12:34 AM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
difference between "pure" kernel source, and .deb packaged kernel source microsoft/linux Debian 1 06-19-2005 10:28 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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