Reputation: 254
When the linux kernel booting up,it will print the kernel version and builder, and toolchain infomation. Just like below:
Booting Linux on physical CPU 0
Linux version 3.4.24 (whobuilderthis@cl-builder23)
So how to get the builder whobuilderthis
string (using shell)? Where does it store?
Thanks in advance.
Upvotes: 0
Views: 431
Reputation: 100
According to Documentation/kbuild/kbuild.rst:
These two variables allow to override the user@host string displayed during boot and in /proc/version. The default value is the output of the commands whoami and host, respectively.
So "/proc/version" will output the result of current running kernel. If you want to change the content, you need override the above 2 vars on your kernel build machine.
Upvotes: 0
Reputation: 3442
You could query /proc/version
which should contain the builder string.
shell@android:/ $ cat /proc/version
Linux version 3.0.31-g9f818de ([email protected]) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT Wed Nov 28 11:20:29 PST 2012
Upvotes: 2
Reputation: 363567
dmesg
gives the kernel log, so you should be able to grep
/sed
it from there:
dmesg | grep 'Linux version ' | sed 's/[^(]*(\([^)]*\)).*/\1/'
(There are smarter ways of doing this.)
Upvotes: 1