Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing a 'custom' kernel
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
bLUEbYTE84
Guru
Guru


Joined: 21 Jul 2006
Posts: 566
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

PostPosted: Wed Aug 02, 2006 10:46 pm    Post subject: Installing a 'custom' kernel Reply with quote

Hi,
The general impression I got from my limited Gentoo experience, is that portage is (and should be, for consistency of the system) the one and only boss :) Of course we may compile & install from other downloaded tarballs and such, but this is not a good practice. However, sometimes we may want to install a custom, or patched version of some software. And the custom 'software' that I want to install is a kernel 8O

It is a 2.6.16 kernel with custom patches. Now here is the important part; As I understand, the initial installation of the kernel must not be made from a custom tarball, instead it must be 'emerged', because portage will think that there is no kernel installed, right?

But if I emerge a kernel, then it will not be the one I wanted.
There seems to be a possible way around this:
Do an ordinary emerge vanilla-sources, then delete every file in /usr/src/linux, and then place there the files from the custom tarball, then build it.

Would that work? Would it result in some potential inconsistencies? Do you have a better idea?

Edit: Of course applying the custom patches after the download and unpacking of the kernel is a better idea :) But emerge does not give me 2.6.16 vanilla sources, instead it gives the latest 2.6.17. Or maybe I just don't know if/how I can emerge a custom version of an ebuild :oops:
Back to top
View user's profile Send private message
exklusve
Apprentice
Apprentice


Joined: 23 Aug 2002
Posts: 270
Location: currently ~/

PostPosted: Wed Aug 02, 2006 10:53 pm    Post subject: Reply with quote

You dont need to emerge a kernel to have things work right. I've never emerged a kernel for any Gentoo box that i've built.

download the kernel source in which you want to use (www.kernel.org); extract it in /usr/src/; delete the link /usr/src/linux and make it point to your downloaded, kernel source; patch the source; config and compile your kernel; copy it over, etc etc.

thats all you need to do.

I think when doing an emerge -up world it will download kernel sources, but that wont hurt anything.


good luck
_________________
eXklusve

You do know that no one gives a shit about your system spec's right?


Last edited by exklusve on Wed Aug 02, 2006 11:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
bLUEbYTE84
Guru
Guru


Joined: 21 Jul 2006
Posts: 566
Location: universe.tar.gz, src/earth.h, struct homo_sapiens_table

PostPosted: Wed Aug 02, 2006 10:56 pm    Post subject: Reply with quote

exklusve, that is good then, no need to worry.
But I guess the approach I mentioned in the Edit: part is a little better, since it would not result a re-emerging of a kernel source when I do emerge -up world. Am I right? Thanks!

Edit: Of course it would only work with the desired version from emerge :) So I'll do it as you said.
Back to top
View user's profile Send private message
sfragis
Tux's lil' helper
Tux's lil' helper


Joined: 24 Mar 2005
Posts: 95
Location: RE < IT < Europe

PostPosted: Thu Aug 03, 2006 10:49 am    Post subject: Re: Installing a 'custom' kernel Reply with quote

Quote:
Do an ordinary emerge vanilla-sources, then delete every file in /usr/src/linux, and then place there the files from the custom tarball, then build it.

Would that work? Would it result in some potential inconsistencies? Do you have a better idea?

No need of deleting files under /usr/src/linux. As it's a symolic link, you can simply recreate the link and make it points to another source directory. Don't even emerge vanilla-sources if you don't need them.

Quote:

Edit: Of course applying the custom patches after the download and unpacking of the kernel is a better idea :) But emerge does not give me 2.6.16 vanilla sources, instead it gives the latest 2.6.17. Or maybe I just don't know if/how I can emerge a custom version of an ebuild :oops:

Emerge lets you install any older kernel versions.
Code:

% eix vanilla-sources
* sys-kernel/vanilla-sources
     Available versions:  !2.0.40-r1 !2.2.26-r1 !2.4.21 !2.4.30 !2.4.31 !2.4.32 2.6.15.1 2.6.16.14 2.6.16.16 2.6.16.19 2.6.16.20 2.6.16.26 2.6.17.6 2.6.17.7 2.6.18_rc1 2.6.18_rc2 2.6.18_rc3
     Installed:           none
     Homepage:            http://www.kernel.org
     Description:         Full sources for the Linux kernel

Suppose you want to install the 2.6.16 kernel, run as root:
Code:

$ emerge -av =sys-kernel/vanilla-sources-2.6.16.26

If you install the tarball from kernel.org be sure to keep a valid /usr/src/linux link 'cause this is often used by emerge.
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