Patchwork [meta-fsl-arm,01/10] fsl-default-providers.inc: Make virtual/kernel assigment delayed

login
register
mail settings
Submitter Otavio Salvador
Date Nov. 13, 2013, midnight
Message ID <1384300832-11051-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/61531/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

Otavio Salvador - Nov. 13, 2013, midnight
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>
---
 conf/machine/include/fsl-default-providers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/conf/machine/include/fsl-default-providers.inc b/conf/machine/include/fsl-default-providers.inc
index e51ea72..da01871 100644
--- a/conf/machine/include/fsl-default-providers.inc
+++ b/conf/machine/include/fsl-default-providers.inc
@@ -1,6 +1,6 @@ 
 # Freescale BSP default providers
 
 PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-imx"
+PREFERRED_PROVIDER_virtual/kernel ??= "linux-imx"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-fslc"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-fslc"