You are not logged in.

#1 2010-06-23 17:32:00

splippity
Member
Registered: 2010-05-25
Posts: 144

kernel 2.6.34 patch available for my alsa can we patch kernel?

heres my bug: https://bugzilla.kernel.org/show_bug.cgi?id=16272

they listed a patch that will fix the problem but how do I apply it?? can we just push out a kernel revision to fix it???

I never rebuilt a kernel myself so dont know what Im supposed to do.

thanks

Offline

#2 2010-06-23 18:13:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: kernel 2.6.34 patch available for my alsa can we patch kernel?

Offline

#3 2010-06-23 21:43:38

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: kernel 2.6.34 patch available for my alsa can we patch kernel?

It will probably take you several days and a few tries to get it right. I've spent the most part of yesterday trying to (and finally succeeding at) build(ing) a custom kernel 2.6.34, and that wasn't the first time...

You should read the article about "abs" on the wiki, and then Kernel_Customization_with_kernel26_Package. That is the most up to date article about custom kernel compilation on the wiki that I know of.

I'll try to explain how to do it, as far as I remember it.

First install all you need (base-devel, abs, subversion, gcc... See the abs article.)

sudo abs
mkdir -p ~/builds/abs
cp /var/abs/core/kernel26 ~/builds/abs/
cd ~/builds/abs/kernel26

Edit the PKGBUILD as explained in the wiki article, but instead of uncommenting "make menuconfig", replace « yes "" | make config » with « yes "" | make localmodconfig ». I haven't done explactly that actually, but it might work...

Also in the build() function, locate the line that applies the ARCH patchset, and add your patch just after that (you'll have to read patch's man page and struggle to get the directories right.) Or as a simpler alternative, add these two lines:

msg "now patch sound"
read

This will pause makepkg just after applying the ARCH patchset and you'll be able to manually patch your file in another terminal, then hit return to continue.

A last modification is needed in your new package_kernel26-slippity() function (assuming you've named your custom kernel package « kernel26-slippity »): replace « _kernver="$(make kernelrelease)" » with « _kernver="${_basekernel}${_kernelname}" ».
This is needed so that your modules go to a different directory than the official « /lib/modules/2.6.34-ARCH/ ».

Oh also comment the « makedepends=('xmlto' 'docbook-xsl') » line because you're not going to need them to build the kernel. (Do _not_ build 'kernel26-headers' 'kernel26-manpages' 'kernel26-docs', that's useless and the docs especially take a huge time.)

Then you should be set... Run "makepkg", patch your file when it tells you to, and wait... Once it's done, "pacman -U kernel26-slippity*" and then edit /boot/grub/menu.lst to add your new kernel to the list.

... Not the perfect howto but I hope it's helpful. I guess I should update the wiki entry, but I wonder if the fix needed for the modules directory is a regression in the PKGBUILD, or just an error in the wiki entry...

Edit: typos and stuff. Not fixing "explactly" because I like it smile.

Last edited by stqn (2010-06-23 21:55:56)

Offline

#4 2010-06-23 22:06:11

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: kernel 2.6.34 patch available for my alsa can we patch kernel?

No offense to stqn, but I would strongly recommend that you read the wiki articles he linked to, particularly the second one, rather than following the instructions above.

stqn - fyi I build a custom kernel package for every upstream kernel release, and I've never had to change the '_kernver="$(make kernelrelease)"' line.

Offline

#5 2010-06-23 22:36:32

droog
Member
Registered: 2004-11-18
Posts: 877

Re: kernel 2.6.34 patch available for my alsa can we patch kernel?

If you don't want to build your own kernel for a temporary problem, an easier solution would be to use oss instead of alsa until the upstream fix makes it way to arch.
I'm using oss4 and newest arch kernel here with no issues.

Offline

#6 2010-06-23 22:51:12

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: kernel 2.6.34 patch available for my alsa can we patch kernel?

tomk wrote:

stqn - fyi I build a custom kernel package for every upstream kernel release, and I've never had to change the '_kernver="$(make kernelrelease)"' line.

Well, I had to yesterday... But maybe that's the result of spending a full day experimenting to get this thing to work...

As for the instructions... As far as I'm concerned, I always felt a lack of instructions regarding the actual patching or configuring of the kernel in all the wiki articles I've read. If the wiki article is enough, then great! But it wasn't for me (well half the work was actually finding this article in the first place.) "make localmodconfig" is the best thing I found in order to get a working kernel that doesn't take 4 hours to build (like 2.6.33 took here.) I actually need to edit .config afterwards in my particular case because the cpufreq options are wrong, but that's just me.

Offline

Board footer

Powered by FluxBB