* Practical way to rename kernel-release on custom kernel
@ 2014-07-10 15:28 Safarin
2014-07-10 15:56 ` AYAN KUMAR HALDER
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Safarin @ 2014-07-10 15:28 UTC (permalink / raw)
To: kernelnewbies
Hi Guys,
This question might be very easy for all of you. But seem this is
kernelnewbies mailing list. I need to ask this question.
I in the middle of learning to build custom kernel and my question is
how to have custom name for kernel version.
$ uname -r
I can see custom kernel print message.
>From what I read, we can change inside .config
CONFIG_LOCALVERSION="-ARCH"
will produce the kernel release naming something like this.
3.16.0-rc3-ARCH
But somehow, when I try to install the modules
$make modules_install
I can see makefile create folder inside the lib/modules with naming
3.16.0-rc3-ARCH-00570-g110e430
110e430 is actually commit id and I check that naming is generated by
#define UTS_RELEASE "3.16.0-rc3-ARCH-00570-g110e430" in the
"include/generated/utsrelease.h" header which will
overwrite "include/config/kernel.release".
Back to the question, what is the practical way to naming the kernel
release for custom kernel? with additional question for understanding
more from where that utsrelease came from?
Thanks,
Regards,
Safarin
^ permalink raw reply [flat|nested] 6+ messages in thread* Practical way to rename kernel-release on custom kernel 2014-07-10 15:28 Practical way to rename kernel-release on custom kernel Safarin @ 2014-07-10 15:56 ` AYAN KUMAR HALDER 2014-07-11 0:47 ` shhuiw 2014-07-11 3:03 ` Anil Shashikumar Belur 2 siblings, 0 replies; 6+ messages in thread From: AYAN KUMAR HALDER @ 2014-07-10 15:56 UTC (permalink / raw) To: kernelnewbies > > Back to the question, what is the practical way to naming the kernel > release for custom kernel? with additional question for understanding > more from where that utsrelease came from? > > Thanks, > > Regards, > Safarin > You can issue the command "make all KERNELRELEASE=your-custom-kernel-name" Regards, Ayan Kumar Halder ^ permalink raw reply [flat|nested] 6+ messages in thread
* Practical way to rename kernel-release on custom kernel 2014-07-10 15:28 Practical way to rename kernel-release on custom kernel Safarin 2014-07-10 15:56 ` AYAN KUMAR HALDER @ 2014-07-11 0:47 ` shhuiw 2014-07-11 7:24 ` shhuiw 2014-07-11 3:03 ` Anil Shashikumar Belur 2 siblings, 1 reply; 6+ messages in thread From: shhuiw @ 2014-07-11 0:47 UTC (permalink / raw) To: kernelnewbies In Documentation/kbuild/makefiles.txt, you can see: ... 1365 VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION 1366 1367 These variables define the current kernel version. A few arch 1368 Makefiles actually use these values directly; they should use 1369 $(KERNELRELEASE) instead. 1370 1371 $(VERSION), $(PATCHLEVEL), and $(SUBLEVEL) define the basic 1372 three-part version number, such as "2", "4", and "0". These three 1373 values are always numeric. 1374 1375 $(EXTRAVERSION) defines an even tinier sublevel for pre-patches 1376 or additional patches. It is usually some non-numeric string 1377 such as "-pre4", and is often blank. 1378 1379 KERNELRELEASE 1380 1381 $(KERNELRELEASE) is a single string such as "2.4.0-pre4", suitable 1382 for constructing installation directory names or showing in 1383 version strings. Some arch Makefiles use it for this purpose. 1384 1385 ARCH 1386 1387 This variable defines the target architecture, such as "i386", 1388 "arm", or "sparc". Some kbuild Makefiles test $(ARCH) to 1389 determine which files to compile. 1390 1391 By default, the top Makefile sets $(ARCH) to be the same as the 1392 host system architecture. For a cross build, a user may 1393 override the value of $(ARCH) on the command line: 1394 1395 make ARCH=m68k .. ... -- Regards, shhuiw At 2014-07-10 11:28:39, "Safarin" <safarin87@gmail.com> wrote: >Hi Guys, > >This question might be very easy for all of you. But seem this is >kernelnewbies mailing list. I need to ask this question. > >I in the middle of learning to build custom kernel and my question is >how to have custom name for kernel version. > >$ uname -r > >I can see custom kernel print message. > >>From what I read, we can change inside .config >CONFIG_LOCALVERSION="-ARCH" >will produce the kernel release naming something like this. >3.16.0-rc3-ARCH > >But somehow, when I try to install the modules > >$make modules_install > >I can see makefile create folder inside the lib/modules with naming >3.16.0-rc3-ARCH-00570-g110e430 > >110e430 is actually commit id and I check that naming is generated by >#define UTS_RELEASE "3.16.0-rc3-ARCH-00570-g110e430" in the >"include/generated/utsrelease.h" header which will >overwrite "include/config/kernel.release". > >Back to the question, what is the practical way to naming the kernel >release for custom kernel? with additional question for understanding >more from where that utsrelease came from? > >Thanks, > >Regards, >Safarin > >_______________________________________________ >Kernelnewbies mailing list >Kernelnewbies at kernelnewbies.org >http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140711/b34c3522/attachment.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Practical way to rename kernel-release on custom kernel 2014-07-11 0:47 ` shhuiw @ 2014-07-11 7:24 ` shhuiw 2014-07-11 18:08 ` Safarin 0 siblings, 1 reply; 6+ messages in thread From: shhuiw @ 2014-07-11 7:24 UTC (permalink / raw) To: kernelnewbies Tried but found change KERNELRELEASE can only affect uname output. If you want to make version change, should modify top-level Makefile: 1 VERSION = 3 2 PATCHLEVEL = 13 3 SUBLEVEL = 5 4 EXTRAVERSION = 5 NAME = One Giant Leap for Frogkind -- Regards, shhuiw At 2014-07-11 08:47:07, "shhuiw" <shhuiw@163.com> wrote: In Documentation/kbuild/makefiles.txt, you can see: ... 1365 VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION 1366 1367 These variables define the current kernel version. A few arch 1368 Makefiles actually use these values directly; they should use 1369 $(KERNELRELEASE) instead. 1370 1371 $(VERSION), $(PATCHLEVEL), and $(SUBLEVEL) define the basic 1372 three-part version number, such as "2", "4", and "0". These three 1373 values are always numeric. 1374 1375 $(EXTRAVERSION) defines an even tinier sublevel for pre-patches 1376 or additional patches. It is usually some non-numeric string 1377 such as "-pre4", and is often blank. 1378 1379 KERNELRELEASE 1380 1381 $(KERNELRELEASE) is a single string such as "2.4.0-pre4", suitable 1382 for constructing installation directory names or showing in 1383 version strings. Some arch Makefiles use it for this purpose. 1384 1385 ARCH 1386 1387 This variable defines the target architecture, such as "i386", 1388 "arm", or "sparc". Some kbuild Makefiles test $(ARCH) to 1389 determine which files to compile. 1390 1391 By default, the top Makefile sets $(ARCH) to be the same as the 1392 host system architecture. For a cross build, a user may 1393 override the value of $(ARCH) on the command line: 1394 1395 make ARCH=m68k .. ... -- Regards, shhuiw At 2014-07-10 11:28:39, "Safarin" <safarin87@gmail.com> wrote: >Hi Guys, > >This question might be very easy for all of you. But seem this is >kernelnewbies mailing list. I need to ask this question. > >I in the middle of learning to build custom kernel and my question is >how to have custom name for kernel version. > >$ uname -r > >I can see custom kernel print message. > >>From what I read, we can change inside .config >CONFIG_LOCALVERSION="-ARCH" >will produce the kernel release naming something like this. >3.16.0-rc3-ARCH > >But somehow, when I try to install the modules > >$make modules_install > >I can see makefile create folder inside the lib/modules with naming >3.16.0-rc3-ARCH-00570-g110e430 > >110e430 is actually commit id and I check that naming is generated by >#define UTS_RELEASE "3.16.0-rc3-ARCH-00570-g110e430" in the >"include/generated/utsrelease.h" header which will >overwrite "include/config/kernel.release". > >Back to the question, what is the practical way to naming the kernel >release for custom kernel? with additional question for understanding >more from where that utsrelease came from? > >Thanks, > >Regards, >Safarin > >_______________________________________________ >Kernelnewbies mailing list >Kernelnewbies at kernelnewbies.org >http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140711/cb31da2a/attachment-0001.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Practical way to rename kernel-release on custom kernel 2014-07-11 7:24 ` shhuiw @ 2014-07-11 18:08 ` Safarin 0 siblings, 0 replies; 6+ messages in thread From: Safarin @ 2014-07-11 18:08 UTC (permalink / raw) To: kernelnewbies Hi Guys, Thanks for the reply. I have tried all you guys suggested. Like shhuiw said that KERNELRELEASE only affect uname output so I use method to change the naming by change inside the top level makefile. Eventhough, I have make a change the output still not like I want. I still see long output for that naming $VERSION.$PATCHLEVEL.$SUBLEVEL-$EXTRAVERSION--ARCH-00570-g110e430-dirty which it come from git commit id. $ git describe v3.16-rc2-570-g110e430 **(not sure why got dirty at the end of the line) But I already figure it out how to disable that long naming. By disable inside .config under "CONFIG_LOCALVERSION_AUTO" Thanks again. Regards, Safarin > On Fri, Jul 11, 2014 at 03:24:18PM +0800, shhuiw wrote: > Tried but found change KERNELRELEASE can only affect uname output. > If you want to make version change, should modify top-level Makefile: > > 1 VERSION = 3 > 2 PATCHLEVEL = 13 > 3 SUBLEVEL = 5 > 4 EXTRAVERSION = > 5 NAME = One Giant Leap for Frogkind > > > > > -- > > Regards, > shhuiw > > > At 2014-07-11 08:47:07, "shhuiw" <shhuiw@163.com> wrote: > > In Documentation/kbuild/makefiles.txt, you can see: > > > ... > 1365 VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION > 1366 > 1367 These variables define the current kernel version. A few arch > 1368 Makefiles actually use these values directly; they should use > 1369 $(KERNELRELEASE) instead. > 1370 > 1371 $(VERSION), $(PATCHLEVEL), and $(SUBLEVEL) define the basic > 1372 three-part version number, such as "2", "4", and "0". These three > 1373 values are always numeric. > 1374 > 1375 $(EXTRAVERSION) defines an even tinier sublevel for pre-patches > 1376 or additional patches. It is usually some non-numeric string > 1377 such as "-pre4", and is often blank. > 1378 > 1379 KERNELRELEASE > 1380 > 1381 $(KERNELRELEASE) is a single string such as "2.4.0-pre4", suitable > 1382 for constructing installation directory names or showing in > 1383 version strings. Some arch Makefiles use it for this purpose. > 1384 > 1385 ARCH > 1386 > 1387 This variable defines the target architecture, such as "i386", > 1388 "arm", or "sparc". Some kbuild Makefiles test $(ARCH) to > 1389 determine which files to compile. > 1390 > 1391 By default, the top Makefile sets $(ARCH) to be the same as the > 1392 host system architecture. For a cross build, a user may > 1393 override the value of $(ARCH) on the command line: > 1394 > 1395 make ARCH=m68k .. > ... > > > -- > > Regards, > shhuiw > > > > > At 2014-07-10 11:28:39, "Safarin" <safarin87@gmail.com> wrote: > >Hi Guys, > > > >This question might be very easy for all of you. But seem this is > >kernelnewbies mailing list. I need to ask this question. > > > >I in the middle of learning to build custom kernel and my question is > >how to have custom name for kernel version. > > > >$ uname -r > > > >I can see custom kernel print message. > > > >>From what I read, we can change inside .config > >CONFIG_LOCALVERSION="-ARCH" > >will produce the kernel release naming something like this. > >3.16.0-rc3-ARCH > > > >But somehow, when I try to install the modules > > > >$make modules_install > > > >I can see makefile create folder inside the lib/modules with naming > >3.16.0-rc3-ARCH-00570-g110e430 > > > >110e430 is actually commit id and I check that naming is generated by > >#define UTS_RELEASE "3.16.0-rc3-ARCH-00570-g110e430" in the > >"include/generated/utsrelease.h" header which will > >overwrite "include/config/kernel.release". > > > >Back to the question, what is the practical way to naming the kernel > >release for custom kernel? with additional question for understanding > >more from where that utsrelease came from? > > > >Thanks, > > > >Regards, > >Safarin > > > >_______________________________________________ > >Kernelnewbies mailing list > >Kernelnewbies at kernelnewbies.org > >http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ^ permalink raw reply [flat|nested] 6+ messages in thread
* Practical way to rename kernel-release on custom kernel 2014-07-10 15:28 Practical way to rename kernel-release on custom kernel Safarin 2014-07-10 15:56 ` AYAN KUMAR HALDER 2014-07-11 0:47 ` shhuiw @ 2014-07-11 3:03 ` Anil Shashikumar Belur 2 siblings, 0 replies; 6+ messages in thread From: Anil Shashikumar Belur @ 2014-07-11 3:03 UTC (permalink / raw) To: kernelnewbies On Thursday 10 July 2014 08:58 PM, Safarin wrote: > > I can see makefile create folder inside the lib/modules with naming > 3.16.0-rc3-ARCH-00570-g110e430 This is the commit id which is the being appended at the end, as you may have some patch ( or uncommited changes to your makefile). Check the output of `git describe` and try doing a `git commit -a -v` if that helps. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-11 18:08 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-10 15:28 Practical way to rename kernel-release on custom kernel Safarin 2014-07-10 15:56 ` AYAN KUMAR HALDER 2014-07-11 0:47 ` shhuiw 2014-07-11 7:24 ` shhuiw 2014-07-11 18:08 ` Safarin 2014-07-11 3:03 ` Anil Shashikumar Belur
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).