cancel
Showing results for 
Search instead for 
Did you mean: 

kernel information

I_M
Honored Contributor

kernel information

Hi

When I see the first line of dmesg in RedHat's kernel, it looks like
Linux version 2.4.18-10custom (root@localhost) (gcc version 2.96 20000731 (Red Hat Li
nux 7.3 2.96-110)) #1 Wed Sep 4 19:30:56 JST 2002

But if I use the source from kernel.org shows diffrent output.

If I want to change " (Red Hat Linux 7.3 2.96-110))" part, which file should I modify in kernel source?

Thanks in Advance.


6 REPLIES
Chakravarthi
Trusted Contributor

Re: kernel information

/etc/release
/usr/src/linux/include/linux/version.h
I_M
Honored Contributor

Re: kernel information

Thanks for the reply.

I found # gcc -v output looks like what I am looking for.

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)

Does any one know this output is hard-coded in the kernel when kernel compile, or use current gcc -v output?

Thanks in advance.

Chakravarthi
Trusted Contributor

Re: kernel information

gcc -v
Stuart Browne
Honored Contributor

Re: kernel information

recompile GCC.

GCC, the Kernel, and a number of other 'major' projects remember the machine, time, and arch they were built upon.

Is a pain in the ass, but there's not much else you can do.

I've never seen anybody alter this after compilation.

By the same token, I haven't really gone looking :P
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: kernel information

*blink* oh dear..

and on the 3rd reading of the post, I understand what it was asking.

*hides*

See what a long weekend, and a day of the boards being down does to a person?

Sorry.. just ignore these posts :)
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: kernel information

Side note:

include/linux/compile.h:

#define LINUX_COMPILER

is your string.

Created using:

@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver

in the kernel's core Makefile.

Haven't tried it, but you might be able to get away with modifying the header file.

The full string is in:

init/version.c

defined as:

const char *linux_banner

... bkx ...
One long-haired git at your service...