2013-09-26 13:12:59

by Meelis Roos

[permalink] [raw]
Subject: include/linux/version.h not updated (Was: SILO always tells it loaded kernel version 3.6.0)

Background: SILO bootloader on sparc64 tells it is loading 3.6.0 when
actually it is 3.12.0-rc2.

> On U10:
>
> ok boot
> Boot device: scsidisk File and args:
> SILO Version 1.4.14
> boot: test
> Allocated 64 Megs of memory at 0x40000000 for kernel
> Uncompressing image...
> Loaded kernel version 3.6.0
>
> PROMLIB: Sun IEEE Boot Prom 'OBP 3.31.0 2001/07/25 20:36'
> PROMLIB: Root node compatible:
> Initializing cgroup subsys cpu
> Linux version 3.11.0-dirty (mroos@u10) (gcc version 4.6.4 (Debian 4.6.4-4) ) #47 Wed Sep 25 16:01:09 EEST 2013

SILO gets the version from struch HdrS in the image.

vmlinux contains HdrS^@^C^F^@, so ver_linux is 00 03 06 0 that is 3.6.0.
So it's in our image and silo is correct.

It seems to be LINUX_VERSION_CODE in head_64.S - maybe it is nor
recompiled? No, head_64.o is from yesterday.

grep -r for LINUX_VERSION_CODE results in different values:

./include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 199424
./include/linux/version.h:#define LINUX_VERSION_CODE 198144

-rw-r--r-- 1 mroos mroos 97 Sep 20 21:56 include/generated/uapi/linux/version.h
-rw-r--r-- 1 mroos mroos 97 Aug 10 2012 ./include/linux/version.h

As it happens, 198144 is the value from Aug 10 2012 and it happens to be
00030600 hex. Here is the culprit, we are not rebuilding
include/linux/version.h.

--
Meelis Roos ([email protected])


2013-09-26 17:18:27

by David Miller

[permalink] [raw]
Subject: Re: include/linux/version.h not updated

From: Meelis Roos <[email protected]>
Date: Thu, 26 Sep 2013 16:12:55 +0300 (EEST)

> As it happens, 198144 is the value from Aug 10 2012 and it happens to be
> 00030600 hex. Here is the culprit, we are not rebuilding
> include/linux/version.h.

That explains everything, thanks for tracking it down.

2013-09-26 17:26:35

by David Miller

[permalink] [raw]
Subject: Re: include/linux/version.h not updated

From: Meelis Roos <[email protected]>
Date: Thu, 26 Sep 2013 16:12:55 +0300 (EEST)

> -rw-r--r-- 1 mroos mroos 97 Sep 20 21:56 include/generated/uapi/linux/version.h
> -rw-r--r-- 1 mroos mroos 97 Aug 10 2012 ./include/linux/version.h

It's not the it doesn't get updated.

It's that the file in your GIT tree is unsync'd.

You need to "rm include/linux/version.h" and I bet that beforehand a
"git stat" will show "include/linux/version.h" as a spurious file.

Because of your situation, the second file is being included first,
overriding the right file, the first one.

2013-09-26 18:09:02

by Meelis Roos

[permalink] [raw]
Subject: Re: include/linux/version.h not updated

> > -rw-r--r-- 1 mroos mroos 97 Sep 20 21:56 include/generated/uapi/linux/version.h
> > -rw-r--r-- 1 mroos mroos 97 Aug 10 2012 ./include/linux/version.h
>
> It's not the it doesn't get updated.
>
> It's that the file in your GIT tree is unsync'd.
>
> You need to "rm include/linux/version.h" and I bet that beforehand a
> "git stat" will show "include/linux/version.h" as a spurious file.
>
> Because of your situation, the second file is being included first,
> overriding the right file, the first one.

Yes, you are absolutely correct. head_64.o was rebuild with correcxt
verion information.

A lot of machines will have this file removed :)

--
Meelis Roos ([email protected])