summaryrefslogtreecommitdiffstats
path: root/scripts
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 /scripts
parentbe2ad3b90c064aeac043f3ce86af1d2c3b9a0e18 (diff)
downloadpoky-ebb74a63e1c0c979387bd5556a8331fca61118fa.tar.gz
scripts: Add moblin autobuilder support scripts
Diffstat (limited to '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 @@
1#!/bin/sh
2
3# Poky Automated Build Server Enviroment Setup Script
4#
5# Copyright (C) 2006-2007 OpenedHand Ltd.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
21SRVWORKDIR=/home/buildbot
22TARGETDIR=$SRVWORKDIR/autobuild-output
23CURRDIR=`pwd`
24if [ "$CURRDIR" = "$SRVWORKDIR/poky/full-shihtzu/build" ]; then
25 ABTARGET="poky"
26elif [ "$CURRDIR" = "$SRVWORKDIR/poky/full-bleeding-shihtzu/build" ]; then
27 ABTARGET="poky-bleeding"
28elif [ "$CURRDIR" = "$SRVWORKDIR/poky/toolchain-shihtzu/build" ]; then
29 ABTARGET="toolchain"
30elif [ "$CURRDIR" = "$SRVWORKDIR/pokky/incremental-shihtzu/build" ]; then
31 ABTARGET="incremental"
32elif [ "$CURRDIR" = "$SRVWORKDIR/poky/full-darwin-shihtzu/build" ]; then
33 ABTARGET="darwin"
34 if [ ! -d "$CURRDIR/meta-darwin" ]; then
35 svn co http://svn.o-hand.com/repos/poky/branches/experimental/meta-darwin $CURRDIR/meta-darwin
36 else
37 cd $CURRDIR/meta-darwin
38 svn up
39 cd $CURRDIR
40 fi
41fi
42
43if [ "xpreamble" = "x$1" ]; then
44 mkdir -p ./build/tmp/deploy/images
45 rm -f ./build/tmp/deploy/images/images-complete
46 svn info > ./build/tmp/deploy/images/svninfo
47 exit 0
48fi
49
50BDIR="build"
51. ./scripts/poky-env-internal
52POSTPROCESS=`which poky-autobuild-postprocess-moblin`
53
54if [ "xcomplete" = "x$1" ]; then
55 touch ./tmp/deploy/images/images-complete
56 chmod a+w ./tmp/deploy/images/images-complete
57 if [ "x$POSTPROCESS" != "x" ]; then
58 cd ..
59 $POSTPROCESS $ABTARGET $TARGETDIR
60 fi
61 exit 0
62fi
63
64CONFFILE="./conf/auto.conf"
65
66if [ ! -e "$CONFFILE" ]; then
67 if [ ! -d "./conf" ]; then
68 mkdir -p "./conf"
69 fi
70 echo 'PACKAGE_CLASSES = "package_ipk package_deb"' > "$CONFFILE"
71 echo 'BB_NUMBER_THREADS = "6"' >> "$CONFFILE"
72 echo 'PARALLEL_MAKE = "-j 6"' >> "$CONFFILE"
73 echo 'DL_DIR = "$SRVWORKDIR/sources"' >> "$CONFFILE"
74 echo 'INHERIT += "poky-autobuild-notifier"' >> "$CONFFILE"
75 if [ "$ABTARGET" = "darwin" ]; then
76 echo 'PACKAGE_CLASSES += "package_tar"' >> "$CONFFILE"
77 echo "BBFILES += \"$CURRDIR/meta-darwin/packages/*/*.bb\"" >> "./conf/local.conf"
78 echo 'POKYMODE = "darwin"' >> "$CONFFILE"
79 echo 'DARWINFILES = "file:///srv/poky/sources/"' >> "$CONFFILE"
80 echo 'INHERIT_INSANE = ""' >> "$CONFFILE"
81 echo "FILESPATH_append = \":$CURRDIR/meta-darwin/files\"" >> "$CONFFILE"
82 fi
83fi
84
85if [ "$ABTARGET" = "darwin" ]; then
86 BBPATH=$CURRDIR/meta-darwin:$BBPATH
87fi
88
89bitbake $@
90
91retval=$?
92
93if [ "x$POSTPROCESS" != "x" ]; then
94 cd ..
95 $POSTPROCESS $ABTARGET $TARGETDIR
96fi
97
98exit $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 @@
1#!/bin/sh
2
3# Poky Automated Build Server Post Processing Script
4#
5# Copyright (C) 2006-2007 OpenedHand Ltd.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
21ABTARGET=$1
22TARGETDIR=$2
23
24cd ./build/tmp/deploy/
25
26LASTREV=`tail images/svninfo | grep Revision | cut -f 2 -d ' '`
27DEST=$TARGETDIR/$ABTARGET/$LASTREV/
28
29mkdir -p $DEST
30
31COMPRESS_FILES=()
32FILES=()
33
34if [ "x$ABTARGET" = "xpoky-bleeding" ]; then
35 COMPRESS_FILES=(
36 poky-image-sato-qemuarm-*.rootfs.ext2
37 )
38
39 FILES=(
40 svninfo
41 `readlink images/zImage-akita.bin`
42 `readlink images/zImage-qemuarm.bin`
43 updater.sh.akita
44 poky-image-sato-akita-*.rootfs.summary.jffs2
45 poky-image-sato-qemuarm-*.rootfs.tar.bz2
46 )
47fi
48
49if [ "x$ABTARGET" = "xtoolchain" ]; then
50 FILES=(
51 svninfo
52 poky-*-toolchain-*.tar.bz2
53 )
54fi
55
56if [ "x$ABTARGET" = "xpoky" ]; then
57 COMPRESS_FILES=(
58 poky-image-sdk-qemuarm-*.rootfs.ext2
59 poky-image-sdk-qemux86-*.rootfs.ext2
60 poky-image-minimal-qemuarm-*.rootfs.ext2
61 poky-image-minimal-qemux86-*.rootfs.ext2
62 poky-image-sato-cd-*.iso
63 )
64
65 FILES=(
66 svninfo
67 `readlink images/zImage-akita.bin`
68 `readlink images/zImage-c7x0.bin`
69 `readlink images/zImage-qemuarm.bin`
70 `readlink images/zImage-spitz.bin`
71 `readlink images/zImage-nokia800.bin`
72 `readlink images/bzImage-qemux86.bin`
73 `readlink images/bzImage-netbook.bin`
74 `readlink images/zImage-htcuniversal.bin`
75 `readlink images/zImage-mx31litekit.bin`
76 `readlink images/zImage-mx31ads.bin`
77 `readlink images/zImage-nokia770.bin`
78 `readlink images/zImage-zylonite.bin`
79 `readlink images/zImage-cm-x270.bin`
80 `readlink images/uImage-em-x270.bin`
81 `readlink images/uImage-mx31phy.bin`
82 `readlink images/uImage-neo1973-latest.bin`
83 `readlink images/uImage-om-gta01.bin`
84 `readlink images/uImage-om-gta02.bin`
85 updater.sh.akita
86 updater.sh.c7x0
87 updater.sh.spitz
88 gnu-tar
89 poky-image-live-netbook-*.hddimg
90 poky-image-minimal-live-netbook-*.hddimg
91 poky-image-sato-akita-*.rootfs.summary.jffs2
92 poky-image-sato-c7x0-*.rootfs.jffs2
93 poky-image-sato-spitz-*.rootfs.tar.gz
94 poky-image-sdk-qemuarm-*.rootfs.tar.bz2
95 poky-image-sdk-qemux86-*.rootfs.tar.bz2
96 poky-image-minimal-qemuarm-*.rootfs.tar.bz2
97 poky-image-minimal-qemux86-*.rootfs.tar.bz2
98 poky-image-sdk-spitz-*.rootfs.tar.gz
99 poky-image-sdk-nokia800-*.rootfs.jffs2
100 poky-image-sato-nokia770-*.rootfs.jffs2
101 poky-image-sato-zylonite-*.rootfs.jffs2
102 poky-image-sato-cm-x270-*.rootfs.jffs2
103 poky-image-sato-em-x270-*.rootfs.jffs2
104 poky-image-sato-mx31litekit-*.rootfs.tar.gz
105 poky-image-sato-htcuniversal-*.rootfs.tar.gz
106 poky-image-sato-om-gta01-*.rootfs.jffs2
107 poky-image-sato-om-gta02-*.rootfs.jffs2
108 poky-image-sato-mx31phy-*.jffs2
109 poky-image-sato-mx31ads-*.jffs2
110 `readlink images/updater-em-x270.ext2`
111 )
112fi
113
114for FILE in ${FILES[@]}; do
115 for FILE2 in `find -name $FILE`; do
116 if [ ! -e "$DEST/$FILE2" ]; then
117 cp $FILE2 $DEST
118 fi
119 done
120done
121
122for FILE in ${COMPRESS_FILES[@]}; do
123 for FILE2 in `find -name $FILE`; do
124 if [ ! -e "$DEST/$FILE2.bz2" ]; then
125 bzip2 $FILE2
126 cp $FILE2.bz2 $DEST
127 fi
128 done
129done
130
131if [ -e ./images/images-complete ]; then
132 touch $DEST/complete
133fi
134chmod a+w -R $DEST 2> /dev/null || true
135