From ab4006bb2e6f51ea49c074fc0e9b1a50c96c01e1 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 26 Jul 2017 12:49:31 +0200 Subject: [PATCH 1/3] weston: use just one append and one bb.utils.contains * drop duplicated --enable-rpi-compositor and WESTON_NATIVE_BACKEND=rpi-backend.so * use rpi override, adding --enable-rpi-compositor unconditionally breaks other MACHINEs with: configure: WARNING: unrecognized options: --enable-rpi-compositor * use just one append and one bb.utils.contains to save some bitbake cycles while parsing Signed-off-by: Martin Jansa --- recipes-graphics/wayland/weston_%.bbappend | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend index f2cb7aa..1dac41c 100644 --- a/recipes-graphics/wayland/weston_%.bbappend +++ b/recipes-graphics/wayland/weston_%.bbappend @@ -1,12 +1,12 @@ -EXTRA_OECONF_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' --enable-rpi-compositor WESTON_NATIVE_BACKEND=rpi-backend.so', d)}" - PACKAGECONFIG_remove_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'fbdev', '', d)}" -EXTRA_OECONF += "--disable-xwayland-test \ - --disable-simple-egl-clients \ +EXTRA_OECONF_append_rpi = " \ + --disable-xwayland-test \ + --disable-simple-egl-clients \ + ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' \ + --enable-rpi-compositor \ + --disable-resize-optimization \ + --disable-setuid-install \ + WESTON_NATIVE_BACKEND=rpi-backend.so \ + ', d)} \ " - -EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--enable-rpi-compositor', d)}" -EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-resize-optimization', d)}" -EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-setuid-install', d)}" -EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'WESTON_NATIVE_BACKEND=rpi-backend.so', d)}" From 56d0bdb5fe818858a152a793a363bbe86d46d430 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 26 Jul 2017 12:49:51 +0200 Subject: [PATCH 2/3] recipe: anchor regexps in COMPATIBLE_MACHINE * bitbake is using re.match, so raspberrypi actually matches with anything ^raspberrypi.* which currently works, but it will also match with hypothetical raspberrypi-is-no-more-this-is-banana-now MACHINE which isn't intended by this COMPATIBLE_MACHINE. Signed-off-by: Martin Jansa --- recipes-bsp/bootfiles/bcm2835-bootfiles.bb | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 2 +- recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb | 2 +- recipes-devtools/bcm2835/bcm2835_1.52.bb | 2 +- recipes-devtools/pi-blaster/pi-blaster.inc | 2 +- recipes-devtools/python/rpi-gpio_0.6.2.bb | 2 +- recipes-devtools/python/rpio_0.10.0.bb | 2 +- recipes-devtools/wiringPi/wiringpi_git.bb | 2 +- recipes-graphics/userland/userland_git.bb | 2 +- recipes-graphics/vc-graphics/vc-graphics.inc | 2 +- recipes-kernel/linux/linux-raspberrypi.inc | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/recipes-bsp/bootfiles/bcm2835-bootfiles.bb b/recipes-bsp/bootfiles/bcm2835-bootfiles.bb index b279e15..a115037 100644 --- a/recipes-bsp/bootfiles/bcm2835-bootfiles.bb +++ b/recipes-bsp/bootfiles/bcm2835-bootfiles.bb @@ -9,7 +9,7 @@ include recipes-bsp/common/firmware.inc RDEPENDS_${PN} = "rpi-config" -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" S = "${RPIFW_S}/boot" diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index b3c5084..38a1237 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb @@ -5,7 +5,7 @@ DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f" SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \ diff --git a/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb index 4936dcf..c938c3b 100644 --- a/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb +++ b/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb @@ -1,7 +1,7 @@ SUMMARY = "U-boot boot scripts for Raspberry Pi" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -COMPATIBLE_MACHINE = "rpi" +COMPATIBLE_MACHINE = "^rpi$" DEPENDS = "u-boot-mkimage-native" diff --git a/recipes-devtools/bcm2835/bcm2835_1.52.bb b/recipes-devtools/bcm2835/bcm2835_1.52.bb index 8e41c61..eef6afd 100644 --- a/recipes-devtools/bcm2835/bcm2835_1.52.bb +++ b/recipes-devtools/bcm2835/bcm2835_1.52.bb @@ -8,7 +8,7 @@ AUTHOR = "Mike McCauley (mikem@open.com.au)" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz" diff --git a/recipes-devtools/pi-blaster/pi-blaster.inc b/recipes-devtools/pi-blaster/pi-blaster.inc index a548957..6ea4fa3 100644 --- a/recipes-devtools/pi-blaster/pi-blaster.inc +++ b/recipes-devtools/pi-blaster/pi-blaster.inc @@ -16,6 +16,6 @@ INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME_${PN} = "${PN}.boot.sh" INITSCRIPT_PARAMS_${PN} = "defaults 15 85" -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/recipes-devtools/python/rpi-gpio_0.6.2.bb b/recipes-devtools/python/rpi-gpio_0.6.2.bb index a08ea98..9c72168 100644 --- a/recipes-devtools/python/rpi-gpio_0.6.2.bb +++ b/recipes-devtools/python/rpi-gpio_0.6.2.bb @@ -17,5 +17,5 @@ S = "${WORKDIR}/${SRCNAME}-${PV}" inherit distutils -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" diff --git a/recipes-devtools/python/rpio_0.10.0.bb b/recipes-devtools/python/rpio_0.10.0.bb index 1a6cee7..998fdb3 100644 --- a/recipes-devtools/python/rpio_0.10.0.bb +++ b/recipes-devtools/python/rpio_0.10.0.bb @@ -14,7 +14,7 @@ S = "${WORKDIR}/${SRCNAME}-${PV}" inherit setuptools -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" RDEPENDS_${PN} = "\ python-logging \ diff --git a/recipes-devtools/wiringPi/wiringpi_git.bb b/recipes-devtools/wiringPi/wiringpi_git.bb index 7953a55..f1b01db 100644 --- a/recipes-devtools/wiringPi/wiringpi_git.bb +++ b/recipes-devtools/wiringPi/wiringpi_git.bb @@ -13,7 +13,7 @@ SRC_URI = "git://git.drogon.net/wiringPi \ file://0001-Add-initial-cross-compile-support.patch \ " -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" CFLAGS_prepend = "-I${S}/wiringPi -I${S}/devLib " diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb index 893fcba..8ff1411 100644 --- a/recipes-graphics/userland/userland_git.bb +++ b/recipes-graphics/userland/userland_git.bb @@ -12,7 +12,7 @@ PROVIDES = "virtual/libgles2 \ RPROVIDES_${PN} += "libgles2 egl" -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" SRCBRANCH = "master" SRCFORK = "raspberrypi" diff --git a/recipes-graphics/vc-graphics/vc-graphics.inc b/recipes-graphics/vc-graphics/vc-graphics.inc index a1c8d29..668c5ce 100644 --- a/recipes-graphics/vc-graphics/vc-graphics.inc +++ b/recipes-graphics/vc-graphics/vc-graphics.inc @@ -4,7 +4,7 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780" PROVIDES = "virtual/libgles2 virtual/egl" -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" include recipes-bsp/common/firmware.inc diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc index 9265d55..4f5999d 100644 --- a/recipes-kernel/linux/linux-raspberrypi.inc +++ b/recipes-kernel/linux/linux-raspberrypi.inc @@ -10,7 +10,7 @@ SRC_URI += " \ file://defconfig \ " -COMPATIBLE_MACHINE = "raspberrypi" +COMPATIBLE_MACHINE = "^rpi$" PE = "1" PV = "${LINUX_VERSION}+git${SRCPV}" From ff02bf92e66a9997576923b4622cdcf740352724 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 26 Jul 2017 12:49:59 +0200 Subject: [PATCH 3/3] packagegroup-rpi-test, rpi-test-image: restrict to ^rpi$ and include omxplayer only for 32bit rpi * omxplayer has: COMPATIBLE_MACHINE_rpi_aarch64 = null so it cannot be inclued for raspberrypi3-64 * components used by this packagegroup are also restricted to ^rpi$ so the packagegroup and the image using it cannot be built for anything else * fixes couple errors when trying to build world with meta-raspberrypi included Signed-off-by: Martin Jansa --- recipes-core/images/rpi-test-image.bb | 2 ++ recipes-core/packagegroups/packagegroup-rpi-test.bb | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes-core/images/rpi-test-image.bb b/recipes-core/images/rpi-test-image.bb index b5602a6..c8dc436 100644 --- a/recipes-core/images/rpi-test-image.bb +++ b/recipes-core/images/rpi-test-image.bb @@ -1,4 +1,6 @@ # Base this image on rpi-basic-image include rpi-basic-image.bb +COMPATIBLE_MACHINE = "^rpi$" + IMAGE_INSTALL_append = " packagegroup-rpi-test" diff --git a/recipes-core/packagegroups/packagegroup-rpi-test.bb b/recipes-core/packagegroups/packagegroup-rpi-test.bb index 29e995e..029c18c 100644 --- a/recipes-core/packagegroups/packagegroup-rpi-test.bb +++ b/recipes-core/packagegroups/packagegroup-rpi-test.bb @@ -4,8 +4,13 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 inherit packagegroup +COMPATIBLE_MACHINE = "^rpi$" + +OMXPLAYER_rpi = "omxplayer" +OMXPLAYER_rpi_aarch64 = "" + RDEPENDS_${PN} = "\ - omxplayer \ + ${OMXPLAYER} \ bcm2835-tests \ wiringpi \ rpio \