# No makefile

## mreff555

I recently tried to recompile my nvidia drivers and was told that there was no makefile found in my kernel source. 

I just recently compiled that kernel so there should have been one.

I tried "make menuconfig" within the directory and once again was told that there was no makefile found. 

I tried downloading the latest gentoo sources and still had the same problem.

I don't know a whole lot about make files, but this seems to be a systemic problem. Any idea what it could be?

----------

## mir3x

Nvidia gentoo package requires kernel config in /usr/src/linux 

Add symlink from your kernel tree to that dir.

And add flag +symlink to gentoo-sources  to do it automatically next time.

( it doesnt compile drivers for current kernel, but for kernel found in /usr/src/linux

so after making kernel just emerge nvidia-drivers, then reboot to test new kernel )

----------

## Roman_Gruber

You may find this useful.

http://wiki.gentoo.org/wiki/NVidia/nvidia-drivers

----------

## mreff555

I'm aware that Nvidia-drivers need kernel sources. They are there, but this is something peculuar that I just noticed.

```

dan@mojo /usr/src/linux $ uname -r

3.15.6-gentoo

dan@mojo /usr/src/linux $ eselect kernel list 

Available kernel symlink targets:

  [1]   linux-3.12.12-gentoo

  [2]   linux-3.14.14-gentoo

  [3]   linux-3.15.8-hardened

dan@mojo /usr/src/linux $ cd ..

dan@mojo /usr/src $ ls

linux  linux-3.12.10-gentoo  linux-3.12.12-gentoo  linux-3.13.7-gentoo  linux-3.14.14-gentoo  linux-3.14.2-gentoo  linux-3.15.6-gentoo  linux-3.15.8-hardened

dan@mojo /usr/src $ ^C

dan@mojo /usr/src $ 

```

I've never seen the source for eselect, so I don't exactly know how it worked. However I thought it just assumed that every directory in /usr/src was a kernel.

when I manually try to link the /usr/src/linux directory it doesn't work either.

```

dan@mojo /usr/src $ sudo rm linux

Password: 

dan@mojo /usr/src $ sudo eselect kernel list

Available kernel symlink targets:

  [1]   linux-3.12.12-gentoo

  [2]   linux-3.14.14-gentoo

  [3]   linux-3.15.8-hardened

dan@mojo /usr/src $ sudo ln -s /usr/src/linux-3.15.6-gentoo ./linux

dan@mojo /usr/src $ cd linux

dan@mojo /usr/src/linux $ ls -a

.   .config      .missing-syscalls.d  .tmp_kallsyms1.o  .tmp_versions  .tmp_vmlinux2  .vmlinux.cmd    System.map  block   drivers   fs       init  kernel  mm               modules.order  scripts   sound  vmlinux

..  .config.old  .tmp_System.map      .tmp_kallsyms2.o  .tmp_vmlinux1  .version       Module.symvers  arch        crypto  firmware  include  ipc   lib     modules.builtin  net            security  usr    vmlinux.o

dan@mojo /usr/src/linux $ make menuconfig

make: *** No rule to make target `menuconfig'.  Stop.

dan@mojo /usr/src/linux $ 

```

any idea what is going on?

----------

## The Doctor

 *Quote:*   

> I've never seen the source for eselect, so I don't exactly know how it worked. However I thought it just assumed that every directory in /usr/src was a kernel.

 No, eselect only lists the complete kernels that include sources. It looks like you cleaned your old sources with depclean so they are no longer available. depclean leaves the old directories since they contain user modified files, so this is normal behavior.

The solution to your problem is fairly simple: either update to 3.15.8 or reemerge the sources for the kernel you are using now. Ether way you should get a consistent set of sources.

----------

## Roman_Gruber

You are right juding on his posts he really deleted the kernel tree before asking this post o.o

----------

## mreff555

 *tw04l124 wrote:*   

> You are right juding on his posts he really deleted the kernel tree before asking this post o.o

 

???

Anyway, thanks for all the help everyone. The Doctor was correct. It must have been dispatch-conf. I need to stop using the --autounmask-write flag. I don't quite understand the mechanism behind dispatch-conf but it is very annoying as it seems to undo all of my configurations if I'm not paying attention. It must have pulled that kernel out of my package.use file.

----------

