Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo using a patched kernel (newbie)
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message

Joined: 09 Apr 2013
Posts: 1

PostPosted: Tue Apr 09, 2013 9:02 pm    Post subject: Installing Gentoo using a patched kernel (newbie) Reply with quote


I'm having the same trouble described in the following thread on a SR870BH2 ia64 server:

I'm a newbie linux user but more or less I can understand what its done there:

- Patching the kernel source code.
- Recompiling it and installing the distrbution using the patched kernel.

What I did in my case is:

- Downloading the entire kernel source from
- Added those lines into the "setup-res.c"... and now what I should do?

I have a little idea about the steps i need to follow but I'm not actually sure...

- I should use the gentoo kernel sources (that file in particular should be the same, I guess) configure them using the generic kernel config, cross compiling it using another linux machine and after that what is the next step?

Any help or comments will be highly apreciated :)

Thank you
Back to top
View user's profile Send private message

Joined: 01 Jul 2004
Posts: 7414
Location: almost Mile High in the USA

PostPosted: Tue Apr 09, 2013 11:57 pm    Post subject: Reply with quote

Though it may be relevant or not, what kernel version are you using?

I have not tried applying that patch to a newer kernel, so unsure if it will still work. Then again I heard there was a kosher way that should be incorporated into the kernel sometime soon, whether or not it has been remains to be seen...

Supposedly if the kernel you're using does not have this code, you will need to simply add those lines into setup-res.c if the kernel that you're using still has that exact same code. I was using 3.3.8 but the latest kernel/gentoo-sources has well passed that.

The snippet I put there is actually a diff. You can use patch to patch the code in, cd into your kernel source root directory and if setup-res hasn't changed much you should be able to just patch -p1 < the_patchfile_that_contains_the_diff. Then rebuild the kernel just like any other architecture and install the kernel image. For ia64 it's slightly different but nevertheless very similar to all other architectures differing just by bootloader. Here is Gentoo's guide on kernel builds: I've noticed that the makefile for ia64 at some point (at least 3.3.8) is broken and you can't use make -j to build the kernel. Which is a pity because I have a dual proc machine. You can cross-compile this too if you so desire, I built my initial kernel on my x86 machine while waiting for the box arrives, but it compiles it on its own just fine (and do note that a Core-i7 will compile it much faster than the poor old McK/Mad and maybe even Mont* that could be in the box.)

Very possibly the new kernel changed and the patch no longer will apply cleanly. Then that means the patch is obsolete and either they fixed it already, or I'll need to come up with a new patch... If this is the case that a new patch is needed, you can either: downgrade to 3.3.8 which the patch was designed for, I can give you my 3.3.8 kernel + modules, wait until the real patch shows up in mainline, or wait for me to get frustrated and hack up a patch for the newer kernels...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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