Kernel compilation

Jef Driesen jefdriesen at hotmail.com
Thu Mar 25 11:12:31 UTC 2010


On 24/03/2010 16:29, Amedee Van Gasse (ub) wrote:
> On Wed, March 24, 2010 16:16, Jef Driesen wrote:
>> Hi,
>>
>> I have a couple of question about kernel compilation.
>
> I will answer only those questions that I know without googling for an
> answer. :)
>
>> How can I rebuild the kernel when ubuntu releases an updated version? I
>> patched 2.6.31-16, but there is already a 2.6.31-20 kernel available. I
>> can go through the entire procedure again, but that takes a lot of time
>> and disk space to do a full rebuild every time. Is there a way to update
>> my current build tree, so that only changed files have to be rebuild?
>
> Install ccache (compiler cache). This will speed up frequent
> recompilations. Only the source files that are changed will be recompiled.

I'm not sure ccache will help in my case, but since I have never used 
it, I could be wrong.

When I want to rebuild a kernel, I fetch the kernel source using the 
command:

apt-get source linux-image-XYZ

apply my patch and build the package. But when a new version is 
released, it comes as a new package. If I run the above command again, 
but for the new version:

apt-get source linux-image-ABC

I end up with a fresh tree and I need to recompile from scratch. But in 
practice most files are unchanged. So I think that what I need is a way 
to get the changes from the new package into my old tree, and then 
recompile.




More information about the ubuntu-users mailing list