]> code.ossystems Code Review - meta-freescale.git/commit
fsl-default-providers.inc: Make virtual/kernel assigment delayed
authorOtavio Salvador <otavio@ossystems.com.br>
Tue, 12 Nov 2013 18:13:57 +0000 (16:13 -0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 12 Nov 2013 21:39:47 +0000 (19:39 -0200)
commit35af99b7ae0524c17999784d110bd9f531388b48
tree8ac83c2ef902eaee706225435ff4cfa7c496d093
parent367e701a3df23cea227b508e210f9ba448db3430
fsl-default-providers.inc: Make virtual/kernel assigment delayed

In 01851da (machine/*: Allow kernel provider override) the assigment
of preferred provider for virtual/kernel has been changed to a weak
assignment. This works for most of cases but has caused a regression
in some machines.

When a machine includes the imx-base.inc file, the assignment is done
and the intended setting of the machine does not take effect.

For example, in the below code fragment:

,----[ Wandboard board configuration fragment  ]
| include conf/machine/include/imx-base.inc
| ...
| PREFERRED_PROVIDER_virtual/kernel ?= "linux-wandboard"
`----

the virtual/kernel provider would be 'linux-imx' as, at the time of
imx-base.inc inclusion, it was undefined. The expected behaviour would
be to use 'linux-imx' /only/ when no setting has been done.

The ??= operator solves this as it is used /only/ if no assignment is
done to the virtual/kernel provider in the end of the parsing. So it
gives the expected behaviour.

Change-Id: Iab73dcff8bef7f2df1064a0d5d04fd506a4c3144
Reported-by: Alfonso Tamés <alfonso@mantic.mx>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/conf/machine/include/fsl-default-providers.inc