Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-27-2007, 09:37 PM   #1
LQ Newbie
Registered: Feb 2007
Distribution: Debian
Posts: 17

Rep: Reputation: 0
Recompile kernel?

I just spent the last day and a half installing gentoo. During the instalation it gave me a choice of the kernel to use. I chose the cd one be the quickest to install. It said that it didn't come with the source. I didn't care then. Now that I have the system up and running i tried to install the madwifi drivers so I don't have to have my laptop plugged in to an Ethernet cable (I have a cisco aironet CB21AG wireless card) using the command emerge madwifi-ng it started to work, but it said
 * Could not find a usable .config in the kernel source directory.
 * Please ensure that /usr/src/linux points to a configured set of Linux sources.
 * If you are using KBUILD_OUTPUT, please set the environment var so that
 * it points to the necessary object directory so that it might find .config.

!!! ERROR: net-wireless/madwifi-ng- failed.
Call stack:, line 1555:   Called dyn_setup, line 668:   Called pkg_setup
  madwifi-ng-, line 32:   Called linux-mod_pkg_setup
  linux-mod.eclass, line 459:   Called linux-info_pkg_setup
  linux-info.eclass, line 554:   Called die

!!! Unable to calculate Linux Kernel version
!!! If you need support, post the topmost build error, and the call stack if relevant.
I'm assuming that this is because I don't have the kernel source and I was wondering how to recompile the kernel and include the source.
Old 03-27-2007, 09:44 PM   #2
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Make sure that there is a symbolic link in /usr/src called linux that points to the kernel sources in that directory.

To build a custom kernel-> follow the Handbook: Handbook - Manual Kernel

Make sure to edit your grub.conf for the new kernel

Last edited by dxqcanada; 03-27-2007 at 09:49 PM.
Old 03-28-2007, 08:28 AM   #3
LQ Newbie
Registered: Jan 2007
Location: london
Distribution: Gentoo(amd64) - 2.16.20
Posts: 26

Rep: Reputation: 15
I wrote this a while ago, maybe it will be useful: took me about three weeks to work out how to do a networkless install on gentoo (the networkless install guide had convieniently forgotten to cover the networkless case!)

I can assure you that you do have the kernel sources on your cd, they are probably in something like /distfiles, you need to copy them to /usr/portage/distfiles for portage to be able to access them.


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
can i recompile the kernel? zameer_india Linux - Newbie 8 01-12-2005 07:25 AM
recompile kernel niteshg Linux - General 9 01-02-2005 01:25 AM
Why recompile kernel? dustin_wielenga Slackware 16 12-26-2004 08:37 PM
kernel recompile error (kernel panic) tombaaaaa Linux - Newbie 4 08-04-2004 05:32 PM
Recompile kernel 2.6 heema Linux - General 3 05-26-2004 11:29 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration