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.
Setting target to 2.1 and state to ACCEPTED.
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
Hi Scott, I believe Richard knows best the design (See https://bugzilla.yoctoproject.org/show_bug.cgi?id=4204).
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%" """
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
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?
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 :/.
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.
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?
Scott, I vote for the cookbook.
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
Verified