I'm very new to Linux and very new to building/compiling my own kernel. For starters, I'm just trying to figure out how to change the version string of my kernel. For instance, when I do uname -a, it prints out "Linux localhost.localdomain 3.11.10-100.fc18.i686". I'd like to customize that, but I'm not sure what file to edit. I know it must be some file in my kernel directory, but I've been going through them with no luck. Any help would be great!
我是Linux的新手,也是构建/编译自己的内核的新手。对于初学者,我只想弄清楚如何更改内核的版本字符串。例如,当我执行uname -a时,它会输出“Linux localhost.localdomain 3.11.10-100.fc18.i686”。我想自定义它,但我不确定要编辑的文件。我知道它必须是我的内核目录中的一些文件,但我一直在经历它们没有运气。任何帮助都会很棒!
1 个解决方案
#1
12
At the top of the top-level Makefile, there are four lines
在*Makefile的顶部,有四行
VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 7
EXTRAVERSION =
The values are different for different kernel versions, of course. These are used to construct the version string, so changing them before building the kernel changes the version string of the kernel you build.
当然,对于不同的内核版本,值是不同的。这些用于构造版本字符串,因此在构建内核之前更改它们会更改您构建的内核的版本字符串。
Additionally, there's a configuration option CONFIG_LOCALVERSION
, to be found under General Setup -> Local version - append to kernel release
in make menuconfig
that is appended to this.
此外,还有一个配置选项CONFIG_LOCALVERSION,可在常规设置 - >本地版本下找到 - 附加到make menuconfig中附加到此的内核版本。
#1
12
At the top of the top-level Makefile, there are four lines
在*Makefile的顶部,有四行
VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 7
EXTRAVERSION =
The values are different for different kernel versions, of course. These are used to construct the version string, so changing them before building the kernel changes the version string of the kernel you build.
当然,对于不同的内核版本,值是不同的。这些用于构造版本字符串,因此在构建内核之前更改它们会更改您构建的内核的版本字符串。
Additionally, there's a configuration option CONFIG_LOCALVERSION
, to be found under General Setup -> Local version - append to kernel release
in make menuconfig
that is appended to this.
此外,还有一个配置选项CONFIG_LOCALVERSION,可在常规设置 - >本地版本下找到 - 附加到make menuconfig中附加到此的内核版本。