2006-11-23 12:15:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2008-04-29 21:01:34 +00:00
|
|
|
# Poky Automated Build Server Enviroment Setup Script
|
2006-11-23 12:15:17 +00:00
|
|
|
#
|
2007-05-16 13:48:29 +00:00
|
|
|
# Copyright (C) 2006-2007 OpenedHand Ltd.
|
2006-11-23 12:15:17 +00:00
|
|
|
#
|
|
|
|
# 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
|
2007-05-16 13:48:29 +00:00
|
|
|
|
2008-04-29 21:01:34 +00:00
|
|
|
TARGETDIR=/srv/poky/autobuild-output
|
|
|
|
CURRDIR=`pwd`
|
|
|
|
if [ "$CURRDIR" = "/srv/poky/autobuild/full-shihtzu/build" ]; then
|
|
|
|
ABTARGET="poky"
|
|
|
|
elif [ "$CURRDIR" = "/srv/poky/autobuild/full-bleeding-shihtzu/build" ]; then
|
|
|
|
ABTARGET="poky-bleeding"
|
|
|
|
elif [ "$CURRDIR" = "/srv/poky/autobuild/toolchain-shihtzu/build" ]; then
|
|
|
|
ABTARGET="toolchain"
|
|
|
|
elif [ "$CURRDIR" = "/srv/poky/autobuild/incremental-shihtzu/build" ]; then
|
|
|
|
ABTARGET="incremental"
|
2008-05-01 09:49:43 +00:00
|
|
|
elif [ "$CURRDIR" = "/srv/poky/autobuild/full-darwin-shihtzu/build" ]; then
|
|
|
|
ABTARGET="darwin"
|
2008-05-01 13:14:17 +00:00
|
|
|
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
|
2008-04-29 21:01:34 +00:00
|
|
|
fi
|
2006-11-23 12:15:17 +00:00
|
|
|
|
2007-03-23 10:58:00 +00:00
|
|
|
if [ "xpreamble" = "x$1" ]; then
|
|
|
|
mkdir -p ./build/tmp/deploy/images
|
2007-04-12 17:19:16 +00:00
|
|
|
rm -f ./build/tmp/deploy/images/images-complete
|
2007-10-05 14:17:08 +00:00
|
|
|
svn info > ./build/tmp/deploy/images/svninfo
|
2007-03-23 10:58:00 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2008-04-29 17:12:25 +00:00
|
|
|
BDIR="build"
|
2008-04-28 18:50:49 +00:00
|
|
|
. ./scripts/poky-env-internal
|
2008-04-28 16:40:06 +00:00
|
|
|
POSTPROCESS=`which poky-autobuild-postprocess`
|
|
|
|
|
2008-04-29 17:12:25 +00:00
|
|
|
if [ "xcomplete" = "x$1" ]; then
|
2008-04-28 20:19:50 +00:00
|
|
|
touch ./tmp/deploy/images/images-complete
|
|
|
|
chmod a+w ./tmp/deploy/images/images-complete
|
2007-10-05 12:40:19 +00:00
|
|
|
if [ "x$POSTPROCESS" != "x" ]; then
|
2008-04-29 21:01:34 +00:00
|
|
|
cd ..
|
|
|
|
$POSTPROCESS $ABTARGET $TARGETDIR
|
2007-10-05 12:40:19 +00:00
|
|
|
fi
|
2007-03-23 10:58:00 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2008-04-28 20:19:50 +00:00
|
|
|
CONFFILE="./conf/auto.conf"
|
2007-05-08 11:52:33 +00:00
|
|
|
|
|
|
|
if [ ! -e "$CONFFILE" ]; then
|
2008-04-28 20:19:50 +00:00
|
|
|
if [ ! -d "./conf" ]; then
|
|
|
|
mkdir -p "./conf"
|
2007-05-08 11:52:33 +00:00
|
|
|
fi
|
|
|
|
echo 'PACKAGE_CLASSES = "package_ipk package_deb"' > "$CONFFILE"
|
2007-11-27 14:48:42 +00:00
|
|
|
echo 'BB_NUMBER_THREADS = "6"' >> "$CONFFILE"
|
|
|
|
echo 'PARALLEL_MAKE = "-j 6"' >> "$CONFFILE"
|
2007-05-08 11:52:33 +00:00
|
|
|
echo 'DL_DIR = "/srv/poky/sources"' >> "$CONFFILE"
|
2008-05-01 09:49:43 +00:00
|
|
|
if [ "$ABTARGET" = "darwin" ]; then
|
2008-05-01 09:57:16 +00:00
|
|
|
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"
|
2008-05-01 10:16:16 +00:00
|
|
|
echo "FILESPATH_append = \":$CURRDIR/meta-darwin/files\"" >> "$CONFFILE"
|
2008-05-01 09:49:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$ABTARGET" = "darwin" ]; then
|
|
|
|
BBPATH=$CURRDIR/meta-darwin:$BBPATH
|
2007-05-08 11:52:33 +00:00
|
|
|
fi
|
|
|
|
|
2008-04-29 17:12:25 +00:00
|
|
|
bitbake $@
|
2008-04-28 16:40:06 +00:00
|
|
|
|
2008-04-30 13:10:28 +00:00
|
|
|
retval=$?
|
|
|
|
|
2008-04-28 16:40:06 +00:00
|
|
|
if [ "x$POSTPROCESS" != "x" ]; then
|
2008-04-29 21:01:34 +00:00
|
|
|
cd ..
|
|
|
|
$POSTPROCESS $ABTARGET $TARGETDIR
|
2008-04-28 16:40:06 +00:00
|
|
|
fi
|
|
|
|
|
2008-05-01 09:17:19 +00:00
|
|
|
exit $retval
|