[gnome-ostree] Build for x86_64 too
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] Build for x86_64 too
- Date: Tue, 20 Nov 2012 18:16:14 +0000 (UTC)
commit ab4a9c55fb7d6aceb69cdcf9641f390a08dafd98
Author: Colin Walters <walters verbum org>
Date: Tue Nov 20 10:17:27 2012 -0500
Build for x86_64 too
I'm having LLVMPipe issues which I suspect are 32-bit only...we might
as well just start doing 64 bit builds too for other reasons.
manifest.json | 2 +-
src/ostbuild/ostree-build-yocto | 16 +++++++++++++---
src/ostbuild/pyostbuild/builtin_build.py | 21 ++++++++++++++++-----
3 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/manifest.json b/manifest.json
index 2f384cf..98cbc8f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"00ostbuild-manifest-version": 0,
"prefix": "gnomeos-3.8",
- "architectures": ["i686"],
+ "architectures": ["i686", "x86_64"],
"base": {
"name": "yocto",
"src": "cgwalters:poky",
diff --git a/src/ostbuild/ostree-build-yocto b/src/ostbuild/ostree-build-yocto
index 297c510..950d1d2 100644
--- a/src/ostbuild/ostree-build-yocto
+++ b/src/ostbuild/ostree-build-yocto
@@ -26,14 +26,16 @@ die () {
}
usage () {
- echo "$0: SRCDIR BUILDDIR REPO"
+ echo "$0: SRCDIR BUILDDIR ARCHITECTURE REPO"
}
srcdir=$1
test -n "${srcdir}" || (usage; exit 1)
builddir=$2
test -n "${builddir}" || (usage; exit 1)
-repo_path=$3
+architecture=$3
+test -n "${architecture}" || (usage; exit 1)
+repo_path=$4
test -n "${repo_path}" || (usage; exit 1)
src_gitrev=$(cd ${srcdir} && git rev-parse HEAD)
@@ -59,6 +61,12 @@ if ! grep -q meta-gnomeos ${builddir}/conf/bblayers.conf; then
echo "BBLAYERS += \"${srcdir}/meta-gnomeos\"" >> ${builddir}/conf/bblayers.conf
fi
+case "$architecture" in
+ i686) MACHINE="atom-pc";;
+ x86_64) MACHINE="qemux86-64";;
+ *) echo "Error: Unhandled architecture '$architecture'"; exit 1;;
+esac
+
mkdir -p ${builddir}/conf
localconf=${builddir}/conf/local.conf
if ! grep -q "DISTRO.*gnomeos" ${localconf}; then
@@ -68,11 +76,13 @@ PARALLEL_MAKE = "-j ${numcpus}"
BB_NUMBER_THREADS = "${numcpus}"
LAYER_CONF_VERSION = "6"
CONF_VERSION = "1"
-MACHINE = "atom-pc"
+MACHINE = "${MACHINE}"
DISTRO = "gnomeosdistro"
USER_CLASSES = ""
PACKAGE_CLASSES = "package_rpm"
PATCHRESOLVE = "noop"
+SSTATE_DIR = "${SSTATE_DIR}"
+DL_DIR = "${DL_DIR}"
INHERIT += "rm_work"
EOF
mv ${localconf}.tmp ${localconf}
diff --git a/src/ostbuild/pyostbuild/builtin_build.py b/src/ostbuild/pyostbuild/builtin_build.py
index 289000a..504704f 100755
--- a/src/ostbuild/pyostbuild/builtin_build.py
+++ b/src/ostbuild/pyostbuild/builtin_build.py
@@ -483,7 +483,7 @@ and the manifest input."""
if not os.path.isdir(os.path.join(self.repo, 'objects')):
run_sync(['ostree', '--repo=' + self.repo, 'init', '--archive'])
- def _build_base(self):
+ def _build_base(self, architecture):
"""Build the Yocto base system."""
basemeta = self.snapshot['base']
checkoutdir = os.path.join(self.workdir, 'checkouts', basemeta['name'])
@@ -502,14 +502,23 @@ and the manifest input."""
basemeta['revision'],
overwrite=False)
- builddir = os.path.join(self.workdir, 'build-' + basemeta['name'])
+ builddir_name = 'build-%s-%s' % (basemeta['name'], architecture)
+ builddir = os.path.join(self.workdir, builddir_name)
+
+ # Just keep reusing the old working directory downloads and sstate
+ old_builddir = os.path.join(self.workdir, 'build-%s' % (basemeta['name'], ))
+ sstate_dir = os.path.join(old_builddir, 'sstate-cache')
+ downloads = os.path.join(old_builddir, 'downloads')
cmd = ['linux-user-chroot', '--unshare-pid', '/',
os.path.join(LIBDIR, 'ostbuild', 'ostree-build-yocto'),
- checkoutdir, builddir, self.repo]
+ checkoutdir, builddir, architecture, self.repo]
# We specifically want to kill off any environment variables jhbuild
# may have set.
- run_sync(cmd, env=buildutil.BUILD_ENV)
+ env = dict(buildutil.BUILD_ENV)
+ env['DL_DIR'] = downloads
+ env['SSTATE_DIR'] = sstate_dir
+ run_sync(cmd, env=env)
def execute(self, argv):
parser = argparse.ArgumentParser(description=self.short_description)
@@ -557,7 +566,6 @@ and the manifest input."""
self.cached_patchdir_revision = None
self._initialize_repo()
- self._build_base()
components = self.snapshot['components']
@@ -566,6 +574,9 @@ and the manifest input."""
architectures = self.snapshot['architectures']
+ for architecture in architectures:
+ self._build_base(architecture)
+
component_to_arches = {}
runtime_components = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]