diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/poky-autobuild-moblin | 98 | ||||
-rwxr-xr-x | scripts/poky-autobuild-postprocess-moblin | 135 |
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 | |||
21 | SRVWORKDIR=/home/buildbot | ||
22 | TARGETDIR=$SRVWORKDIR/autobuild-output | ||
23 | CURRDIR=`pwd` | ||
24 | if [ "$CURRDIR" = "$SRVWORKDIR/poky/full-shihtzu/build" ]; then | ||
25 | ABTARGET="poky" | ||
26 | elif [ "$CURRDIR" = "$SRVWORKDIR/poky/full-bleeding-shihtzu/build" ]; then | ||
27 | ABTARGET="poky-bleeding" | ||
28 | elif [ "$CURRDIR" = "$SRVWORKDIR/poky/toolchain-shihtzu/build" ]; then | ||
29 | ABTARGET="toolchain" | ||
30 | elif [ "$CURRDIR" = "$SRVWORKDIR/pokky/incremental-shihtzu/build" ]; then | ||
31 | ABTARGET="incremental" | ||
32 | elif [ "$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 | ||
41 | fi | ||
42 | |||
43 | if [ "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 | ||
48 | fi | ||
49 | |||
50 | BDIR="build" | ||
51 | . ./scripts/poky-env-internal | ||
52 | POSTPROCESS=`which poky-autobuild-postprocess-moblin` | ||
53 | |||
54 | if [ "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 | ||
62 | fi | ||
63 | |||
64 | CONFFILE="./conf/auto.conf" | ||
65 | |||
66 | if [ ! -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 | ||
83 | fi | ||
84 | |||
85 | if [ "$ABTARGET" = "darwin" ]; then | ||
86 | BBPATH=$CURRDIR/meta-darwin:$BBPATH | ||
87 | fi | ||
88 | |||
89 | bitbake $@ | ||
90 | |||
91 | retval=$? | ||
92 | |||
93 | if [ "x$POSTPROCESS" != "x" ]; then | ||
94 | cd .. | ||
95 | $POSTPROCESS $ABTARGET $TARGETDIR | ||
96 | fi | ||
97 | |||
98 | 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 @@ | |||
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 | |||
21 | ABTARGET=$1 | ||
22 | TARGETDIR=$2 | ||
23 | |||
24 | cd ./build/tmp/deploy/ | ||
25 | |||
26 | LASTREV=`tail images/svninfo | grep Revision | cut -f 2 -d ' '` | ||
27 | DEST=$TARGETDIR/$ABTARGET/$LASTREV/ | ||
28 | |||
29 | mkdir -p $DEST | ||
30 | |||
31 | COMPRESS_FILES=() | ||
32 | FILES=() | ||
33 | |||
34 | if [ "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 | ) | ||
47 | fi | ||
48 | |||
49 | if [ "x$ABTARGET" = "xtoolchain" ]; then | ||
50 | FILES=( | ||
51 | svninfo | ||
52 | poky-*-toolchain-*.tar.bz2 | ||
53 | ) | ||
54 | fi | ||
55 | |||
56 | if [ "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 | ) | ||
112 | fi | ||
113 | |||
114 | for 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 | ||
120 | done | ||
121 | |||
122 | for 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 | ||
129 | done | ||
130 | |||
131 | if [ -e ./images/images-complete ]; then | ||
132 | touch $DEST/complete | ||
133 | fi | ||
134 | chmod a+w -R $DEST 2> /dev/null || true | ||
135 | |||