diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-12-02 10:02:38 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-07 17:37:08 +0000 |
commit | 2a96d35893f2b9444033f6af8de1475f9c0aa974 (patch) | |
tree | af8d223d877bfcf4ba9d2ce3aefa3bce3f944662 /bitbake | |
parent | d87a5346cfd68bbf63a79b961c0501294dfd476d (diff) | |
download | poky-2a96d35893f2b9444033f6af8de1475f9c0aa974.tar.gz |
bitbake: toaster: check for toaster configuration later
Moved check for toasterconf.json after check of build environment.
We'll need some variables from build environment to find toasterconf.json
better way.
(Bitbake rev: a4f6809237dffb1abff78c6a8c82bcc4852aedfa)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/toaster | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 1ce4af7030..359b23d6a5 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster | |||
@@ -222,7 +222,6 @@ fi | |||
222 | # make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does. | 222 | # make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does. |
223 | export TOASTER_DIR=`pwd` | 223 | export TOASTER_DIR=`pwd` |
224 | 224 | ||
225 | |||
226 | NOBROWSER=0 | 225 | NOBROWSER=0 |
227 | 226 | ||
228 | for param in $*; do | 227 | for param in $*; do |
@@ -260,6 +259,30 @@ if [ -z "$BUILDDIR" ] || ! which bitbake >/dev/null 2>&1 ; then | |||
260 | return 2 | 259 | return 2 |
261 | fi | 260 | fi |
262 | 261 | ||
262 | # this is the configuraton file we are using for toaster | ||
263 | # note default is assuming yocto. Override this if you are | ||
264 | # running in a pure OE environment and use the toasterconf.json | ||
265 | # in meta/conf/toasterconf.json | ||
266 | # note: for future there are a number of relative path assumptions | ||
267 | # in the local layers that currently prevent using an arbitrary | ||
268 | # toasterconf.json | ||
269 | if [ "$TOASTER_CONF" = "" ]; then | ||
270 | TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json" | ||
271 | export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')") | ||
272 | fi | ||
273 | if [ ! -f $TOASTER_CONF ]; then | ||
274 | echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" | ||
275 | return 1 | ||
276 | fi | ||
277 | # this defines the dir toaster will use for | ||
278 | # 1) clones of layers (in _toaster_clones ) | ||
279 | # 2) the build dir (in build) | ||
280 | # 3) the sqlite db if that is being used. | ||
281 | # 4) pid's we need to clean up on exit/shutdown | ||
282 | # note: for future. in order to make this an arbitrary directory, we need to | ||
283 | # make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does. | ||
284 | export TOASTER_DIR=`pwd` | ||
285 | |||
263 | # Determine the action. If specified by arguments, fine, if not, toggle it | 286 | # Determine the action. If specified by arguments, fine, if not, toggle it |
264 | if [ "$1" = 'start' ] || [ "$1" = 'stop' ]; then | 287 | if [ "$1" = 'start' ] || [ "$1" = 'stop' ]; then |
265 | CMD="$1" | 288 | CMD="$1" |