machine: use weak default for kernel and KERNEL_DEVICETREE settings

To allow other layers to easily provide a default kernel preference to
use with the Raspberry Pi MACHINEs, switch to use the ??= assignment
operator for setting the default kernel and the device tree value in
this layer.

This change is motivated by enabling Xen support in meta-virtualization
to use the raspberrypi4-64 MACHINE definition from this layer with the
Yocto Linux kernels.

Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com>
(cherry picked from commit e0b4b8c5df)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
This commit is contained in:
Christopher Clark 2021-01-07 14:18:26 -08:00 committed by Andrei Gherzan
parent 48a500e7ee
commit 028e1e0e4d
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ RPI_KERNEL_DEVICETREE ?= " \
bcm2710-rpi-cm3.dtb \ bcm2710-rpi-cm3.dtb \
" "
KERNEL_DEVICETREE ?= " \ KERNEL_DEVICETREE ??= " \
${RPI_KERNEL_DEVICETREE} \ ${RPI_KERNEL_DEVICETREE} \
${RPI_KERNEL_DEVICETREE_OVERLAYS} \ ${RPI_KERNEL_DEVICETREE_OVERLAYS} \
" "

View File

@ -1,6 +1,6 @@
# RaspberryPi BSP default providers # RaspberryPi BSP default providers
PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi" PREFERRED_PROVIDER_virtual/kernel ??= "linux-raspberrypi"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}" PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}" PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"