LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Applying MANY patches to kernel source (http://www.linuxquestions.org/questions/linux-general-1/applying-many-patches-to-kernel-source-359618/)

declassified 09-02-2005 04:41 PM

Applying MANY patches to kernel source
 
I currently run Fedora Core 3 with the PlanetCCRMA 2.6 kernel. It runs nicely, except that my WLAN and my USB-MP3-player don't work.

I read that I have to compile certain modules into the kernel, so I need the kernel source of the kernel (which I had installed as a binary RPM).

I downloaded a SRPM of the kernel and extracted it using "rpm -i", and it extracted into "/usr/src/redhat/SOURCES". Problem is, it extracted a LOT of ".patch" and ".config" files and One .bz2 file (linux-2.6.13.tar.bz2) which appears to be the vanilla kernel source. I extracted the source and it created a new subdirectory, as you know.

However, I can't figure out how to apply all these patches! Is there any specific way of doing it? Because some of the patches are made for other 2.6 kernels.
And: Is there a specific order in which I should apply the patches?

Is there any kind of script that could do the work for me?

Thanks a lot in advance!

mlomker 09-02-2005 07:58 PM

Re: Applying MANY patches to kernel source
 
Hmm. I was under the impression that you can only apply one patch to a kernel. I'm curious why you have more than one to apply? I run Ubuntu but I didn't bother with their patch--I just applied the CZ patch, instead, and it works fine.

cs-cam 09-02-2005 09:19 PM

I'd look on the Redhat site for docs or something. Sometimes there is an order, like if two patches want to modify the same piece of code, but that's probably not too common. I'd just give it a go applying them all in random order and see if you have any luck. You could always put all the patch files in a subdir and write a script to loop through the files and apply them to the source tree one-by-one...

Quote:

Hmm. I was under the impression that you can only apply one patch to a kernel. I'm curious why you have more than one to apply? I run Ubuntu but I didn't bother with their patch--I just applied the CZ patch, instead, and it works fine.
Not at all true. A patch or diff simply modifies the a file based on specifications that come in the patch. If you have 100 patches that all modify different files then they will all apply cleanly and everything might work, depending on how linking goes. kernel patchsets such as -ck, -cko, -love, -gentoo are generally a shitload of patches that someone has bundled together in one. The -cz patch probably is too but I couldn't find any info around to confirm that :)

mlomker 09-02-2005 10:51 PM

Quote:

Originally posted by cs-cam
The -cz patch probably is too but I couldn't find any info around to confirm that :)
That was a typo on my part. I used the ck patch.

foo_bar_foo 09-03-2005 12:00 AM

first try to make sure there are not just some modules you could load to get the things working
planet ccrma kernel is turbocharged but not stripped down so it should support those things
second just get the kernel-source package not the SRMP this has the proper files for adding modules
apt-cache search kernel
and make sure you have in /etc/apt/apt.conf
Allow-Duplicated {
"^kernel(-(BOOT|smp|bigmem|debug|doc|source.*)|)$";
"^gpg-pubkey$";
};


third if you build a new version go into the MAKEFILE and change VERSION= to something new
so you don't overwrite the modules for the one you have
that way you can play with it without damage.

i have built some kernels similar to that
when you apply the patch you have to do it with
patch -Np1 -i
for the ones that are the wrong version (low latency ?)
-N will let patch skip where it finds the patch has already been applied
it will also try to look around and fix where the lines arent exactly right
you will have to go through the patched code line by line where there are warnings and make sure everything is ok like where it skiped and possibly change some stuff using the patch file as a guide
not sure about patch order accept do the realtime security module last after making the bzimage and before you do the make modules
lookup the places the patches came from and get the original package if you need to for instructions (realtime security module is on sourceforge)
the configs are because the patches introduce some new config options some of which need other obscure options security module options or what new latency level to use and what other options need to support it.
be prepared for your new kernel not to work !

just as a side note the vanilla 2.6.13 with just the realtime security module and not the other patches will most likely work fine for you as well.

declassified 09-03-2005 12:45 AM

Thanks for your replies so far!

I somehow got the USB mp3 player to work, so there's only the WLAN remaining.

The actual driver of the WLAN adapter seems to be there, since I can insert it using "modprobe ipw2200". However, the redhat network utility sais that the device is not available. I googled and found out that I need the firmware. So I downloaded it and extracted the ".fw" files to the hotplug firmware folder (/lib/firmware/).

Problem is, the firmware_class module doesn't seem to be built into the kernel. I have the PlanetCCRMA 2.6.11 rdt kernel and I can't find the source for it anywhere. I only find "kernel-debuginfo-2.6.11-0.15.rdt.rhfc3.ccrma.i686.rpm" on the PlanetCCRMA servers, which is about 235MB. Is this the kernel source?

cs-cam 09-03-2005 01:56 AM

Quote:

Is this the kernel source?
I can't help you with much here but you can rest assured, that is not the kernel source ;)

mlomker 09-03-2005 07:00 AM

Quote:

Originally posted by declassified
The actual driver of the WLAN adapter seems to be there, since I can insert it using "modprobe ipw2200". However, the redhat network utility sais that the device is not available. I googled and found out that I need the firmware. So I downloaded it and extracted the ".fw" files to the hotplug firmware folder (/lib/firmware/).

I have the same adapter and recently went through the process. You get an error when you try to modprobe firmware_class? What is dmesg saying when you load the ipw2200 driver? Is it saying that it can't load the firmware?

When setting up my driver I discovered that my distro puts firmware in /lib/hotplug/firmware instead of /lib/firmware. It's easy to determine, though, because there will be other *.fw files in that directory already.


All times are GMT -5. The time now is 10:14 PM.