summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2008-10-22 20:27:16 +0100
committerRichard Purdie <rpurdie@rpsys.net>2008-10-22 20:27:16 +0100
commitebb74a63e1c0c979387bd5556a8331fca61118fa (patch)
treede143ccef7aed932cb6d085cabfd148eaf357122
parentbe2ad3b90c064aeac043f3ce86af1d2c3b9a0e18 (diff)
downloadopenembedded-core-ebb74a63e1c0c979387bd5556a8331fca61118fa.tar.gz
openembedded-core-ebb74a63e1c0c979387bd5556a8331fca61118fa.tar.bz2
openembedded-core-ebb74a63e1c0c979387bd5556a8331fca61118fa.zip
scripts: Add moblin autobuilder support scripts
-rwxr-xr-xscripts/poky-autobuild-moblin98
-rwxr-xr-xscripts/poky-autobuild-postprocess-moblin135
2 files changed, 233 insertions, 0 deletions
diff --git a/scripts/poky-autobuild-moblin b/scripts/poky-autobuild-moblin
new file mode 100755
index 0000000000..4c4e6a058e
--- /dev/null
+++ b/scripts/poky-autobuild-moblin
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Poky Automated Build Server Enviroment Setup Script
+#
+# Copyright (C) 2006-2007 OpenedHand Ltd.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+SRVWORKDIR=/home/buildbot
+TARGETDIR=$SRVWORKDIR/autobuild-output
+CURRDIR=`pwd`
+if [ "$CURRDIR" = "$SRVWORKDIR/poky/full-shihtzu/build" ]; then
+ ABTARGET="poky"
+elif [ "$CURRDIR" = "$SRVWORKDIR/poky/full-bleeding-shihtzu/build" ]; then
+ ABTARGET="poky-bleeding"
+elif [ "$CURRDIR" = "$SRVWORKDIR/poky/toolchain-shihtzu/build" ]; then
+ ABTARGET="toolchain"
+elif [ "$CURRDIR" = "$SRVWORKDIR/pokky/incremental-shihtzu/build" ]; then
+ ABTARGET="incremental"
+elif [ "$CURRDIR" = "$SRVWORKDIR/poky/full-darwin-shihtzu/build" ]; then
+ ABTARGET="darwin"
+ if [ ! -d "$CURRDIR/meta-darwin" ]; then
+ svn co http://svn.o-hand.com/repos/poky/branches/experimental/meta-darwin $CURRDIR/meta-darwin
+ else
+ cd $CURRDIR/meta-darwin
+ svn up
+ cd $CURRDIR
+ fi
+fi
+
+if [ "xpreamble" = "x$1" ]; then
+ mkdir -p ./build/tmp/deploy/images
+ rm -f ./build/tmp/deploy/images/images-complete
+ svn info > ./build/tmp/deploy/images/svninfo
+ exit 0
+fi
+
+BDIR="build"
+. ./scripts/poky-env-internal
+POSTPROCESS=`which poky-autobuild-postprocess-moblin`
+
+if [ "xcomplete" = "x$1" ]; then
+ touch ./tmp/deploy/images/images-complete
+ chmod a+w ./tmp/deploy/images/images-complete
+ if [ "x$POSTPROCESS" != "x" ]; then
+ cd ..
+ $POSTPROCESS $ABTARGET $TARGETDIR
+ fi
+ exit 0
+fi
+
+CONFFILE="./conf/auto.conf"
+
+if [ ! -e "$CONFFILE" ]; then
+ if [ ! -d "./conf" ]; then
+ mkdir -p "./conf"
+ fi
+ echo 'PACKAGE_CLASSES = "package_ipk package_deb"' > "$CONFFILE"
+ echo 'BB_NUMBER_THREADS = "6"' >> "$CONFFILE"
+ echo 'PARALLEL_MAKE = "-j 6"' >> "$CONFFILE"
+ echo 'DL_DIR = "$SRVWORKDIR/sources"' >> "$CONFFILE"
+ echo 'INHERIT += "poky-autobuild-notifier"' >> "$CONFFILE"
+ if [ "$ABTARGET" = "darwin" ]; then
+ echo 'PACKAGE_CLASSES += "package_tar"' >> "$CONFFILE"
+ echo "BBFILES += \"$CURRDIR/meta-darwin/packages/*/*.bb\"" >> "./conf/local.conf"
+ echo 'POKYMODE = "darwin"' >> "$CONFFILE"
+ echo 'DARWINFILES = "file:///srv/poky/sources/"' >> "$CONFFILE"
+ echo 'INHERIT_INSANE = ""' >> "$CONFFILE"
+ echo "FILESPATH_append = \":$CURRDIR/meta-darwin/files\"" >> "$CONFFILE"
+ fi
+fi
+
+if [ "$ABTARGET" = "darwin" ]; then
+ BBPATH=$CURRDIR/meta-darwin:$BBPATH
+fi
+
+bitbake $@
+
+retval=$?
+
+if [ "x$POSTPROCESS" != "x" ]; then
+ cd ..
+ $POSTPROCESS $ABTARGET $TARGETDIR
+fi
+
+exit $retval
diff --git a/scripts/poky-autobuild-postprocess-moblin b/scripts/poky-autobuild-postprocess-moblin
new file mode 100755
index 0000000000..cbe5203fb5
--- /dev/null
+++ b/scripts/poky-autobuild-postprocess-moblin
@@ -0,0 +1,135 @@
+#!/bin/sh
+
+# Poky Automated Build Server Post Processing Script
+#
+# Copyright (C) 2006-2007 OpenedHand Ltd.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ABTARGET=$1
+TARGETDIR=$2
+
+cd ./build/tmp/deploy/
+
+LASTREV=`tail images/svninfo | grep Revision | cut -f 2 -d ' '`
+DEST=$TARGETDIR/$ABTARGET/$LASTREV/
+
+mkdir -p $DEST
+
+COMPRESS_FILES=()
+FILES=()
+
+if [ "x$ABTARGET" = "xpoky-bleeding" ]; then
+ COMPRESS_FILES=(
+ poky-image-sato-qemuarm-*.rootfs.ext2
+ )
+
+ FILES=(
+ svninfo
+ `readlink images/zImage-akita.bin`
+ `readlink images/zImage-qemuarm.bin`
+ updater.sh.akita
+ poky-image-sato-akita-*.rootfs.summary.jffs2
+ poky-image-sato-qemuarm-*.rootfs.tar.bz2
+ )
+fi
+
+if [ "x$ABTARGET" = "xtoolchain" ]; then
+ FILES=(
+ svninfo
+ poky-*-toolchain-*.tar.bz2
+ )
+fi
+
+if [ "x$ABTARGET" = "xpoky" ]; then
+ COMPRESS_FILES=(
+ poky-image-sdk-qemuarm-*.rootfs.ext2
+ poky-image-sdk-qemux86-*.rootfs.ext2
+ poky-image-minimal-qemuarm-*.rootfs.ext2
+ poky-image-minimal-qemux86-*.rootfs.ext2
+ poky-image-sato-cd-*.iso
+ )
+
+ FILES=(
+ svninfo
+ `readlink images/zImage-akita.bin`
+ `readlink images/zImage-c7x0.bin`
+ `readlink images/zImage-qemuarm.bin`
+ `readlink images/zImage-spitz.bin`
+ `readlink images/zImage-nokia800.bin`
+ `readlink images/bzImage-qemux86.bin`
+ `readlink images/bzImage-netbook.bin`
+ `readlink images/zImage-htcuniversal.bin`
+ `readlink images/zImage-mx31litekit.bin`
+ `readlink images/zImage-mx31ads.bin`
+ `readlink images/zImage-nokia770.bin`
+ `readlink images/zImage-zylonite.bin`
+ `readlink images/zImage-cm-x270.bin`
+ `readlink images/uImage-em-x270.bin`
+ `readlink images/uImage-mx31phy.bin`
+ `readlink images/uImage-neo1973-latest.bin`
+ `readlink images/uImage-om-gta01.bin`
+ `readlink images/uImage-om-gta02.bin`
+ updater.sh.akita
+ updater.sh.c7x0
+ updater.sh.spitz
+ gnu-tar
+ poky-image-live-netbook-*.hddimg
+ poky-image-minimal-live-netbook-*.hddimg
+ poky-image-sato-akita-*.rootfs.summary.jffs2
+ poky-image-sato-c7x0-*.rootfs.jffs2
+ poky-image-sato-spitz-*.rootfs.tar.gz
+ poky-image-sdk-qemuarm-*.rootfs.tar.bz2
+ poky-image-sdk-qemux86-*.rootfs.tar.bz2
+ poky-image-minimal-qemuarm-*.rootfs.tar.bz2
+ poky-image-minimal-qemux86-*.rootfs.tar.bz2
+ poky-image-sdk-spitz-*.rootfs.tar.gz
+ poky-image-sdk-nokia800-*.rootfs.jffs2
+ poky-image-sato-nokia770-*.rootfs.jffs2
+ poky-image-sato-zylonite-*.rootfs.jffs2
+ poky-image-sato-cm-x270-*.rootfs.jffs2
+ poky-image-sato-em-x270-*.rootfs.jffs2
+ poky-image-sato-mx31litekit-*.rootfs.tar.gz
+ poky-image-sato-htcuniversal-*.rootfs.tar.gz
+ poky-image-sato-om-gta01-*.rootfs.jffs2
+ poky-image-sato-om-gta02-*.rootfs.jffs2
+ poky-image-sato-mx31phy-*.jffs2
+ poky-image-sato-mx31ads-*.jffs2
+ `readlink images/updater-em-x270.ext2`
+ )
+fi
+
+for FILE in ${FILES[@]}; do
+ for FILE2 in `find -name $FILE`; do
+ if [ ! -e "$DEST/$FILE2" ]; then
+ cp $FILE2 $DEST
+ fi
+ done
+done
+
+for FILE in ${COMPRESS_FILES[@]}; do
+ for FILE2 in `find -name $FILE`; do
+ if [ ! -e "$DEST/$FILE2.bz2" ]; then
+ bzip2 $FILE2
+ cp $FILE2.bz2 $DEST
+ fi
+ done
+done
+
+if [ -e ./images/images-complete ]; then
+ touch $DEST/complete
+fi
+chmod a+w -R $DEST 2> /dev/null || true
+