diff options
author | Richard Purdie <richard@openedhand.com> | 2006-05-28 21:58:59 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-05-28 21:58:59 +0000 |
commit | 439db2032c8b3446fc3bbae945370d2f28b0d2c2 (patch) | |
tree | f161f94ee42c5c53ecbb6697e4227c249758a8f2 | |
parent | c74733f58c274921f9e1801a37e0a96dfd5d4776 (diff) | |
download | openembedded-core-439db2032c8b3446fc3bbae945370d2f28b0d2c2.tar.gz openembedded-core-439db2032c8b3446fc3bbae945370d2f28b0d2c2.tar.bz2 openembedded-core-439db2032c8b3446fc3bbae945370d2f28b0d2c2.tar.xz openembedded-core-439db2032c8b3446fc3bbae945370d2f28b0d2c2.zip |
Change multimachine to a bbclass and update distro configurations. Add multimachine functionlity to cope with packages with machine specific sub packages. Also applied to OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@450 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rwxr-xr-x | build/conf/local.conf.sample | 1 | ||||
-rw-r--r-- | openembedded/classes/multimachine.bbclass | 22 | ||||
-rw-r--r-- | openembedded/conf/distro/angstrom.conf | 4 | ||||
-rw-r--r-- | openembedded/conf/distro/familiar.conf | 4 | ||||
-rw-r--r-- | openembedded/conf/distro/include/multimachine.conf | 3 | ||||
-rw-r--r-- | openembedded/conf/distro/openzaurus.conf | 4 | ||||
-rw-r--r-- | openembedded/conf/distro/poky.conf | 2 |
7 files changed, 26 insertions, 14 deletions
diff --git a/build/conf/local.conf.sample b/build/conf/local.conf.sample index 08e92eab7..dcdf80024 100755 --- a/build/conf/local.conf.sample +++ b/build/conf/local.conf.sample @@ -57,5 +57,4 @@ BBINCLUDELOGS = "yes" # a cvs:// URI. Uncomment this, if you not want to pull directly from CVS. CVS_TARBALL_STASH = "http://www.oesources.org/source/current/" -include conf/distro/include/multimachine.conf ENABLE_BINARY_LOCALE_GENERATION = "1" diff --git a/openembedded/classes/multimachine.bbclass b/openembedded/classes/multimachine.bbclass new file mode 100644 index 000000000..2248f326c --- /dev/null +++ b/openembedded/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) +} diff --git a/openembedded/conf/distro/angstrom.conf b/openembedded/conf/distro/angstrom.conf index 403b13934..100017410 100644 --- a/openembedded/conf/distro/angstrom.conf +++ b/openembedded/conf/distro/angstrom.conf @@ -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" diff --git a/openembedded/conf/distro/familiar.conf b/openembedded/conf/distro/familiar.conf index da5caa799..2646fe78a 100644 --- a/openembedded/conf/distro/familiar.conf +++ b/openembedded/conf/distro/familiar.conf @@ -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/openembedded/conf/distro/include/multimachine.conf b/openembedded/conf/distro/include/multimachine.conf deleted file mode 100644 index 1f73ffd30..000000000 --- a/openembedded/conf/distro/include/multimachine.conf +++ /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" diff --git a/openembedded/conf/distro/openzaurus.conf b/openembedded/conf/distro/openzaurus.conf index edcbacc80..b7f456320 100644 --- a/openembedded/conf/distro/openzaurus.conf +++ b/openembedded/conf/distro/openzaurus.conf @@ -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 diff --git a/openembedded/conf/distro/poky.conf b/openembedded/conf/distro/poky.conf index c2aecb92f..d43df4dd9 100644 --- a/openembedded/conf/distro/poky.conf +++ b/openembedded/conf/distro/poky.conf @@ -10,7 +10,7 @@ DISTRO_TYPE = "debug" # DISTRO_TYPE = "release" -INHERIT += " package_ipk debian" +INHERIT += " package_ipk debian multimachine" # For some reason, this doesn't work # TARGET_OS ?= "linux" TARGET_OS = "linux" |