aboutsummaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
stable/kirkstone-nutsystemd-systemctl: Fix WantedBy processingBob Henz92 min.
stable/scarthgap-nutoeqa/selftest/devtool: add test for updating local files into another layerJulien Stephan3 hours
jansa/mastercdrtools-native: fix build with gcc-14Martin Jansa4 hours
jansa/master-gcc14cdrtools-native: fix build with gcc-14Martin Jansa4 hours
jansa/artifactsu-boot.inc: don't replace the binary with symlinkMartin Jansa11 hours
stable/scarthgap-nextoeqa/selftest/debuginfod: use localpkgfeed to speed server startupRoss Burton21 hours
abelloni/master-nextncurses: Upgrade 6.4 -> 6.5Peter Marko36 hours
abelloni/master-next-successncurses: Upgrade 6.4 -> 6.5Peter Marko36 hours
jansa/kirkstoneqemux86: Add identical qemux86copy variant for testsMartin Jansa3 days
stable/kirkstone-nextlibpciaccess: Remove duplicated license entryBhabu Bindu10 days
[...]
 
TagDownloadAuthorAge
lucaceresoli/bug-15201-perf-libtraceevent-missingopenembedded-core-contrib-lucaceresoli/bug-15201-perf-libtraceevent-missing.tar.gz  Tom Hochstein9 months
 
AgeCommit messageAuthor
2014-11-21opkg-utils: fix double slash problem in update-alternativesChenQi/update-alternatives-double-slashChen Qi
2014-11-20gtk+: drop part of patch adding useless filePaul Eggleton
2014-11-20xmodmap: drop already applied patchPaul Eggleton
2014-11-20cmake: drop already applied patchesPaul Eggleton
2014-11-20openssh: drop already applied patchPaul Eggleton
2014-11-20cups: remove unrecognised optionRoss Burton
2014-11-20spdx.bbclass: improved error handling and code cleanupTobias Olausson
2014-11-20postinst-intercept: rename recipe for nativesdk onlyHongxu Jia
2014-11-20toolchain-shar-template.sh: fix the text files in the top dirRobert Yang
2014-11-20shadow-securetty: add ttyAM[0-3] serial portsJavier Viguera
[...]
 
Clone
git://git.openembedded.org/openembedded-core-contrib
https://git.openembedded.org/openembedded-core-contrib
https://git.openembedded.org/git/openembedded-core-contrib
nt-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/bin/bash
# (c) 2013 Intel Corp.

# 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


# This script enables toaster event logging and
# starts bitbake resident server
# use as:  source toaster [start|stop]

# Helper function to kill a background toaster development server

function webserverKillAll()
{
	local pidfile
	for pidfile in ${BUILDDIR}/.toastermain.pid; do
		if [ -f ${pidfile} ]; then
		while kill -0 $(< ${pidfile}) 2>/dev/null; do
			kill -SIGTERM -$(< ${pidfile}) 2>/dev/null
			sleep 1;
		done;
		rm  ${pidfile}
		fi
	done
}

function webserverStartAll()
{
        retval=0
        python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1
        python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2
        if [ $retval -eq 1 ]; then
                echo "Failed db sync, stopping system start" 1>&2
        elif [ $retval -eq 2 ]; then
            echo -e "\nError on migration, trying to recover... \n"
            python $BBBASEDIR/lib/toaster/manage.py migrate orm 0001_initial --fake
            retval=0
            python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1
        fi
        if [ $retval -eq 0 ]; then
            python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
            sleep 1
            if ! cat "${BUILDDIR}/.toastermain.pid" | xargs -I{} kill -0 {} ; then
                retval=1
                rm "${BUILDDIR}/.toastermain.pid"
            fi
        fi
        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
function stop_system()
{
    if [ -f ${BUILDDIR}/.toasterui.pid ]; then
        kill $(< ${BUILDDIR}/.toasterui.pid )
        rm ${BUILDDIR}/.toasterui.pid
    fi
    BBSERVER=localhost:8200 bitbake -m
    unset BBSERVER
    webserverKillAll
    # force stop any misbehaving bitbake server
    lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
}

# We make sure we're running in the current shell and in a good environment

if [ -z "$ZSH_NAME" ] && [ `basename \"$0\"` = `basename \"$BASH_SOURCE\"` ]; then
    echo "Error: This script needs to be sourced. Please run as 'source toaster [start|stop]'" 1>&2;
    exit 1
fi

if [ -z "$BUILDDIR" ] || [ -z `which bitbake` ]; then
    echo "Error: Build environment is not setup or bitbake is not in path." 1>&2;
    return 2
fi

BBBASEDIR=`dirname ${BASH_SOURCE}`/..


# Verify prerequisites

if ! echo "import django; print (1,5) == django.VERSION[0:2]" | python 2>/dev/null | grep True >/dev/null; then
    echo -e "This program needs Django 1.5. Please install with\n\nsudo pip install django==1.5"
    return 2
fi

if ! echo "import south; print [0,8,4] ==  map(int,south.__version__.split(\".\"))" | python 2>/dev/null | grep True >/dev/null; then
    echo -e "This program needs South 0.8.4. Please install with\n\nsudo pip install south==0.8.4"
    return 2
fi





# Determine the action. If specified by arguments, fine, if not, toggle it
if [ "x$1" == "xstart" ] || [ "x$1" == "xstop" ]; then
    CMD="$1"
else
    if [ -z "$BBSERVER" ]; then
        CMD="start"
    else
        CMD="stop"
    fi;
fi

NOTOASTERUI=0
for param in $*; do
    case $param in
    noui )
            NOTOASTERUI=1
    ;;
    esac
done

echo "The system will $CMD."

# Make sure it's safe to run by checking bitbake lock

lock=1
if [ -e $BUILDDIR/bitbake.lock ]; then
    (flock -n 200 ) 200<$BUILDDIR/bitbake.lock || lock=0
fi

if [ ${CMD} == "start" ] && ( [ $lock -eq 0 ] || [ -e $BUILDDIR/.toastermain.pid ] ); then
    echo "Error: bitbake lock state error. System is already on." 2>&1
    return 3
elif [ ${CMD} == "stop" ] && ( [ $lock -eq 1 ] || ! [ -e $BUILDDIR/.toastermain.pid ] ) ; then
    echo "Error: bitbake lock state error. Trying to stop a stopped system ?
If you think the system is hanged up, you can try to manually stop system with the commands

# BBSERVER=localhost:8200 bitbake -m

and

# webserverKillAll
" 2>&1
    return 3
fi





# Execute the commands

case $CMD in
    start )
        start_success=1
        addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf
        if ! webserverStartAll; then
            echo "Failed ${CMD}."
            return 4
        fi
        unset BBSERVER
        bitbake --postread conf/toaster.conf --server-only -t xmlrpc -B localhost:8200
        if [ $? -ne 0 ]; then
            start_success=0
            echo "Bitbake server start failed"
        else
            export BBSERVER=localhost:8200
            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
            fi
        fi
        if [ $start_success -eq 1 ]; then
            # set fail safe stop system on terminal exit
            trap stop_system SIGHUP
            echo "Successful ${CMD}."
        else
            # failed start, do stop
            stop_system
            echo "Failed ${CMD}."
        fi
    ;;
    stop )
        stop_system
        trap '' SIGHUP
        echo "Successful ${CMD}."
    ;;
esac