multimachine: Change from an include to a .bblass (and update distros using multimach...
authorRichard Purdie <rpurdie@rpsys.net>
Sun, 28 May 2006 18:49:08 +0000 (18:49 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 28 May 2006 18:49:08 +0000 (18:49 +0000)
classes/multimachine.bbclass [new file with mode: 0644]
conf/distro/angstrom.conf
conf/distro/familiar.conf
conf/distro/include/.mtn2git_empty [deleted file]
conf/distro/include/multimachine.conf [deleted file]
conf/distro/jlime-donkey.conf
conf/distro/openzaurus.conf

diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass
new file mode 100644 (file)
index 0000000..2248f32
--- /dev/null
@@ -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)
+}
index 403b139..1000174 100644 (file)
@@ -12,10 +12,8 @@ ANGSTROM_URI = "http://www.angstrom-distribution.org/"
 MAINTAINER = "Angstrom Developers <angstrom-dev@handhelds.org>"
 
 #use ipkg package format with debian style naming
-INHERIT += "package_ipk debian"
-
 #use multimachine buildrules 
-include conf/distro/include/multimachine.conf
+INHERIT += "package_ipk debian multimachine"
 
 #Generate locales on the buildsystem instead of on the target. Speeds up first boot, set to "1" to enable
 PREFERRED_PROVIDER_qemu-native = "qemu-qop-nogfx-native"
index da5caa7..2646fe7 100644 (file)
@@ -4,7 +4,7 @@
 
 MAINTAINER ?= "Familiar Developers <familiar-dev@handhelds.org>"
 
-INHERIT += "package_ipk debian"
+INHERIT += "package_ipk debian multimachine"
 TARGET_OS = "linux"
 
 BOOTSTRAP_EXTRA_RDEPENDS += "familiar-version"
@@ -15,5 +15,3 @@ PARALLEL_INSTALL_MODULES = "1"
 UDEV_DEVFS_RULES = "1"
 
 DISTRO_CHECK := "${@bb.data.getVar("DISTRO_VERSION",d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION if you really want to build an unversioned distro')}"
-
-include conf/distro/include/multimachine.conf
diff --git a/conf/distro/include/.mtn2git_empty b/conf/distro/include/.mtn2git_empty
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/conf/distro/include/multimachine.conf b/conf/distro/include/multimachine.conf
deleted file mode 100644 (file)
index 1f73ffd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-STAMP = "${TMPDIR}/stamps/${PACKAGE_ARCH}-${HOST_OS}/${PF}"
-WORKDIR = "${TMPDIR}/work/${PACKAGE_ARCH}-${HOST_OS}/${PF}"
-STAGING_KERNEL_DIR = "${STAGING_DIR}/${PACKAGE_ARCH}-${HOST_OS}/kernel"
index 01c90a5..dfdbe19 100644 (file)
@@ -53,7 +53,11 @@ PREFERRED_VERSION_xserver-kdrive = "0.0+cvs20060312"
 #<>
 #<>Other Specific stuff.
 #<>
-INHERIT += "package_tar package_ipk"
+#<>
+#<>We want to be able to build this for all jornadas so
+#<>to not mess up the folders we need to make them dynamic.
+#<>It will use different folders depending on Arch (set in local.conf)
+INHERIT += "package_tar package_ipk multimachine"
 BBINCLUDELOGS = "yes"
 IMAGE_FSTYPES = "tar.bz2"
 TARGET_OS = "linux"
@@ -75,12 +79,6 @@ include conf/distro/preferred-opie-versions.inc
 #<>
 PCMCIA_MANAGER = "pcmciautils"
 
-#<>
-#<>We want to be able to build this for all jornadas so
-#<>to not mess up the folders we need to make them dynamic.
-#<>It will use different folders depending on Arch (set in local.conf)
-include conf/distro/include/multimachine.conf
-
 #<>
 #<> Dont wanna break stuff when "some" packages do -O3, so lets set it at -O2
 #<>
index edcbacc..b7f4563 100644 (file)
@@ -5,7 +5,7 @@
 DISTRO = "openzaurus"
 DISTRO_NAME = "OpenZaurus"
 
-INHERIT += " package_ipk debian"
+INHERIT += " package_ipk debian multimachine"
 # For some reason, this doesn't work
 # TARGET_OS ?= "linux"
 TARGET_OS = "linux"
@@ -16,5 +16,3 @@ BOOTSTRAP_EXTRA_RDEPENDS += "openzaurus-version"
 PARALLEL_INSTALL_MODULES = "1"
 
 DISTRO_CHECK := "${@bb.data.getVar("DISTRO_VERSION",d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION if you really want to build an unversioned distro')}"
-
-include conf/distro/include/multimachine.conf