summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/toaster
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin/toaster')
-rwxr-xr-xbitbake/bin/toaster33
1 files changed, 24 insertions, 9 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 71f882e744..abc8737a4d 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -175,6 +175,7 @@ else
175fi 175fi
176 176
177BBBASEDIR=`dirname $TOASTER`/.. 177BBBASEDIR=`dirname $TOASTER`/..
178OEROOT=`dirname $TOASTER`/../..
178 179
179RUNNING=0 180RUNNING=0
180 181
@@ -185,18 +186,33 @@ if [ "$WEB_PORT" = "" ]; then
185 WEB_PORT="8000" 186 WEB_PORT="8000"
186fi 187fi
187# this is the configuraton file we are using for toaster 188# this is the configuraton file we are using for toaster
188# note default is assuming yocto. Override this if you are 189# we are using the same logic that oe-setup-builddir uses
189# running in a pure OE environment and use the toasterconf.json 190# (based on TEMPLATECONF and .templateconf) to determine
190# in meta/conf/toasterconf.json 191# which toasterconf.json to use.
191# note: for future there are a number of relative path assumptions 192# note: There are a number of relative path assumptions
192# in the local layers that currently prevent using an arbitrary 193# in the local layers that currently make using an arbitrary
193# toasterconf.json 194# toasterconf.json difficult.
195
196. $OEROOT/.templateconf
197if [ -n "$TEMPLATECONF" ]; then
198 if [ ! -d "$TEMPLATECONF" ]; then
199 # Allow TEMPLATECONF=meta-xyz/conf as a shortcut
200 if [ -d "$OEROOT/$TEMPLATECONF" ]; then
201 TEMPLATECONF="$OEROOT/$TEMPLATECONF"
202 fi
203 if [ ! -d "$TEMPLATECONF" ]; then
204 echo >&2 "Error: '$TEMPLATECONF' must be a directory containing toasterconf.json"
205 [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1
206 fi
207 fi
208fi
209
194if [ "$TOASTER_CONF" = "" ]; then 210if [ "$TOASTER_CONF" = "" ]; then
195 TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json" 211 TOASTER_CONF="$TEMPLATECONF/toasterconf.json"
196 export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')") 212 export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')")
197fi 213fi
198if [ ! -f $TOASTER_CONF ]; then 214if [ ! -f $TOASTER_CONF ]; then
199 echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" 215 echo "$TOASTER_CONF configuration file not found. Set TOASTER_CONF to specify file or fix .templateconf"
200 [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1 216 [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1
201fi 217fi
202# this defines the dir toaster will use for 218# this defines the dir toaster will use for
@@ -324,4 +340,3 @@ case $CMD in
324 echo "Successful ${CMD}." 340 echo "Successful ${CMD}."
325 ;; 341 ;;
326esac 342esac
327