LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel Patching (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-patching-4175484228/)

injijagwalaafq 11-11-2013 12:28 PM

Kernel Patching
 
I'm still working on the folding CD project. I am hoping that patching the 2.6.33 kernel may fix some of the issues I am having.

Ok so the patches dir in the project contains a bunch of .patch files. The Makefile which applies said patches also refers to them as such. kernel.org, distributes patches as .bz2 etc.

My question is: What decompression method to I need to yield the needed .patch file?

Thanks!

Ser Olmy 11-11-2013 12:43 PM

.bz2 files are compressed with bzip, You uncompress with bunzip, or use the "j" parameter if it's a tar.bz2 archive.

injijagwalaafq 11-11-2013 12:46 PM

I did that but the resulting decompressed file has no extension. Yes I could arbitrarily add the .patch but knowing my luck that would screw something up.

Ser Olmy 11-11-2013 12:51 PM

Are you saying you have a number of files named something.patch.bz2, but when you run bunzip to decompress them, both extensions disappear? That sounds very odd.

injijagwalaafq 11-11-2013 01:25 PM

The files in the patches directory are .patch files.As the link shows. bunzip leaves a file like patch-3.12, no extension.

Ser Olmy 11-11-2013 02:02 PM

I thought you said the extension was .bz2.

Files that end with the .patch extension are text files. No decompression is necessary. You feed them to the patch application while you're in the base source directory, typically using the "-p1" parameter:
Code:

cd /directory/with/source/code
patch -p1 < /directory/with/patch/application-patch-file.patch



All times are GMT -5. The time now is 06:45 AM.