summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-05-28 18:49:08 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-28 18:49:08 +0000
commitf18661145bcacd7adca80e31cf3ee214f3ad7078 (patch)
tree567da405ed14f736299f0389e5aa15f3e724bb57 /classes
parentdb176af0bf1987aac2502954576d9265a92b80fe (diff)
multimachine: Change from an include to a .bblass (and update distros using multimachine accordingly). Add code to find packages with machine specific subpackages and build these in a multimachine compatible way.
Diffstat (limited to 'classes')
-rw-r--r--classes/multimachine.bbclass22
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass
new file mode 100644
index 0000000000..2248f326cc
--- /dev/null
+++ b/classes/multimachine.bbclass
@@ -0,0 +1,22 @@
+STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}-${HOST_OS}/${PF}"
+WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}-${HOST_OS}/${PF}"
+STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}-${HOST_OS}/kernel"
+
+# Find any machine specific sub packages and if present, mark the
+# whole package as machine specific for multimachine purposes.
+python __anonymous () {
+ packages = bb.data.getVar('PACKAGES', d, 1).split()
+ macharch = bb.data.getVar('MACHINE_ARCH', d, 1)
+ multiarch = bb.data.getVar('PACKAGE_ARCH', d, 1)
+
+ for pkg in packages:
+ pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1)
+
+ # We could look for != PACKAGE_ARCH here but how to choose
+ # if multiple differences are present?
+ # Look through IPKG_ARCHS for the priority order?
+ if pkgarch and pkgarch == macharch:
+ multiarch = macharch
+
+ bb.data.setVar('MULTIMACH_ARCH', multiarch, d)
+}