diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-11-01 15:58:35 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-04 09:36:22 +0000 |
| commit | 9160f376065752e2e92c8b37ee9a80d0eb86b53b (patch) | |
| tree | 145b7e1871d2d949ff03f08cd458fc572e313d73 /bitbake/bin | |
| parent | 8cbd1ce1b8ce9d76908d12a7ef8b08abb3cd658e (diff) | |
| download | poky-9160f376065752e2e92c8b37ee9a80d0eb86b53b.tar.gz | |
bitbake: toaster: enable required classes in the toaster startup script
In order to use toaster, now you have to set INHERIT+="toaster buildhistory"
To keep it simple, I've done some changes in order to automate it. When toaster
is started, this line is added to a new file called toaster.conf.
This file is passed to the bitbake server with the --postread parameter.
Based on a patch by Cristiana Voicu <cristiana.voicu@intel.com>
(Bitbake rev: 029e868044989eda370340f8bf4200cfd2670fca)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
| -rwxr-xr-x | bitbake/bin/toaster | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index cc631f6f56..d4715fa67b 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster | |||
| @@ -36,7 +36,6 @@ function webserverKillAll() | |||
| 36 | done | 36 | done |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | |||
| 40 | function webserverStartAll() | 39 | function webserverStartAll() |
| 41 | { | 40 | { |
| 42 | retval=0 | 41 | retval=0 |
| @@ -49,6 +48,14 @@ function webserverStartAll() | |||
| 49 | return $retval | 48 | return $retval |
| 50 | } | 49 | } |
| 51 | 50 | ||
| 51 | # Helper functions to add a special configuration file | ||
| 52 | |||
| 53 | function addtoConfiguration() | ||
| 54 | { | ||
| 55 | echo "#Created by toaster start script" > ${BUILDDIR}/conf/$2 | ||
| 56 | echo $1 >> ${BUILDDIR}/conf/$2 | ||
| 57 | } | ||
| 58 | |||
| 52 | # define the stop command | 59 | # define the stop command |
| 53 | function stop_system() | 60 | function stop_system() |
| 54 | { | 61 | { |
| @@ -136,9 +143,10 @@ fi | |||
| 136 | 143 | ||
| 137 | case $CMD in | 144 | case $CMD in |
| 138 | start ) | 145 | start ) |
| 146 | addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf | ||
| 139 | webserverStartAll || return 4 | 147 | webserverStartAll || return 4 |
| 140 | unset BBSERVER | 148 | unset BBSERVER |
| 141 | bitbake --server-only -t xmlrpc -B localhost:8200 | 149 | bitbake --postread conf/toaster.conf --server-only -t xmlrpc -B localhost:8200 |
| 142 | export BBSERVER=localhost:8200 | 150 | export BBSERVER=localhost:8200 |
| 143 | if [ $NOTOASTERUI == 0 ]; then # we start the TOASTERUI only if not inhibited | 151 | if [ $NOTOASTERUI == 0 ]; then # we start the TOASTERUI only if not inhibited |
| 144 | bitbake --observe-only -u toasterui >${BUILDDIR}/toaster_ui.log 2>&1 & echo $! >${BUILDDIR}/.toasterui.pid | 152 | bitbake --observe-only -u toasterui >${BUILDDIR}/toaster_ui.log 2>&1 & echo $! >${BUILDDIR}/.toasterui.pid |
