mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
8cbd1ce1b8
commit
9160f37606
+10
-2
@@ -36,7 +36,6 @@ function webserverKillAll()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function webserverStartAll()
|
function webserverStartAll()
|
||||||
{
|
{
|
||||||
retval=0
|
retval=0
|
||||||
@@ -49,6 +48,14 @@ function webserverStartAll()
|
|||||||
return $retval
|
return $retval
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Helper functions to add a special configuration file
|
||||||
|
|
||||||
|
function addtoConfiguration()
|
||||||
|
{
|
||||||
|
echo "#Created by toaster start script" > ${BUILDDIR}/conf/$2
|
||||||
|
echo $1 >> ${BUILDDIR}/conf/$2
|
||||||
|
}
|
||||||
|
|
||||||
# define the stop command
|
# define the stop command
|
||||||
function stop_system()
|
function stop_system()
|
||||||
{
|
{
|
||||||
@@ -136,9 +143,10 @@ fi
|
|||||||
|
|
||||||
case $CMD in
|
case $CMD in
|
||||||
start )
|
start )
|
||||||
|
addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf
|
||||||
webserverStartAll || return 4
|
webserverStartAll || return 4
|
||||||
unset BBSERVER
|
unset BBSERVER
|
||||||
bitbake --server-only -t xmlrpc -B localhost:8200
|
bitbake --postread conf/toaster.conf --server-only -t xmlrpc -B localhost:8200
|
||||||
export BBSERVER=localhost:8200
|
export BBSERVER=localhost:8200
|
||||||
if [ $NOTOASTERUI == 0 ]; then # we start the TOASTERUI only if not inhibited
|
if [ $NOTOASTERUI == 0 ]; then # we start the TOASTERUI only if not inhibited
|
||||||
bitbake --observe-only -u toasterui >${BUILDDIR}/toaster_ui.log 2>&1 & echo $! >${BUILDDIR}/.toasterui.pid
|
bitbake --observe-only -u toasterui >${BUILDDIR}/toaster_ui.log 2>&1 & echo $! >${BUILDDIR}/.toasterui.pid
|
||||||
|
|||||||
Reference in New Issue
Block a user