1

UTS_RELEASE is in include/generated/utsrelease.h

EXTRAVERSION is in makefile

For example my kernel has UTS_RELEASE "4.4.30-7+" and the EXTRAVERSION contains -7+

Both are affecting the result of uname -r when built.

What are the differences between the two? Would they conflict each other if only one is edited?

1 Answer 1

3

UTS_RELEASE includes EXTRAVERSION. If you change EXTRAVERSION, UTS_RELEASE will be updated to reflect that. If you change UTS_RELEASE in include/generated/utsrelease.h, the file is liable to be rewritten the next time you build the kernel, which would lose your change. So don't touch UTS_RELEASE, edit EXTRAVERSION if you have to.

The kernel supports a local version too, which is defined in the kernel configuration and is designed to be changed in local builds. It is appended to the kernel release. You should probably use that!

4
  • So, if I only edit UTS_RELEASE, say from4.4.30-7+ to 4.4.30-Custom+ and then build the kernel would uname -r result rolled back to 4.4.30-7+ ? Commented Jan 10, 2017 at 6:11
  • And I'm under the impression that EXTRAVERSION is the same as local version. Are they different? Commented Jan 10, 2017 at 6:13
  • 1
    Yes, you'd end up with "4.4.30-7+". EXTRAVERSION and the local version are different, and the kernel release contains both if they're defined. EXTRAVERSION isn't really user-modifiable (although it won't break if you do change it), it's intended for things like -rc1. You should really use the local version for your custom suffix. Commented Jan 10, 2017 at 6:31
  • Thanks. Your comment actually answered my other question too. :) Commented Jan 10, 2017 at 6:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .