Bug 1375

Summary: Kernel 2.6.37 include/generated/utsrelease.h not sync with .config
Product: [Yocto Project Subprojects] Kernel Reporter: Tomasz Gorol <gavian>
Component: kernel-configurationAssignee: Bruce Ashfield <bruce.ashfield>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Medium CC: dvhart, meta.mr.watcher, meta.watcher, sgw, yp.kernel.watcher, yp.watcher
Version: unspecified   
Target Milestone: 1.2 M4   
Hardware: JasperForest   
OS: x86_64   
Whiteboard: (P3) Bruce to find an owner
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Tomasz Gorol 2011-08-17 06:23:05 UTC
In the kernel 2.6.37 the .config file isn't synced with include/generated/utsrelease.h. It causes that modules compiled against this kernel will have kernel magic number mismatch.

content of the 'include/generated/utsrelease.h' file:
UTS_RELEASE "2.6.37.6-yocto-standard+"

content of the '.config' file:
CONFIG_LOCALVERSION="-yocto-standard"

Workaround:

After compilation run
'make CC=${KERNEL_CC} LD=${KERNEL_LD} prepare' in the tmp/sysrootfs/<arch>/kernel directory
Comment 1 Bruce Ashfield 2011-08-17 06:56:04 UTC
.. and what's the new utsrelease.h file after you run this ?

'make CC=${KERNEL_CC} LD=${KERNEL_LD} prepare' in the
tmp/sysrootfs/<arch>/kernel directory

I'm building and loading modules constantly, as are our QA tests without mismatch. What you list below, looks like the proper behaviour to me. So I must be missing something.
Comment 2 Tomasz Gorol 2011-08-17 07:12:11 UTC
It corrects the utsrelease.h file.

The content of the utsrelease.h file after `make prepare` is:
#UTS_RELEASE "2.6.37.6-yocto-standard" (the plus sign is gone).


(In reply to comment #1)
> .. and what's the new utsrelease.h file after you run this ?
> 
> 'make CC=${KERNEL_CC} LD=${KERNEL_LD} prepare' in the
> tmp/sysrootfs/<arch>/kernel directory
> 
> I'm building and loading modules constantly, as are our QA tests without
> mismatch. What you list below, looks like the proper behaviour to me. So I must
> be missing something.
Comment 3 Bruce Ashfield 2011-08-17 07:13:42 UTC
There's something else wrong then. Do you have local changes to your 
kernel source tree ?
Comment 4 Tomasz Gorol 2011-08-25 03:52:21 UTC
I have made bitbake to create a krenel package from the beginning. Fetch, patch, etc. and still have the same file mismatch.

content of kernel-abiversion:
2.6.37.6-yocto-standard+

content of utsrelease.h 
#define UTS_RELEASE "2.6.37.6-yocto-standard+"

content of .config
CONFIG_LOCALVERSION="-yocto-standard"

I don't know where is this plus sign coming from ??

(In reply to comment #3)
> There's something else wrong then. Do you have local changes to your 
> kernel source tree ?
Comment 5 Darren Hart 2011-08-25 08:11:41 UTC
The plus sign is added to a kernel built from git sources that have been modified if I recall correctly.
Comment 6 Bruce Ashfield 2011-08-25 08:15:20 UTC
correct. it usually signifies a dirty tree, that's why I was asking about local changes.

Are there any patches applied by recipes in this case ?
Comment 7 Bruce Ashfield 2011-08-25 11:22:45 UTC
I'm seeing something different here, looking into what could be the delta.
Comment 8 Darren Hart 2011-10-06 15:29:17 UTC
Bruce, can you elaborate on Comment 7? Are you seeing a problem here?
Comment 9 Bruce Ashfield 2011-10-07 21:03:42 UTC
I saw a tweaked utsrelease file, meaning it didn't quite match recipe space. But I've never seen any build or runtime issues. 

I'm still working on this, but release items have taken priority for now.
Comment 10 Bruce Ashfield 2012-03-08 20:55:35 UTC
I'll look at this during M4
Comment 11 Bruce Ashfield 2012-03-26 20:31:55 UTC
FYI: this is nearly fixed in master. I'll close the bug when the final part of the
fix goes in.

  [OE-core] [PATCH] kernel.bbclass: touch .scmversion also in ${S}

Fixes this problem.
Comment 12 Bruce Ashfield 2012-03-27 13:28:20 UTC
commit cafb94f571236603999b406dffef88306ed48cb3 in master solves this issue.