[ale] compiling kernel with version modifier

Todor Fassl fassl.tod at gmail.com
Thu Mar 3 09:26:33 EST 2016


I am compiling a kernel now after having run "make menuconfig" and 
changing the local version. For the archives, I'll post a message with 
the results after it's done. I've already made some progress though. I 
got the string to show up in "uname -a". I edited the line in 
debian.master/changelog and added +spk to the version number. When I 
installed that kernel, it said it was installing over the current stock 
ubuntu kernel (which is good). "uname -r" was unchanged. However, "uname 
-a" did show that I was using my own kernel:

$ uname -a
Linux vv507k 4.2.0-30-generic #36+spk SMP Wed Mar 2 16:18:22 CST 2016

x86_64 x86_64 x86_64 GNU/Linux

I am thinking that if I follow your advice, I'l end up with a kernel 
where "uname -r" yields "4.2.0-30-generic-spk" which would be perfect.
Thanks to you and the others who replied for your help.



On 03/03/2016 07:18 AM, Ed Cashin wrote:
> For an "upstream" kernel from kernel.org (which is where Ubuntu ultimately
> is getting the kernels), there is a README in the sources that says,
>
>     Alternatively, before compiling, use the kernel config option
>     "LOCALVERSION" to append a unique suffix to the regular kernel version.
>     LOCALVERSION can be set in the "General Setup" menu.
>
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/README#n287
>
> ... and if you do a "make menuconfig", for example, and type in a value for
> the LOCALVERSION, then it does show up in the output of "uname -r".  If you
> are want, you can even just edit the EXTRAVERSION value in the Makefile,
> adding your suffix there.
>
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Makefile
>
> I don't know how Ubuntu is building their kernel debs, but maybe now you
> can look and see.  If they take that value and use it as the LOCALVERSION,
> then you've got your answer.
>
>
>
> On Wed, Mar 2, 2016 at 5:12 PM, Todor Fassl <fassl.tod at gmail.com> wrote:
>
>> I need to compile my own kernel with a patch for hardware speech. One
>> thing I do not understand about building a kernel is how to get it to have
>> a unique name so I can tell if a machine is using the custom kernel or the
>> original one. The ubuntu documentation says this:
>>
>>> In order to make your kernel "newer" than the stock Ubuntu kernel
>>> from which you are based you should add a local version modifier. Add
>>> something like "+test1" to the end of the first version number in the
>>> debian.master/changelog file, before building.
>> The first line of debian.master/changelog looks like this:
>>> linux (4.2.0-30.36) wily; urgency=high
>>
>> I am guessing the instructions mean to make that say something like this:
>>> linux (4.2.0-30.36+test1) wily; urgency=high
>>
>> First of all, is that right? Second, is it possible for me to make it so
>> if you say "uname -r", instead of displaying 4.3.0-30-generic, it shows
>> 4.3.0-30-speakup? I think that would be the most clear way to show that
>> this is not a generic ubuntu kernel.
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>
>
>
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>

-- 
Todd


More information about the Ale mailing list