conf/bitbake.conf: Merge in multimachine making it the standard layout as discussed...
authorRichard Purdie <rpurdie@rpsys.net>
Sat, 19 Jul 2008 14:07:55 +0000 (14:07 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Sat, 19 Jul 2008 14:07:55 +0000 (14:07 +0000)
14 files changed:
classes/base.bbclass
classes/multimachine.bbclass [deleted file]
classes/packaged-staging.bbclass
classes/singlemachine.bbclass [new file with mode: 0644]
conf/bitbake.conf
conf/distro/celinux-test.conf
conf/distro/include/angstrom.inc
conf/distro/include/oplinux.inc
conf/distro/include/slugos.inc
conf/distro/jlime-donkey.conf
conf/distro/jlime-henchman.conf
conf/distro/jlime-mongo.conf
conf/distro/minimal.conf
conf/distro/openprotium.conf

index 3c6f5a1..540b891 100644 (file)
@@ -999,10 +999,12 @@ def base_after_parse(d):
         depends = depends + " git-native:do_populate_staging"
         bb.data.setVarFlag('do_fetch', 'depends', depends, d)
 
+    # 'multimachine' handling
     mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1)
-    old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1)
-    if (old_arch == mach_arch):
-        # Nothing to do
+    pkg_arch = bb.data.getVar('PACKAGE_ARCH', d, 1)
+
+    if (pkg_arch == mach_arch):
+        # Already machine specific - nothing further to do
         return
 
     #
@@ -1010,26 +1012,38 @@ def base_after_parse(d):
     # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
     #
     override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1)
-    if override == '0':
-        return
-
-    paths = []
-    for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
-        path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)
-        if os.path.isdir(path):
-            paths.append(path)
-    if len(paths) == 0:
-        return
-
-    for s in srcuri.split():
-        if not s.startswith("file://"):
-            continue
-        local = bb.data.expand(bb.fetch.localpath(s, d), d)
-        for mp in paths:
-            if local.startswith(mp):
-                #bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch))
-                bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d)
-                return
+    if override != '0':
+        paths = []
+        for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
+            path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)
+            if os.path.isdir(path):
+                paths.append(path)
+        if len(paths) != 0:
+            for s in srcuri.split():
+                if not s.startswith("file://"):
+                    continue
+                local = bb.data.expand(bb.fetch.localpath(s, d), d)
+                for mp in paths:
+                    if local.startswith(mp):
+                        #bb.note("overriding PACKAGE_ARCH from %s to %s" % (pkg_arch, mach_arch))
+                        bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d)
+                        bb.data.setVar('MULTIMACH_ARCH', mach_arch, d)
+                        return
+
+    multiarch = pkg_arch
+
+    packages = bb.data.getVar('PACKAGES', d, 1).split()
+    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 PACKAGE_ARCHS for the priority order?
+        if pkgarch and pkgarch == mach_arch:
+            multiarch = mach_arch
+            break
+
+    bb.data.setVar('MULTIMACH_ARCH', multiarch, d)
 
 python () {
     import bb
diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass
deleted file mode 100644 (file)
index 945d22b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
-WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
-STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
-PKGDATA_DIR = "${STAGING_DIR}/pkgdata/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
-
-# Find any machine specific sub packages and if present, mark the 
-# whole package as machine specific for multimachine purposes.
-
-
-def multi_machine_after_parse(d):
-    import bb
-    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 PACKAGE_ARCHS for the priority order?
-        if pkgarch and pkgarch == macharch:
-            multiarch = macharch
-
-    bb.data.setVar('MULTIMACH_ARCH', multiarch, d)
-
-
-python __anonymous () {
-    multi_machine_after_parse(d)
-}
index 5de5970..77fd8a9 100644 (file)
@@ -19,9 +19,6 @@ PSTAGE_PKGPN      = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_
 PSTAGE_PKGNAME    = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk"
 PSTAGE_PKG        = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}"
 
-# multimachine.bbclass will override this but add a default in case we're not using it
-MULTIMACH_ARCH ?= "${PACKAGE_ARCH}"
-
 PSTAGE_NATIVEDEPENDS = "\
     shasum-native \
     stagemanager-native \
diff --git a/classes/singlemachine.bbclass b/classes/singlemachine.bbclass
new file mode 100644 (file)
index 0000000..e4b2b6f
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# Emulates the old mode of OE operation where only one machine can be targetted.
+#
+
+MULTIMACH_TARGET_SYS = "${TARGET_SYS}"
+MULTIMACH_HOST_SYS = "${HOST_SYS}"
+
+STAMP = "${TMPDIR}/stamps/${PF}"
+WORKDIR = "${TMPDIR}/work/${PF}"
+PKGDATA_DIR = "${STAGING_DIR}/pkgdata"
+STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/kernel"
+
index 8ee1cc6..1e385f1 100644 (file)
@@ -91,6 +91,10 @@ PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
 MACHINE_ARCH = "${@[bb.data.getVar('HOST_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))]}"
 PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}"
 
+MULTIMACH_ARCH = "${PACKAGE_ARCH}"
+MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+MULTIMACH_HOST_SYS = "${MULTIMACH_ARCH}${HOST_VENDOR}-${HOST_OS}"
+
 # select proper CPU to get binary locales generated
 QEMU_OPTIONS = ""
 QEMU_OPTIONS_iwmmxt  = "-cpu pxa270-c5"
@@ -211,8 +215,8 @@ SVNDIR = "${CO_DIR}/svn"
 GITDIR = "${CO_DIR}/git"
 BZRDIR = "${CO_DIR}/bzr"
 
-STAMP = "${TMPDIR}/stamps/${PF}"
-WORKDIR = "${TMPDIR}/work/${PF}"
+STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}"
+WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}"
 T = "${WORKDIR}/temp"
 D = "${WORKDIR}/image"
 S = "${WORKDIR}/${P}"
@@ -248,7 +252,7 @@ DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
 DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
 
-PKGDATA_DIR = "${STAGING_DIR}/pkgdata"
+PKGDATA_DIR = "${STAGING_DIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
 
 SDK_NAME = "${DISTRO}/${TARGET_ARCH}"
 SDK_PREFIX = "/usr/local/${SDK_NAME}"
@@ -258,7 +262,7 @@ SDK_PREFIX = "/usr/local/${SDK_NAME}"
 ##################################################################
 
 OLDEST_KERNEL = "2.4.0"
-STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/kernel"
+STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/kernel"
 
 ##################################################################
 # Specific image creation and rootfs population info.
index 03dcd22..ad7a34d 100644 (file)
@@ -11,9 +11,6 @@
 # we want IPKG packages and Debian style naming
 INHERIT += " package_ipk debian"
 
-# enable if build for many machines
-#INHERIT += " multimachine"
-
 # we want images supporting the following features (for task-base)
 DISTRO_FEATURES = "nfs pcmcia usbhost"
 
index bbdbe7f..4ada4a8 100644 (file)
@@ -35,9 +35,6 @@ MAINTAINER = "Angstrom Developers <angstrom-distro-devel@linuxtogo.org>"
 #use debian style naming
 INHERIT += "debian"
 
-#use multimachine buildrules 
-INHERIT += "multimachine"
-
 #activate config checker
 INHERIT += "sanity" 
 
index a7eac52..36eca58 100644 (file)
@@ -9,9 +9,6 @@ BB_MIN_VERSION = "1.8.10"
 #OPLinux and OPLinux-uclibc source mirrors
 INHERIT += "oplinux-mirrors"
 
-#oplinux is a multimachine distro
-INHERIT += "multimachine"
-
 # check for required tools and minimal BitBake version
 INHERIT += "sanity"
 
index 8661e5b..b149f65 100644 (file)
@@ -42,7 +42,7 @@ TARGET_FPU = "soft"
 # glib-2.0 builds require USE_NLS to be overridden
 USE_NLS_glib-2.0 = "yes"
 
-INHERIT += "package_ipk debian multimachine"
+INHERIT += "package_ipk debian"
 
 # FULL_OPTIMIZATION
 #    Optimization settings.  Os works fine and is significantly better than O2.
index b8c7dae..d5b994c 100644 (file)
@@ -81,7 +81,7 @@ PREFERRED_VERSION_busybox = "1.9.1"
 #<>It will use different folders depending on Arch (set in local.conf)
 #<>------------------------------------------------------------------<
 SRC_DIST_LOCAL = "copy"
-INHERIT += "package_ipk package_tar multimachine src_distribute_local"
+INHERIT += "package_ipk package_tar src_distribute_local"
 BBINCLUDELOGS = "yes"
 IMAGE_FSTYPES = "tar.bz2"
 TARGET_OS = "linux"
index 68353b0..646d335 100644 (file)
@@ -32,7 +32,7 @@ IMAGE_NAME = "${IMAGE_BASENAME}-Henchman-${MACHINE}"
 #
 # Naming schemes
 #
-INHERIT += "debian multimachine"
+INHERIT += "debian"
 
 #
 # Packaging and output format
index 6fb00f1..e2b2e8b 100644 (file)
@@ -32,7 +32,7 @@ IMAGE_NAME = "${IMAGE_BASENAME}-Mongo-${MACHINE}"
 #
 # Naming schemes
 #
-INHERIT += "debian multimachine"
+INHERIT += "debian"
 
 #
 # Packaging and output format
index b54b0c8..e86cf5c 100644 (file)
@@ -19,7 +19,7 @@ DISTRO_TYPE = "debug"
 #
 # Naming schemes
 #
-INHERIT += "debian multimachine"
+INHERIT += "debian"
 
 #
 # Packaging and output format
index 533b415..4b620fe 100644 (file)
@@ -17,7 +17,7 @@ MACHINE_TASK_PROVIDER = "task-openprotium"
 #
 # Naming schemes
 #
-INHERIT += "debian multimachine"
+INHERIT += "debian"
 
 #
 # Packaging and output format