# madwifi emerge fails KERNEL PATH ERROR GENTOO 2006  [SOLVED]

## linuxdork

I tried:

ACCEPT_KEYWORDS="~X86" emerge madwifi-driver

and I got this error:

Makefile.inc:94: Default KERNELPATH not found, using /usr/src/linux

Makefile.inc:104: *** KERNELPATH: /usr/src/linux does not exist.  Stop.

and so the compile failed.  No 'linux' in /usr/src.  I used the graphical installer to install gentoo and I could only get it to work with mostly default settings.  I hope this isn't the problem.  

lspci:

02:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

thank you.Last edited by linuxdork on Mon Mar 06, 2006 12:06 pm; edited 1 time in total

----------

## mars-red

Did you check to make sure /usr/src/linux actually does exist?  If not, then you need to create it (it should be a symlink pointing to the version of kernel sources you want to be using).

For example, my current version of kernel sources live at /usr/src/linux-2.6.15-gentoo-r4 so I have a symlink called /usr/src/linux which points to that location.  In my case, I used this command to create that symlink:

```
ln -s /usr/src/linux-2.6.15-gentoo-r4 /usr/src/linux
```

After doing that, if I do an ls -l of my /usr/src directory, this is what I see:

```

max@arthur ~ $ ls /usr/src -l

total 8

lrwxrwxrwx  1 root root   22 Feb  7 21:42 linux -> linux-2.6.15-gentoo-r4/

drwxr-xr-x 19 root root 4096 Feb  7 22:55 linux-2.6.15-gentoo-r1/

drwxr-xr-x 20 root root 4096 Feb 18 10:59 linux-2.6.15-gentoo-r4/

```

Note that it shows the 'linux' symlink pointing to my 2.6.15-r4 sources.  Also notice that my 2.6.15-r1 sources are still present - but since the 'linux' symlink does not point to them, they are not actively being used.

My apologies if I stated lots of information that you already knew - just trying to help.

----------

## linuxdork

there is nothing at all in /usr/src/

I don't know where to find the kernel now.

----------

## linuxdork

in /boot i have kernel-genkernel-x86-2.6.15-gentoo-r5

is that what i need to link to?

----------

## mars-red

What you see in /boot is actually your compiled kernel (the binary), not the source.  I'm not sure how something like this would happen, but it sounds like you just need to re emerge the kernel source.  I'm guessing you're using gentoo-sources?  If so, then

```
emerge =gentoo-sources-2.6.15-r5
```

and then check the contents of /usr/src again.

----------

## linuxdork

can i change to a i686 kernel at this point?

----------

## linuxdork

bingo

thanks man,  do i have to recompile after the madwifi emerge?

----------

## linuxdork

now i get

Makefile.inc:124: *** KERNELCONF: /usr/src/linux/.config does not exist..  Stop.

on the madwifi emerge, but the linux link is there.

----------

## mars-red

Ah, yes - the .config is your kernel config file.  You'll either have to reconfigure it yourself (can be intimidating if you've never done it before), or use an existing kernel config that hopefully resides in /boot on your system.  Look for something in /boot that begins with config- (in your case, it will probably be config-genkernel-x86-2.6.15-gentoo-r5) and that will be the config file for the actual built kernel you are using.  If you have it, then copy it to /usr/src/linux/.config (the file itself gets renamed to .config - .config is not a directory).

If you have to redo the kernel configuration then you'll have to do a kernel rebuild as well, and you may end up running into other hurdles (it's a good learning experience though).

You will not have to build the kernel after compiling madwifi - although you may have to re-compile madwifi if you recompile the kernel with different options.

----------

## linuxdork

it's not there.  I think it's cuz I used the live cd installer and the kernel source from the disk.  I'll have to compile it.  A little intimidating but I've done it in a command line install before.

How would I go about doing it with a system already in place?

----------

## mars-red

It's not that bad.  Go into your /usr/src/linux directory, and 

```
make menuconfig
```

You will be in the menu-driven kernel config app, which is pretty slick to use.  You'll need to be pretty familiar with your system in order to know what to enable/disable, etc.  Once you go through the config 10 or 20 times, you'll feel like an old pro.    :Wink: 

Once you're done, save the config and exit.  Then

```
make
```

When that finishes successfully,

```
make modules_install
```

to install any modules that were built.

When that's done, you'll need to install your built kernel.  If you are using grub, then it's easy - you can just copy the compiled kernel ( probably /usr/src/linux/arch/i386/boot/bzImage ) into /boot with whatever filename you choose to give to it.  Issuing the "make install" command from /usr/src/linux may copy it to /boot for you - I've never tried it.  I always just manually copy it.  If you're going to call it the same thing as your current kernel, make a backup copy of the other one before overwriting it - in case you have to go back to it for some reason.  It's also good practice to copy /usr/src/linux/.config into /boot (called something useful, as I mentioned above) so that you'll have it in case something happens to the real /usr/src/linux/.config  Again, if using grub you'll also have to alter the grub configuration file to point to the new kernel *if* you've called it something different than your current kernel.

If you're using lilo, then you have to be careful because I hear you can't just copy that new kernel yourself or it can mess up the boot loader.  If you're using lilo then you'll have to find some info on doing that if you don't already know how.  I use grub, so I won't be much of a help in that area.

I'm sure you could find some tutorials somewhere on this site for doing kernel configuration and builds.  The build is easy - it's really just the configuration that takes a lot of learning and patience.

----------

## linuxdork

thanx man.

here it goes.  I wanted to do this origionally for the live cd but it didn't workout.  so i just left everything default to get the install over.  So this is a good thing.  I appreciated your help.  I post back how it goes.

----------

## linuxdork

what's the benefit of compiling the dev. in the kernel as apposed to as a module?

----------

## linuxdork

What does this mean

make modules_install..........

make[1]: warning:  Clock skew detected.  Your build may be incomplete.

if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map  2.6.15-gentoo-r5; fi

make[1]: warning:  Clock skew detected.  Your build may be incomplete.

Should I procede to copy to boot for grub and reboot or review and recompile?

----------

## linuxdork

ok, madwifi-driver is emerging and everything else seems fine, but when it booted the bootsplash came up fine and then the boot message and then it all faded out to a blank screen.  then it booted to gnome and i have a gui but no tty consoles whatsoever.  just a blank screen.  please don't tell me i have to recompile now?

----------

## mars-red

Sorry it took me so long to respond back, but I've been doing pretty much the same thing you are - I just compiled and installed 2.6.15-r7 kernel.

It sounds like you have gdm (gnome display manager) set to autostart, so you're logging in directly to the display manager, without having to go through the consoles.  You can switch from your display manager back to the tty consoles by holding down Ctl, Alt, and a number (1 through 6).  To get back to your gnome desktop, use Ctl, Alt, and 7.  If you want, you can stop the display manager from starting automatically - let me know if you need a hand doing that.

Is your system clock and time zone set correctly?  Those clock skew messages are not good.

----------

## linuxdork

sorry, i know about ctl, alt , f1, but when i switch to it there is just a blank screen.  i watched the hd light flashing during the boot sequence but there was only output for less than a second after the bootsplash and then blank and it remains that way.  Yet i have gnome and emerged madwifi from gnome terminal.  does that make anymore sense.  I'm so confused.  I don't know how you can have a gui with no command line.  I've never seen it before.

----------

## linuxdork

oh and you're right the time is incorrect.

i have wifi access now.

----------

## mars-red

To answer your other question, compiling as modules versus built-into the kernel...  I generally only compile stuff into the kernel that's fairly low-level (ie, performance-critical) and then all other stuff (such as device drivers for network cards, etc) I compile as modules.  Think of in-kernel as additions to the "overhead" - the less crap you have in there, the more efficiently the kernel will operate.

----------

## linuxdork

i did enable extra fonts for the console in the kernel.  I think that is what is causing it.  It shows really huge fonts and then flashes to black screen and then to smaller fonts for a fraction of a second and then goes blank again until gnome comes up.

----------

## mars-red

Oh, do you mean the console framebuffer stuff?  Or are you talking about something else?

----------

## linuxdork

something with console font sizes like 8x18 or something

i also did backlit lcd.

i couldn't get to gnome after rebooting again so i'm on the live cd with the disk mounted and i'm doing the compile again.  i disabled the backlit lcd one.  i hope this works

----------

## linuxdork

it works!!!!

that's great!  so how do i get the console fonts on tty0 and so forth to be smaller?   their huge!

----------

## mars-red

If you enable console framebuffer support, then you can set whichever graphic mode you like for the consoles.  The fonts are always the same pixel size (as far as I know), but the higher the graphic mode you run, the smaller the fonts look on the screen.  I have my console set to run in 1280x1024.

There are some tutorials for getting that working, but as I recall there is a framebuffer support option somewhere in the kernel config that you need to set and then there are some kernel options you have to specify in your bootloader configuration.  My kernel options, for the vesa framebuffer running in 1280x1024, are:

```
video=vesafb:ywrap,mtrr,1280x1024-16@60
```

----------

## linuxdork

thanks man.  You've really helped out a lot.  Hope I wasn't too much trouble.

----------

## mars-red

Hey, no problem!  This is what it's all about.  A lot of people in these (and other) forums have helped me out with my problems, so I'm always more than happy to give back to the community whenever I have the chance.

----------

