Which kernel sources? [Solved]

Discussions Regarding Software

Moderator: Moderators

Which kernel sources? [Solved]

Postby cyrwyn » Mon Oct 08, 2007 23:17

I need to compile a module for the 2.6.22-sabayon kernel installed from the x86_64 mini edition. I've synced portage. It shows several options in sys-kernel. Should I get the gentoo sources, hardened sources or....? Which versions? I've also noticed that the kernel headers installed are 2.6.19.2-r2. What? Notice the mismatch? What source matches the installed kernel? Do I need to do something else?
Last edited by cyrwyn on Mon Oct 15, 2007 16:35, edited 1 time in total.
cyrwyn
Young Hen
 
Posts: 31
Joined: Fri Apr 13, 2007 17:57
Location: NM

Re: Which kernel sources?

Postby wolfden » Mon Oct 08, 2007 23:25

Code: Select all
uname -r
<--tells you your current

you use sabayon sources

so emerge =sys-kernel/sabayon-sources-results from uname-r

so for me

sabayonuser@sabayonx86-64 ~ $ uname -r
2.6.22-sabayon
sabayonuser@sabayonx86-64 ~ $ eix sabayon-sources
[I] sys-kernel/sabayon-sources [1]
Available versions: (~)2.6.20_rc6 (~)2.6.20_rc7 (~)2.6.20 (~)2.6.20-r1 (~)2.6.20-r2 2.6.20-r3 (~)2.6.21_rc5 (~)2.6.21_rc6 (~)2.6.21 (~)2.6.21-r1 (~)2.6.21-r2 (~)2.6.22
Installed versions: 2.6.22(04:45:28 PM 10/06/2007)(-build symlink)
Homepage: http://dev.gentoo.org/~dsd/genpatches http://www.sabayonlinux.org
Description: Full sources including the Gentoo patchset and SabayonLinux ones for the . kernel tree

[1] /usr/portage/local/layman/sabayon

so in my case
emerge =sys-kernel/sabayon-sources-2.6.22
User avatar
wolfden
Sharecropper
 
Posts: 8822
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA

Re: Which kernel sources?

Postby cyrwyn » Tue Oct 09, 2007 17:06

Thanks, I'll try that. However, I still must wonder why the headers version don't match the kernel version. Or should I just check the box to install sources in Portato from the existing kernel and Remerge?

I've tried Remerging the kernel and checking the box in Portato to "Zip the sources and install them". Still, there are no kernel sources installed in /usr/src, no symlink. I need to compile a new rt61 module from serialmonkey to get my Ralink wireless working. It gives the error "Can't determine the kernel version" (uname -r). Of course it can't. There are no Kernel sources unless they're installed in a different place and not symlinked. How do I get the full 2.6.22-sabayon sources? sys-kernel shows sabayon-sources installed. Something seems screwy here.
cyrwyn
Young Hen
 
Posts: 31
Joined: Fri Apr 13, 2007 17:57
Location: NM

Re: Which kernel sources?

Postby wolfden » Wed Oct 10, 2007 5:16

User avatar
wolfden
Sharecropper
 
Posts: 8822
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA

Re: Which kernel sources?

Postby cyrwyn » Thu Oct 11, 2007 18:58

I tried your suggestion, but now I get: "No rule to make target 'prepare'. Stop." Is this supposed to install the kernel source in /usr/src/linux or just symlink it from another directory? What am I missing?
cyrwyn
Young Hen
 
Posts: 31
Joined: Fri Apr 13, 2007 17:57
Location: NM

Re: Which kernel sources? [SOLVED]

Postby cyrwyn » Mon Oct 15, 2007 16:41

The reason that "make prepare" didn't work was because the kernel sources weren't installed, although portage reports they are - perhaps just a stub. If you have the 3.4 mini edition, you must emerge sabayon-sources and then it can finish the setup for "prepare_modules". Look for kernel sources in /usr/src/linux. If nothing is installed there, then you don't have sources.
cyrwyn
Young Hen
 
Posts: 31
Joined: Fri Apr 13, 2007 17:57
Location: NM

Re: Which kernel sources? [Solved]

Postby wolfden » Mon Oct 15, 2007 17:25

every mini has been like that, you have to install the sources due to space
User avatar
wolfden
Sharecropper
 
Posts: 8822
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA


Return to Software in General

Who is online

Users browsing this forum: No registered users and 4 guests

cron