How to properly compile a kernel?

kenneth karlsen kkarls2 at broadpark.no
Tue Jan 15 17:12:19 UTC 2008


Josef Wolf wrote:
> On Mon, Jan 14, 2008 at 10:12:11PM +0100, Josef Wolf wrote:
>   
>> On Mon, Jan 14, 2008 at 07:43:30PM +0100, kenneth karlsen wrote:
>>
>>     
>>>> This works so far, but it generates
>>>> linux-image-2.6.22.9-mykernel_myrev_i386 while the original kernel
>>>>         
>>                       ^^
>>     
>>>> was linux-image-2.6.22-14-generic_2.6.22-14.46_i386.  Notice the
>>>>         
>>                                             ^^^
>>     
>>>> differences in the version numbers?  Why is apt-get retrieving the
>>>> wrong version of the sources?  How do I get exactly the version which
>>>> was installed by apt?
>>>>         
>>>  From man make-kpkg:   make-kpkg [options] [target [target ...]]
>>> not target options.
>>>       
>> Well, http://channel.debian.de/faq/ch-dpkgundco.html#s-makekpkg shows it
>> this way around.  I've tried both and the results are the same.
>>
>>     
>>> Skip also make prepare, I have never used it.
>>>       
>> Can this be the reason for the wrong version information?
>>     
>
> I've just recompiled everything from scratch with targets moved to the
> end of the make-kpkg command line and without "make prepare". Gives the
> same result: wrong version.
>
> So, how do I get the source that was used to build the kernel that was
> installed by ubuntu gutsy?
>
>
>   
I am not sure, I have always used tree from kernel.org.
You could try and see if you get problems with version number. You 
should also check if you need to use --added-patches foo and add patches.
Good luck, Kenneth




More information about the ubuntu-users mailing list