Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel-sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
the brave
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 131

PostPosted: Fri Sep 17, 2004 3:37 pm    Post subject: kernel-sources Reply with quote

I'm trying to get nvidia drivers installed, but it seems that my system doesn't have a kernel-source installed.
my kernel version is:
Code:
poseidon root # uname -a
Linux poseidon 2.6.5-gentoo-r1 #1 SMP Sun Sep 12 01:13:09 UTC 2004 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux

I followed the directions in this https://forums.gentoo.org/viewtopic.php?t=204656 How To, but when I emerge the packages "nvidia-kernel nvidia-glx opengl-update", when nvidia-kernel is being installed the system complains saying:
Code:
 *** Unable to determine the target kernel version. ***
make: *** [select_makefile] Error 1
!!! ERROR: media-video/nvidia-kernel-1.0.6111 failed.
!!! Function src_compile, Line 89, Exitcode 2
!!! Failed to build module

What's going on here? Is the problem related to the kernel-source, or is there anything else which I 'm missing?
Thanks for the help.
_________________
william
Back to top
View user's profile Send private message
DaMouse
Apprentice
Apprentice


Joined: 18 Jul 2003
Posts: 233

PostPosted: Fri Sep 17, 2004 3:43 pm    Post subject: Reply with quote

yap you require a kernel sources to build against.. i advise emerging ck-sources and using that as a base (need bzImage from it..) or you could emerge the gentoo-dev-sources again if you wish to continue with that :)

-DaMouse
_________________
I am the dark lord DaMouse I eat souls and wear the dressing gown of evil.
Back to top
View user's profile Send private message
the brave
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 131

PostPosted: Fri Sep 17, 2004 5:24 pm    Post subject: Reply with quote

DaMouse:
I installed the latest dev kernel version (2.6.8-gentoo), but when trying to load the system with the new kernel it got stuck and gave me some error messages saying that module.dep or whatever was not found.
See below the steps I followed in order to get it installed (took from another thread):
Code:

1) emerge -u gentoo-dev-sources
2) check if the link /usr/src/linux is pointing to the new kernel (kernel-2.6.8-gentoo-r3)
3) cp /usr/src/linux-2.6.5-gentoo-r1/.config /usr/src/linux (at this moment no .config file was found, so that it was not copied to /usr/src/linux)
4) cd /usr/src/linux
5) make oldconfig (many questions were raised asking me if I'd like to install the new things available in the new kernel, I said Yes to all of them)
6) make && make modules_install
7) cp System.map /boot (with my boot partition mounted)
8) cp arch/i386/boot/bzImage /boot/kernel-2.6.8-gentoo-r3
9) edited my /boot/grub/grub.conf file

My grub.conf looks like:
Code:
default 0
timeout 30
splashimage=(hd0,1)/grub/splash.xpm.gz
title=Gentoo 2.6.5-r1
root (hd0,1)
kernel /kernel-2.6.5-gentoo-r1 root=/dev/hda4 vga=788

title=Gentoo 2.6.8-r3
root (hd0,1)
kernel /kernel-2.6.8-gentoo-r3 root=/dev/hda4 vga=788


title=Windoze XP
rootnoverify (hd0,0)
chainloader +1


Not sure if the error messages I got could be associated to my grub file, I haven't run grub > root (hd0,1) > setup (hd0) commands, just editied the grub.conf file. Was this procedure correct?
Any suggestions or hints will be welcome.
Thanks.
PS: I unmerged the new kernel and of course I'm still supposed to reinstall it. Not sure if the bunch of yes (during step 5) was the cause for the problem. There were some question which the answers were obvious but for most of them it was not and I prefered to say y than n. :lol:
_________________
william
Back to top
View user's profile Send private message
DaMouse
Apprentice
Apprentice


Joined: 18 Jul 2003
Posts: 233

PostPosted: Fri Sep 17, 2004 5:50 pm    Post subject: Reply with quote

mmm, you sure you did modules_install? also, try running depmod -a or re-emerging module-init-tools

-DaMouse
_________________
I am the dark lord DaMouse I eat souls and wear the dressing gown of evil.
Back to top
View user's profile Send private message
rush_ad
l33t
l33t


Joined: 22 Jul 2004
Posts: 863
Location: New Jersey, USA

PostPosted: Sat Sep 18, 2004 3:53 pm    Post subject: Reply with quote

get a new kernel. try 2.6.8
Back to top
View user's profile Send private message
oumpah-pah
Guru
Guru


Joined: 18 Jul 2004
Posts: 575
Location: Lausanne, Switzerland

PostPosted: Sat Sep 18, 2004 5:18 pm    Post subject: Reply with quote

I think you shouldn't use
Code:
make oldconfig

as you did at point 5). You said you had no .config file to start with, and since make oldconfig is intended to only promt for changes between your old and new kernel, it prompted for everything. Try using
Code:
make menuconfig

instead, reading carefuly help about options you do not understand. The rest of the procedure seems correct, and your grub.conf file too (just check that you have a menu.lst link pointing to it).
Back to top
View user's profile Send private message
the brave
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 131

PostPosted: Sun Sep 19, 2004 4:16 pm    Post subject: Reply with quote

Up till now I was not able to figure out what's going on here with 2.6.8-r3. Actually, I cannot understand one point: I've already have gento-dev -sources (kernel-2.6.5-gentoo-r1) installed when installing gentoo.
I've just jumped to gentoo after 1 year using Mandrake. With mandrake I used to have the kernel and kernel-sources installed so that the nvidia driver could be installed (both versions of kernel and kernel source had to match each other otherwise the nvidia installation wouldn't be succesful)

My question is, if I have a kernel (gentoo-dev-sources) version 2.6.5, why do I have to upgrade to 2.6.8 to get nvidia installed here. Why I'm receiving this message during nvidia emerging process?
Code:
If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the appropriate nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1

!!! ERROR: media-video/nvidia-kernel-1.0.6111 failed.
!!! Function src_compile, Line 89, Exitcode 2
!!! Failed to build module

I'm sorry for my stupid question, but where to find the sources so that it can match my kernel version?
Thanks.
_________________
william
Back to top
View user's profile Send private message
oumpah-pah
Guru
Guru


Joined: 18 Jul 2004
Posts: 575
Location: Lausanne, Switzerland

PostPosted: Sun Sep 19, 2004 9:43 pm    Post subject: Reply with quote

If you use a 2.6.5 kernel, it's just fine. You only have to make sure that the /usr/src/linux symlink points to the sources corresponding to your kernel. Also, I think you should have the .config file corresponding to the kernel you're using in that directory.
Back to top
View user's profile Send private message
the brave
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 131

PostPosted: Sun Sep 19, 2004 10:12 pm    Post subject: Reply with quote

oumpah-pah wrote:
Also, I think you should have the .config file corresponding to the kernel you're using in that directory.

I have no .config file neither in /usr/src/linux symlink nor /usr/src/linux-2.6.5-gentoo-r3. :?: despite of having compiled the kernel using make menuconfig command, saving the changes I made and of course running make && make modules_install.

PS: and /usr/src/linux is also pointing to the correct kernel
_________________
william
Back to top
View user's profile Send private message
MrApples
Guru
Guru


Joined: 13 Dec 2002
Posts: 511

PostPosted: Sun Sep 19, 2004 10:21 pm    Post subject: Reply with quote

im not sure how that could be, unless its pointing to a different config file for some reason, try make menuconfig, then "Save to an Alternate File" and save it as something else, then copy it to .config
_________________
http://www.whatsinyourbox.org -- Technology discussion, news, and more.
Back to top
View user's profile Send private message
the brave
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 131

PostPosted: Mon Sep 20, 2004 1:09 am    Post subject: Reply with quote

Actually I had forgotten to cp .config /boot/config-2.6.5-gentoo-r1. Now it's done, but still getting the same error while emerging nvidia:
Code:
poseidon / # emerge nvidia-kernel nvidia-glx opengl-update
Calculating dependencies ...done!
>>> emerge (1 of 3) media-video/nvidia-kernel-1.0.6111 to /
x86
>>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-6111-pkg1.run
x86
x86
>>> Unpacking source...
 * /usr/src/linux is a symbolic link
 * Determining the real directory of the Linux kernel source code
 * Building for Linux 2.6.5-gentoo-r1 found in /usr/src/linux
 * which outputs to /usr/src/linux
 * By not using the kernel's ability to output to an alternative
 * directory, some external module builds may fail.
 * See <insert link to user doc here>
Creating directory NVIDIA-Linux-x86-1.0-6111-pkg1
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-6111..........................................................................................................................................................................................................
 * Applying power-suspend-2.6.9-changes.patch...                          [ ok ] * Applying nv_enable_pci.patch...                                        [ ok ]>>> Source unpacked.
x86
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the appropriate nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1

!!! ERROR: media-video/nvidia-kernel-1.0.6111 failed.
!!! Function src_compile, Line 89, Exitcode 2
!!! Failed to build module


Before receiving the above output, I got an error message saying to run mrproper inside /usr/src/linux-2.6.5-gentoo-r1. It was done, but still no success.
Any suggestion.
_________________
william
Back to top
View user's profile Send private message
oumpah-pah
Guru
Guru


Joined: 18 Jul 2004
Posts: 575
Location: Lausanne, Switzerland

PostPosted: Mon Sep 20, 2004 6:40 am    Post subject: Reply with quote

You should be aware that
Code:
make mrproper

deletes your .config file too. So you have to copy it back in /usr/src/linux.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum