Bug 8595

Summary: Document how to change kernel version
Product: [Documentation] Mega Manual Reporter: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Component: mega-manualAssignee: Scott Rifenbark <srifenbark>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Medium+ CC: bluelightning, richard.purdie, srifenbark
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: 11 April 2016: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Bogdan Alexandru Voiculescu 2015-10-28 09:34:35 UTC
Recently I needed to override a variable: kernel version.
Founding in manual the indication for this was not an easy task. 

Intuitively PREFERRED_VERSION should be used: 
http://www.yoctoproject.org/docs/1.9/ref-manual/ref-manual.html#var-PREFERRED_VERSION

Still, if this variable is changed in local conf, new value will not override 
PREFERRED_VERSION_linux-yocto ?= "4.1% from poky/meta-yocto/distro/poky.conf 

(See https://bugzilla.yoctoproject.org/show_bug.cgi?id=4204)

On method is to use 'forcevariable' like: 
PREFERRED_VERSION_linux-yocto_forcevariable = "3.4%"
or 
use a machine override
PREFERRED_VERSION_linux-yocto_qemux86 = "3.4%" - we need to specify in which conf files using this variable will work or from command line.
Comment 1 Scott Rifenbark 2015-10-28 14:18:11 UTC
Setting target to 2.1 and state to ACCEPTED.
Comment 2 Scott Rifenbark 2016-04-01 17:11:37 UTC
Hi, 

See http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-PREFERRED_VERSION for an updated description of this variable.  I do not know what .conf files apply for forcing this.  If you could tell me then I can further update the description to include that information.

Thanks, 
Scott
Comment 3 Bogdan Alexandru Voiculescu 2016-04-04 06:35:14 UTC
Hi Scott,
I believe Richard knows best the design (See https://bugzilla.yoctoproject.org/show_bug.cgi?id=4204).
Comment 4 Richard Purdie 2016-04-04 19:54:22 UTC
I'd word this as:

"""
Sometimes the PREFERRED_VERSION can be set by configuration files in a way which is hard to change. You can use OVERRIDES to help with this, e.g. a machine specific override as follows:

     PREFERRED_VERSION_linux-yocto_qemux86 = "3.4%"

Although not recommended, worst case, you can also use "forcevariable" override, the strongest override there is as follows:

     PREFERRED_VERSION_linux-yocto_forcevariable = "3.4%"
"""
Comment 5 Scott Rifenbark 2016-04-04 20:35:09 UTC
Hi, 

I have implemented Richard's feedback.  I will leave the bug at IN PROGRESS REVIEW for a while and then if there is no further feedback will close it. 

Scott

http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-PREFERRED_VERSION
Comment 6 Bogdan Alexandru Voiculescu 2016-04-05 07:30:33 UTC
Hi Scott,
It is still unclear in which this should be set: in poky.conf or in local.conf? 
My initial problem was: 
"If this variable is changed in local conf, new value will not override 
PREFERRED_VERSION_linux-yocto ?= "4.1% from poky/meta-yocto/distro/poky.conf"

Should we specify in manual that setting "PREFERRED_VERSION_linux-yocto ?= "4.1%" in local.conf will NOT overwrite the poky.conf value? Or this is a bug?
Comment 7 Richard Purdie 2016-04-05 08:45:37 UTC
We need to keep the manual a little bit generic, not specific. You could have a conflict with PREFERRED_VERSION in any two config files and you could want this setting in site.conf or auto.conf or local.conf or a distro config or a machine config. We therefore can't be entirely specific as it could vary for other kernels or change location in future :/.
Comment 8 Paul Eggleton 2016-04-05 08:50:15 UTC
I think it's not unreasonable to have a documented way to accomplish this task though, with pointers as to how to debug it for people with custom setups where the instructions don't have the desired effect. You could view this as part of us offering more task-oriented documentation rather than reference.
Comment 9 Scott Rifenbark 2016-04-05 23:12:33 UTC
This sounds like a good candidate for a "cookbook" topic on "How to Change the Kernel Version."  

Maybe we should open a new doc bug requesting a procedure be documented for this task.  We could close this bug as it was against the variable description.  

Thoughts?
Comment 10 Bogdan Alexandru Voiculescu 2016-04-06 05:48:22 UTC
Scott, I vote for the cookbook.
Comment 11 Scott Rifenbark 2016-04-12 18:31:05 UTC
Closing this bug for the variable description.  I am opening a new bug to capture a "cookbook" item to address the concerns in Comment 8. See Bug 9451 for the new bug requesting a procedure be documented. 

Scott
Comment 12 Bogdan Alexandru Voiculescu 2016-04-13 04:08:37 UTC
Verified