/usr/src/linux/Makefile missing [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

/usr/src/linux/Makefile missing [Solved]

Postby Audiossis » Tue Feb 09, 2010 5:49

Hi all,

I'm new to Sabayon, having just begun migrating my laptop from Gentoo. :D

Firstly, I had trouble installing the synaptics driver. The installation borked, telling me that no usable .config file was found in the kernel sources directory. Which, my Gentoo experience told me, was because the kernel sources weren't configured correctly. Under Gentoo I would fix this simply by doing
Code: Select all
make oldconfig && make prepare
or by re-compiling the kernel.

So, I set about trying to compile a "Standard" Sabayon kernel, as per the instructions here: http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Upgrade_kernel_using_genkernel

I have since fixed the synaptics install problem by manually copying the kernel config file to the sources directory with:
Code: Select all
zcat /proc/config.gz > /usr/src/linux/.config


But I still can't get genkernel to compile a kernel. It complains that the Makefile is missing from the kernel sources directory!

Shortened output...
Code: Select all
grep: /usr/src/linux/Makefile: No such file or diretory
grep: /Makefile: No such directory
ERROR: Failed to compile the "mrproper" target...


I am quite familiar with compiling kernels on Gentoo and other distros, so this is leaving me quite confused. I have made sure that the appropriate sources are set with eselect and that the symlink /usr/src/linux points to the correct directory. I have tried with sabayon-sources and linux-sabayon-sources installed (both individually and together) but to no avail!

Could somebody please tell me what I'm missing? I'm sure it's something quite simple that I have overlooked. I've tried searching the forums but the only references I could find are in Italian (which stupid ignorant white boys like me can't read :D)

BTW - all software so far has been installed with equo. I haven't tried using emerge in this box yet!

Thanks,
Last edited by Audiossis on Tue Feb 09, 2010 13:17, edited 1 time in total.
Audiossis
Baby Hen
 
Posts: 7
Joined: Tue Feb 09, 2010 5:17

Re: /usr/src/linux/Makefile missing

Postby Audiossis » Tue Feb 09, 2010 6:58

OK, after re-reading the "How_To" another three times I realized that using equo to merge the kernel sources was incorrect. What a newbie mistake that was! :oops:

I have re-merged linux-sabayon-sources with:
Code: Select all
emerge -va =linux-sabayon-sources-2.6.31


Unfortunately though, it hasn't made any difference. Genkernel still complains about the missing makefile.


Should I perhaps be merging gentoo-sources instead? Despite what the "How_To" says?
Audiossis
Baby Hen
 
Posts: 7
Joined: Tue Feb 09, 2010 5:17

Re: /usr/src/linux/Makefile missing

Postby micia » Tue Feb 09, 2010 9:47

Hi,
what is the output of:
Code: Select all
eselect kernel list

?
micia
Sagely Hen
 
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: /usr/src/linux/Makefile missing

Postby Audiossis » Tue Feb 09, 2010 12:00

The output is:

Code: Select all
Available kernel symlink targets:
[1]    linux-2.6.31-sabayon *


and I know that the correct symlink is is place and is linked to /usr/src/linux-2.6.31-sabayon

Surprisingly compiling the "traditional" way actually works!
Code: Select all
cd /usr/src/linux
make menuconfig
make


I didn't do the "make install" because I didn't want it to kill my current kernel, but "make" completes successfully, indicating that the kernel source IS usable!
Audiossis
Baby Hen
 
Posts: 7
Joined: Tue Feb 09, 2010 5:17

Re: /usr/src/linux/Makefile missing

Postby micia » Tue Feb 09, 2010 12:22

that is quite strange... genkernel never let me down like that...
Is your genkernel version the latest one?

Maybe if you post the full output from genkernel there will be some more clues...
(or maybe someone more competent than I am could help you better :mrgreen: )
micia
Sagely Hen
 
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: /usr/src/linux/Makefile missing

Postby Audiossis » Tue Feb 09, 2010 12:58

It's difficult to post the entire output here as I'm using the desktop to make posts on the forum. I'm having the problem on the laptop where I haven't finished configuring the network devices.....

I agree that it is quite strange as genkernel has never let me down either (at least not on Gentoo). I've always found genkernel to be the easiest and most convenient way to compile a new kernel...... which is why I'd really like to to the bottom of this. I don't relish the idea of having to do it manually..... I find it quite tedious........

I'm using genkernel-3.4.10.906-r1.

This is a fresh install of Sabayon on a clevo laptop from the Sabayon_Linux_CoreCD_5.1_x86.iso cd install media.
Audiossis
Baby Hen
 
Posts: 7
Joined: Tue Feb 09, 2010 5:17

Re: /usr/src/linux/Makefile missing

Postby Audiossis » Tue Feb 09, 2010 13:12

That's very strange!

I just tested it again after doing a manual build and genekrnel is now working!

Doing
Code: Select all
ls /usr/src/linux | grep Makefile


Also shows that the makefile is now present in the kernel source directory!

Very strange indeed! :?

I'm not sure how to mark the thread as solved, but if I can figure it out I will.

Thanks for the suggestions!
Audiossis
Baby Hen
 
Posts: 7
Joined: Tue Feb 09, 2010 5:17

Re: /usr/src/linux/Makefile missing [Solved]

Postby sabayonino » Tue Feb 09, 2010 13:51

Hi

yuo can install sys-kernel/linux-sabayon-sources and genkernel

Code: Select all
 equo install genkernel linux-sabayon-sources


now you can compile current kernel source using genkernel

Code: Select all
genkernel --menuconfig all
User avatar
sabayonino
Sagely Hen
 
Posts: 2679
Joined: Sun Sep 21, 2008 1:12
Location: Italy


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 2 guests

cron