Skip to contentSkip to conversation

linux-yocto-rt, core-image-rt*: Explicitly skip when PREFERRED_PROVIDER_virtual/kernel isn't set to linux-yocto-rt

PATCH New Martin Jansa 1 participant 2 messages Apr 29, 2016 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 linux-yocto-rt, core-image-rt*: Explicitly skip when PREFERRED_PROVIDER_virtual/kernel isn't set to linux-yocto-rt

* just like linux-yocto-dev is doing
* fixes following errors in world builds:
ERROR: Nothing PROVIDES 'linux-yocto-rt' (but /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-rt/images/core-image-rt-sdk.bb DEPENDS on or otherwise requires it)
ERROR: linux-yocto-rt was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-yocto, not linux-yocto-rt
ERROR: linux-yocto-rt was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-yocto, not linux-yocto-rt
ERROR: Required build target 'core-image-rt-sdk' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-rt-sdk', 'linux-yocto-rt']

ERROR: Nothing PROVIDES 'linux-yocto-rt' (but /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-rt/images/core-image-rt.bb DEPENDS on or otherwise requires it)
ERROR: linux-yocto-rt was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-yocto, not linux-yocto-rt
ERROR: linux-yocto-rt was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-yocto, not linux-yocto-rt
ERROR: Required build target 'core-image-rt' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-rt', 'linux-yocto-rt']

---
 meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb | 9 +++++++++
 meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb | 9 +++++++++
 meta/recipes-rt/images/core-image-rt-sdk.bb     | 8 ++++++++
 meta/recipes-rt/images/core-image-rt.bb         | 8 ++++++++
 4 files changed, 34 insertions(+)
meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb +9 -0
index a138957..7c0b453 100644
@@ -2,6 +2,15 @@ KBRANCH ?= "standard/preempt-rt/base"
 
 require recipes-kernel/linux/linux-yocto.inc
 
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+    if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
 SRCREV_machine ?= "28d8cfdbcb18a6eef202099cca66430fd3b6eae0"
 SRCREV_meta ?= "a4f88c3fad887e1c559d03ae1b531ca267137b69"
 
meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb +9 -0
index d81ca13..1723b4b 100644
@@ -2,6 +2,15 @@ KBRANCH ?= "standard/preempt-rt"
 
 require recipes-kernel/linux/linux-yocto.inc
 
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+    if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
 SRCREV_machine ?= "2bc112a6ccd16800a4c45e47ccb3018a1042abdf"
 SRCREV_meta ?= "bcc65090840f51a6ac937297be5c22fe268d01ab"
 
meta/recipes-rt/images/core-image-rt-sdk.bb +8 -0
index db7d581..7ddf671 100644
@@ -1,5 +1,13 @@
 require recipes-core/images/core-image-minimal.bb
 
+# Skip processing of this recipe if linux-yocto-rt is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers.
+python () {
+    if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
 DESCRIPTION = "Small image capable of booting a device with a test suite and \
 tools for real-time use. It includes the full meta-toolchain, development \
 headers and libraries to form a standalone SDK."
meta/recipes-rt/images/core-image-rt.bb +8 -0
index cab6f8b..9c86f25 100644
@@ -1,5 +1,13 @@
 require recipes-core/images/core-image-minimal.bb
 
+# Skip processing of this recipe if linux-yocto-rt is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers.
+python () {
+    if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
 DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
 real-time test suite and tools appropriate for real-time use."
 DEPENDS = "linux-yocto-rt"
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/2 core-image-{minimal, testmaster}-initramfs: set COMPATIBLE_HOST

* use the same COMPATIBLE_HOST restriction as initramfs-live-install(-testfs) to resolve ugly error when trying to build them e.g. for ARM:

ERROR: Nothing RPROVIDES 'initramfs-live-install-testfs' (but /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-extended/images/core-image-testmaster-initramfs.bb RDEPENDS on or otherwise requires it)
ERROR: initramfs-live-install-testfs was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)
NOTE: Runtime target 'initramfs-live-install-testfs' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['initramfs-live-install-testfs']
ERROR: Required build target 'core-image-testmaster-initramfs' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-testmaster-initramfs', 'initramfs-live-install-testfs']

ERROR: Nothing RPROVIDES 'initramfs-live-install' (but /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-core/images/core-image-minimal-initramfs.bb RDEPENDS on or otherwise requires it)
ERROR: initramfs-live-install was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)
NOTE: Runtime target 'initramfs-live-install' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['initramfs-live-install']
ERROR: Required build target 'core-image-minimal-initramfs' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal-initramfs', 'initramfs-live-install']

---
 meta/recipes-core/images/core-image-minimal-initramfs.bb        | 3 +++
 meta/recipes-extended/images/core-image-testmaster-initramfs.bb | 3 +++
 2 files changed, 6 insertions(+)
meta/recipes-core/images/core-image-minimal-initramfs.bb +3 -0
index 8d7c0d2..5794a25 100644
@@ -20,3 +20,6 @@ IMAGE_ROOTFS_SIZE = "8192"
 IMAGE_ROOTFS_EXTRA_SPACE = "0"
 
 BAD_RECOMMENDATIONS += "busybox-syslog"
+
+# Use the same restriction as initramfs-live-install
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
meta/recipes-extended/images/core-image-testmaster-initramfs.bb +3 -0
index ad1407c..09a6d16 100644
@@ -18,3 +18,6 @@ inherit core-image
 IMAGE_ROOTFS_SIZE = "8192"
 IMAGE_ROOTFS_EXTRA_SPACE = "0"
 BAD_RECOMMENDATIONS += "busybox-syslog"
+
+# Use the same restriction as initramfs-live-install-testfs
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
Signature · 1 line
2.8.1