Compare commits

..

21 Commits

Author SHA1 Message Date
Alexandru DAMIAN
1182665de0 bitbake: cooker, toaster: variable definition tracking
In order to track the file where a configuration
variable was defined, this patch bring these changes:

* a new feature is defined in CookerFeatures, named
BASEDATASTORE_TRACKING. When a UI requests BASEDATASTORE_TRACKING,
the base variable definition are tracked when configuration
is parsed.

* getAllKeysWithFlags now includes variable history in the
data dump

* toaster_ui.py will record the operation, file path
and line number where the variable was changes

* toaster Simple UI will display the file path
and line number for Configuration page

There is a change in the models to accomodate the recording
of variable change history.

[YOCTO #5227]

(Bitbake rev: 78e58fed82f2a71f052485de0052d7b9cca53ffd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 12:18:03 +00:00
Cristiana Voicu
6302d1baf5 bitbake: toaster: task with outcome 2 (sstate), should have sstate_result!=0
0 (not applicable) is not a valid sstate_result for tasks with
outcome 2 (sstate), which should return 3 (restored), 2
(failed) or 1 (missed).
Sstate_result for tasks with outcome 2 is equal to the outcome
of _setscene corespondent task.

[YOCTO #5220]
(Bitbake rev: 8ff8d75318ea88ba80c744b471e486901ef6749a)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 12:17:50 +00:00
Alexandru DAMIAN
3390674247 bitbake: toaster: fix path to buildstats file
The buildstats file path changes based on the
optional PE variable that may be defined for a
recipe.

The toasterui simply ignored the PE value, and
as such it didn't correctly reach buildstats files
for some of the tasks.

This patch fixes the issue.

    [YOCTO #5073]

(Bitbake rev: 97b8ab88edc7c8dfb26b4cf305701ec96e52cc4f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 12:17:29 +00:00
Alexandru DAMIAN
0e6bbf8181 bitbake: toasterui: mark failed sceneQueue tasks as failed
This patch addresses an issue where a failed sceneQueue task
entry was not updated on the Fail event. As a result, it
always showed the task as not-available.

    [YOCTO #5216]

(Bitbake rev: 9b99a417f58381bac4bda412bcfd11de50403318)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 12:17:19 +00:00
Alexandru DAMIAN
3b113312fd bitbake: toaster: remove author field
The AUTHOR field in most recipes is not defined,
or it's not really consistently set in the metadata,
Also does it seem particularly useful.

This patch removes the AUTHOR variable from the
toaster system

    [YOCTO #5449]

(Bitbake rev: da3ac049300be84defab7b32b0b99ab07c7d0a27)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 12:17:09 +00:00
Alexandru DAMIAN
6f9c4d9778 bitbake: toaster: fix tasks showing as NoExec
Tasks without script type information showed by default
as NoExec; this happens for all Prebuild or Covered
tasks, as script type information comes only on TaskStarted
event. Such a default value may drive confusion, as NoExec value
should be reserved for the NoExec-flagged tasks.

This patch adds a new default value named Unknown that will be
used for all tasks that don't have script type information
available.

    [YOCTO #5327]

(Bitbake rev: ec6cac74290f0d4f5b60222019c23416b4b8e1ef)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 12:16:58 +00:00
Cristiana Voicu
f20de8ac90 bitbake: toaster: convert build_package size to bytes to keep consistence
[YOCTO #5503]
(Bitbake rev: 19eb6e01b675c439ff0a817be6fa5e34ad42ba37)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 12:16:38 +00:00
Alexandru DAMIAN
e5cf3e598e bitbake: toaster: fix target package information
Toaster needs to record information about packages
installed on a built target image, and dependencies
between these packages.

This patch fixes a bug where the variable from the
server wasn't read correctly leading which caused
the buildhistory to not be processed correctly.

Additionally, two display issues in the package table
were fixed, issues that lead to package information
being displayed incorrectly.

    [YOCTO #5197]

(Bitbake rev: ab4bc18409d80de6d069e3dd76c3c54964fe5764)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-05 12:50:58 +00:00
Cristiana Voicu
46814c99ee bitbake: toaster: add variable description for prefixed/suffixed variables
In the Configuration table, we need to link prefixed / suffixed
variables to the corresponding variable descriptions in documentation.conf.

[YOCTO #5198]

(Bitbake rev: 641d9c4fda5fe978154fdfab978c3c09e3906eab)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04 10:56:04 +00:00
Alexandru DAMIAN
b0c24033bb 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>
2013-11-04 10:55:54 +00:00
Alexandru DAMIAN
25f50e24c7 bitbake: toaster: server shutdown on terminal exit
If the terminal where the server was started is closed,
the bitbake server should shutdown. Currently the system
is left in hanging state.

This patch uses "trap" command to make sure the servers
are closed on terminal exit.

[YOCTO #5376]

(Bitbake rev: 5f8b97010f7b465753b6ff6275d18426006ee14b)

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>
2013-11-04 10:53:50 +00:00
Alexandru DAMIAN
a6b357a9af bitbake: toaster: fix timezone settings
This patch fixes an issue where, if not defined,
the timezone defaults to 'America/Chicago'.

The solution is to set the timezone to current computer's
timezone.

[YOCTO #5186]

(Bitbake rev: a4102b549f04a9b52cdcd318bf511a18ab48067d)

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>
2013-11-04 10:53:43 +00:00
Alexandru DAMIAN
57beaf994f bitbake: cooker: do not recreate recipecache in buildfile mode
When building a single file, the cooker will recreate
the recipecache from scratch.

I suspect this is a remnant of past code, since:
* the current recipecache works fine
* the new recipecache will not have all the fields as
requested by HOB_EXTRA_CACHES setting

This patch disables recreating the recipecache, leading
to shorter times when building single build files
(-b option) and better compatibility with Toaster.

(Bitbake rev: 618d69b00075981b8553513130d7deb1aed61578)

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>
2013-11-04 10:53:35 +00:00
Alexandru DAMIAN
e1aebfe018 bitbake: build, toaster: record proper task type
Bitbake tasks may be of type 'python' or 'shell',
or they may not be executed at all, which is record
as task type 'noexec'.

In order to record proper task type, this patch:

* creates no exec task type as the default value in
the toaster model definition

* adds full task flags to the bb.build.TaskStarted event
in build.py

* if the task actually starts, the toaster ui will
record the type of the task as either 'python' or 'shell'
based on the task flags.

[YOCTO #5073]
[YOCTO #5075]
[YOCTO #5327]

(Bitbake rev: 6648c57e6d369fc009ea3a9fe939def5d2c67bf5)

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>
2013-11-04 10:53:24 +00:00
Alexandru DAMIAN
f6847b0cd2 bitbake: cooker: add data to the dependency tree dump
Toaster needes to record extra data that needs to
be moved at the time of the dependency tree dump.

This data includes:
* layer priorities for recording in the layer section
* the inherit list for each PN which allows to determine
the type of the PN (regular package, image, etc).

This patch adds this data to the dependency tree dump.

(Bitbake rev: 7636aba37320aaf9b044d3832ddc21af51ccd69c)

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>
2013-11-04 10:53:12 +00:00
Alexandru DAMIAN
1e6e27d98d bitbake: toaster: fixes for null values from events
Some of the data values may come of as None through the event system,
and the UI would encounter a problem saving the Configuration.
It would be trying to save these values as NULL in the
database, which is not allowed.

This patch adds more verification for data coming through
the event system.

Other minor updates:
* update for the event model from toaster.bbclass
* minor code flow fix in the event system

(Bitbake rev: 03fafd086381723c6486522873671515824e49f2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04 10:52:59 +00:00
Alexandru DAMIAN
73293c6481 toaster: add class to dump toaster-tracked data
Adding a new bbclass that will collect and send relevant
data from the task context to the Toaster UI.

This bbclass consists of postfuncs that get executed
right after the main task func, and in the same context.
This allows data gathering in a synchronous manner during
the build, guaranteeing data integrity. This approach also
preserves the task signatures.

The data is moved to the UI through the event system.

There is no performance impact if the class is disabled.

License is MIT.

(From OE-Core rev: 1d2d37d579492b63d20ff8aa890a43b9a1576cf0)

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>
2013-11-04 10:52:45 +00:00
Belen Barros Pena
d7b8f82a64 documentation.conf: update contents
This patch updates descriptions and brings more
info for the variable configurations as documented
in the OE-Core manual.

This file is used by Toaster to display help for
the configuration variables.

(From OE-Core rev: 98405beddb93490c8a2e9903adc2a510969ed6a9)

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>
2013-11-04 10:52:39 +00:00
Alexandru DAMIAN
4b64eb444a bitbake: add Toaster UI interface
Adding a new bitbake UI interface named 'toasterui'.

'toasterui' listens for events and data coming from a
bitbake server during a run, and records it
in a data store using the Toaster object model.

Adds a helper class named BuildInfoHelper that
reconstructs the state of the bitbake server and
saves relevant data to the data store.

Code portions contributed by Calin Dragomir <calindragomir@gmail.com>.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-10-16 15:27:03 +01:00
Alexandru DAMIAN
db2a7845a9 bitbake: toaster: adding frameworks for the Simple UI
This commit adds the 3rd party frameworks used for the web UI.

jQuery is licensed under MIT.

Bootstrap is licensed under APACHE-2.0

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-10-16 15:26:52 +01:00
Alexandru DAMIAN
cb1338dedc bitbake: add toaster code to bitbake
This patch adds the Toaster component to Bitbake.

Toaster is a module designed to record the progress of a
Bitbake build, and data about the resultant artifacts.

It contains a web-based interface and a REST API allowing
post-facto inspection of the build process and artifacts.

Features present in this build:
* toaster start script
* relational data model
* Django boilerplate code
* the REST API
* the Simple UI web interface

This patch has all the development history squashed together.

Code portions contributed by Calin Dragomir <calindragomir@gmail.com>.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-10-16 15:26:37 +01:00
359 changed files with 11796 additions and 13008 deletions

10
bitbake/LICENSE Normal file
View File

@@ -0,0 +1,10 @@
BitBake is licensed under the GNU General Public License version 2.0. See COPYING for further details.
The following external components are distributed with this software:
* The Toaster Simple UI application is based upon the Django project template, the files of which are covered by the BSD license and are copyright (c) Django Software
Foundation and individual contributors.
* Twitter Bootstrap (including Glyphicons), redistributed under the Apache License 2.0.
* jQuery is redistributed under the MIT license.

View File

@@ -97,8 +97,7 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterror
except TypeError: except TypeError:
umask = taskdep['umask'][taskname] umask = taskdep['umask'][taskname]
# We can't use the fakeroot environment in a dry run as it possibly hasn't been built if 'fakeroot' in taskdep and taskname in taskdep['fakeroot']:
if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not cfg.dry_run:
envvars = (workerdata["fakerootenv"][fn] or "").split() envvars = (workerdata["fakerootenv"][fn] or "").split()
for key, value in (var.split('=') for var in envvars): for key, value in (var.split('=') for var in envvars):
envbackup[key] = os.environ.get(key) envbackup[key] = os.environ.get(key)

164
bitbake/bin/toaster Executable file
View File

@@ -0,0 +1,164 @@
#!/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
if [ $retval -eq 1 ]; then
echo "Failed db sync, stopping system start" 1>&2
else
python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
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,4,5) == django.VERSION[0:3]" | python 2>/dev/null | grep True >/dev/null; then
echo -e "This program needs Django 1.4.5. Please install with\n\nsudo pip install django==1.4.5"
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
if [ "x$2" == "xnoui" ]; then
NOTOASTERUI=1
fi
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 )
addtoConfiguration "INHERIT+=\"toaster buildhistory\"" toaster.conf
webserverStartAll || return 4
unset BBSERVER
bitbake --postread conf/toaster.conf --server-only -t xmlrpc -B localhost:8200
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
# stop system on terminal exit
trap stop_system SIGHUP
;;
stop )
stop_system
trap '' SIGHUP
;;
esac
echo "Successful ${CMD}."

View File

@@ -91,6 +91,9 @@ class TaskBase(event.Event):
class TaskStarted(TaskBase): class TaskStarted(TaskBase):
"""Task execution started""" """Task execution started"""
def __init__(self, t, logfile, taskflags, d):
super(TaskStarted, self).__init__(t, logfile, d)
self.taskflags = taskflags
class TaskSucceeded(TaskBase): class TaskSucceeded(TaskBase):
"""Task execution completed""" """Task execution completed"""
@@ -285,7 +288,7 @@ set -e
if bb.msg.loggerVerboseLogs: if bb.msg.loggerVerboseLogs:
script.write("set -x\n") script.write("set -x\n")
if cwd: if cwd:
script.write("cd '%s'\n" % cwd) script.write("cd %s\n" % cwd)
script.write("%s\n" % func) script.write("%s\n" % func)
script.write(''' script.write('''
# cleanup # cleanup
@@ -422,7 +425,9 @@ def _exec_task(fn, task, d, quieterr):
localdata.setVar('BB_LOGFILE', logfn) localdata.setVar('BB_LOGFILE', logfn)
localdata.setVar('BB_RUNTASK', task) localdata.setVar('BB_RUNTASK', task)
event.fire(TaskStarted(task, logfn, localdata), localdata) flags = localdata.getVarFlags(task)
event.fire(TaskStarted(task, logfn, flags, localdata), localdata)
try: try:
for func in (prefuncs or '').split(): for func in (prefuncs or '').split():
exec_func(func, localdata) exec_func(func, localdata)

View File

@@ -86,8 +86,6 @@ class Command:
def runAsyncCommand(self): def runAsyncCommand(self):
try: try:
if self.cooker.state == bb.cooker.state.error:
return False
if self.currentAsyncCommand is not None: if self.currentAsyncCommand is not None:
(command, options) = self.currentAsyncCommand (command, options) = self.currentAsyncCommand
commandmethod = getattr(CommandsAsync, command) commandmethod = getattr(CommandsAsync, command)

View File

@@ -61,7 +61,7 @@ class CollectionError(bb.BBHandledException):
""" """
class state: class state:
initial, parsing, running, shutdown, forceshutdown, stopped, error = range(7) initial, parsing, running, shutdown, forceshutdown, stopped = range(6)
class SkippedPackage: class SkippedPackage:
@@ -81,7 +81,7 @@ class SkippedPackage:
class CookerFeatures(object): class CookerFeatures(object):
_feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE] = range(2) _feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE, BASEDATASTORE_TRACKING] = range(3)
def __init__(self): def __init__(self):
self._features=set() self._features=set()
@@ -177,6 +177,9 @@ class BBCooker:
self.data.disableTracking() self.data.disableTracking()
def loadConfigurationData(self): def loadConfigurationData(self):
if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
self.enableDataTracking()
self.initConfigurationData() self.initConfigurationData()
self.databuilder.parseBaseConfiguration() self.databuilder.parseBaseConfiguration()
self.data = self.databuilder.data self.data = self.databuilder.data
@@ -189,6 +192,10 @@ class BBCooker:
bb.data.update_data(self.event_data) bb.data.update_data(self.event_data)
bb.parse.init_parser(self.event_data) bb.parse.init_parser(self.event_data)
if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
self.disableDataTracking()
def modifyConfigurationVar(self, var, val, default_file, op): def modifyConfigurationVar(self, var, val, default_file, op):
if op == "append": if op == "append":
self.appendConfigurationVar(var, val, default_file) self.appendConfigurationVar(var, val, default_file)
@@ -348,7 +355,6 @@ class BBCooker:
open(confpath, 'w').close() open(confpath, 'w').close()
def parseConfiguration(self): def parseConfiguration(self):
# Set log file verbosity # Set log file verbosity
verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0")) verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0"))
if verboselogs: if verboselogs:
@@ -511,6 +517,7 @@ class BBCooker:
depend_tree["packages"] = {} depend_tree["packages"] = {}
depend_tree["rdepends-pkg"] = {} depend_tree["rdepends-pkg"] = {}
depend_tree["rrecs-pkg"] = {} depend_tree["rrecs-pkg"] = {}
depend_tree["layer-priorities"] = self.recipecache.bbfile_config_priorities
for task in xrange(len(rq.rqdata.runq_fnid)): for task in xrange(len(rq.rqdata.runq_fnid)):
taskname = rq.rqdata.runq_task[task] taskname = rq.rqdata.runq_task[task]
@@ -522,6 +529,7 @@ class BBCooker:
depend_tree["pn"][pn] = {} depend_tree["pn"][pn] = {}
depend_tree["pn"][pn]["filename"] = fn depend_tree["pn"][pn]["filename"] = fn
depend_tree["pn"][pn]["version"] = version depend_tree["pn"][pn]["version"] = version
depend_tree["pn"][pn]["inherits"] = self.recipecache.inherits.get(fn, None)
# if we have extra caches, list all attributes they bring in # if we have extra caches, list all attributes they bring in
extra_info = [] extra_info = []
@@ -1083,7 +1091,6 @@ class BBCooker:
self.buildSetVars() self.buildSetVars()
self.recipecache = bb.cache.CacheData(self.caches_array)
infos = bb.cache.Cache.parse(fn, self.collection.get_file_appends(fn), \ infos = bb.cache.Cache.parse(fn, self.collection.get_file_appends(fn), \
self.data, self.data,
self.caches_array) self.caches_array)
@@ -1202,7 +1209,10 @@ class BBCooker:
try: try:
v = self.data.getVar(k, True) v = self.data.getVar(k, True)
if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart): if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart):
dump[k] = { 'v' : v } dump[k] = {
'v' : v ,
'history' : self.data.varhistory.variable(k),
}
for d in flaglist: for d in flaglist:
dump[k][d] = self.data.getVarFlag(k, d) dump[k][d] = self.data.getVarFlag(k, d)
except Exception as e: except Exception as e:
@@ -1321,7 +1331,6 @@ class BBCooker:
self.prhost = prserv.serv.auto_start(self.data) self.prhost = prserv.serv.auto_start(self.data)
except prserv.serv.PRServiceConfigError: except prserv.serv.PRServiceConfigError:
bb.event.fire(CookerExit(), self.event_data) bb.event.fire(CookerExit(), self.event_data)
self.state = state.error
return return
def post_serve(self): def post_serve(self):

View File

@@ -214,7 +214,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
o.write('unset %s\n' % varExpanded) o.write('unset %s\n' % varExpanded)
return 0 return 0
if val is None: if not val:
return 0 return 0
val = str(val) val = str(val)
@@ -229,7 +229,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
# if we're going to output this within doublequotes, # if we're going to output this within doublequotes,
# to a shell, we need to escape the quotes in the var # to a shell, we need to escape the quotes in the var
alter = re.sub('"', '\\"', val) alter = re.sub('"', '\\"', val.strip())
alter = re.sub('\n', ' \\\n', alter) alter = re.sub('\n', ' \\\n', alter)
o.write('%s="%s"\n' % (varExpanded, alter)) o.write('%s="%s"\n' % (varExpanded, alter))
return 0 return 0

View File

@@ -329,7 +329,7 @@ def decodeurl(url):
user, password, parameters). user, password, parameters).
""" """
m = re.compile('(?P<type>[^:]*)://((?P<user>[^/]+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url) m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
if not m: if not m:
raise MalformedUrl(url) raise MalformedUrl(url)
@@ -805,11 +805,7 @@ def try_mirror_url(newuri, origud, ud, ld, check = False):
dest = os.path.join(dldir, os.path.basename(ud.localpath)) dest = os.path.join(dldir, os.path.basename(ud.localpath))
if not os.path.exists(dest): if not os.path.exists(dest):
os.symlink(ud.localpath, dest) os.symlink(ud.localpath, dest)
if not os.path.exists(origud.donestamp) or origud.method.need_update(origud.url, origud, ld): return None
origud.method.download(origud.url, origud, ld)
if hasattr(origud.method,"build_mirror_data"):
origud.method.build_mirror_data(origud.url, origud, ld)
return ud.localpath
# Otherwise the result is a local file:// and we symlink to it # Otherwise the result is a local file:// and we symlink to it
if not os.path.exists(origud.localpath): if not os.path.exists(origud.localpath):
if os.path.islink(origud.localpath): if os.path.islink(origud.localpath):

View File

@@ -305,8 +305,8 @@ class Git(FetchMethod):
username = "" username = ""
basecmd = data.getVar("FETCHCMD_git", d, True) or "git" basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
cmd = "%s ls-remote %s://%s%s%s refs/heads/%s refs/tags/%s" % \ cmd = "%s ls-remote %s://%s%s%s %s" % \
(basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name], ud.branches[name]) (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
if ud.proto.lower() != 'file': if ud.proto.lower() != 'file':
bb.fetch2.check_network_access(d, cmd) bb.fetch2.check_network_access(d, cmd)
output = runfetchcmd(cmd, d, True) output = runfetchcmd(cmd, d, True)

View File

@@ -92,10 +92,7 @@ class Hg(FetchMethod):
if not ud.user: if not ud.user:
hgroot = host + ud.path hgroot = host + ud.path
else: else:
if ud.pswd: hgroot = ud.user + "@" + host + ud.path
hgroot = ud.user + ":" + ud.pswd + "@" + host + ud.path
else:
hgroot = ud.user + "@" + host + ud.path
if command == "info": if command == "info":
return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module) return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module)
@@ -115,10 +112,7 @@ class Hg(FetchMethod):
# do not pass options list; limiting pull to rev causes the local # do not pass options list; limiting pull to rev causes the local
# repo not to contain it and immediately following "update" command # repo not to contain it and immediately following "update" command
# will crash # will crash
if ud.user and ud.pswd: cmd = "%s pull" % (basecmd)
cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" pull" % (basecmd, ud.user, ud.pswd, proto)
else:
cmd = "%s pull" % (basecmd)
elif command == "update": elif command == "update":
cmd = "%s update -C %s" % (basecmd, " ".join(options)) cmd = "%s update -C %s" % (basecmd, " ".join(options))
else: else:

View File

@@ -112,7 +112,7 @@ class Perforce(FetchMethod):
base = path base = path
which = path.find('/...') which = path.find('/...')
if which != -1: if which != -1:
base = path[:which-1] base = path[:which]
base = self._strip_leading_slashes(base) base = self._strip_leading_slashes(base)

View File

@@ -27,7 +27,6 @@ import os
import sys import sys
import logging import logging
import bb import bb
import re
from bb import data from bb import data
from bb.fetch2 import FetchMethod from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError from bb.fetch2 import FetchError
@@ -92,8 +91,6 @@ class Svn(FetchMethod):
if command == "info": if command == "info":
svncmd = "%s info %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module) svncmd = "%s info %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module)
elif command == "log1":
svncmd = "%s log --limit 1 %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module)
else: else:
suffix = "" suffix = ""
if ud.revision: if ud.revision:
@@ -170,13 +167,14 @@ class Svn(FetchMethod):
""" """
Return the latest upstream revision number Return the latest upstream revision number
""" """
bb.fetch2.check_network_access(d, self._buildsvncommand(ud, d, "log1")) bb.fetch2.check_network_access(d, self._buildsvncommand(ud, d, "info"))
output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "log1"), d, True) output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "info"), d, True)
# skip the first line, as per output of svn log revision = None
# then we expect the revision on the 2nd line for line in output.splitlines():
revision = re.search('^r([0-9]*)', output.splitlines()[1]).group(1) if "Last Changed Rev" in line:
revision = line.split(":")[1].strip()
return revision return revision

View File

@@ -243,7 +243,7 @@ class diskMonitor:
# zero, this is a feature of the fs, we disable the inode # zero, this is a feature of the fs, we disable the inode
# checking for such a fs. # checking for such a fs.
if st.f_files == 0: if st.f_files == 0:
logger.info("Inode check for %s is unavaliable, will remove it from disk monitor" % path) logger.warn("Inode check for %s is unavaliable, will remove it from disk monitor" % path)
self.devDict[k][2] = None self.devDict[k][2] = None
continue continue
# Always show warning, the self.checked would always be False if the action is WARN # Always show warning, the self.checked would always be False if the action is WARN

View File

@@ -73,16 +73,8 @@ def update_mtime(f):
def mark_dependency(d, f): def mark_dependency(d, f):
if f.startswith('./'): if f.startswith('./'):
f = "%s/%s" % (os.getcwd(), f[2:]) f = "%s/%s" % (os.getcwd(), f[2:])
deps = (d.getVar('__depends') or []) deps = (d.getVar('__depends') or []) + [(f, cached_mtime(f))]
s = (f, cached_mtime_noerror(f)) d.setVar('__depends', deps)
if s not in deps:
deps.append(s)
d.setVar('__depends', deps)
def check_dependency(d, f):
s = (f, cached_mtime_noerror(f))
deps = (d.getVar('__depends') or [])
return s in deps
def supports(fn, data): def supports(fn, data):
"""Returns true if we have a handler for this file, false otherwise""" """Returns true if we have a handler for this file, false otherwise"""
@@ -110,14 +102,11 @@ def init_parser(d):
def resolve_file(fn, d): def resolve_file(fn, d):
if not os.path.isabs(fn): if not os.path.isabs(fn):
bbpath = d.getVar("BBPATH", True) bbpath = d.getVar("BBPATH", True)
newfn, attempts = bb.utils.which(bbpath, fn, history=True) newfn = bb.utils.which(bbpath, fn)
for af in attempts:
mark_dependency(d, af)
if not newfn: if not newfn:
raise IOError("file %s not found in %s" % (fn, bbpath)) raise IOError("file %s not found in %s" % (fn, bbpath))
fn = newfn fn = newfn
mark_dependency(d, fn)
if not os.path.isfile(fn): if not os.path.isfile(fn):
raise IOError("file %s not found" % fn) raise IOError("file %s not found" % fn)

View File

@@ -77,10 +77,7 @@ def inherit(files, fn, lineno, d):
if not os.path.isabs(file): if not os.path.isabs(file):
dname = os.path.dirname(fn) dname = os.path.dirname(fn)
bbpath = "%s:%s" % (dname, d.getVar("BBPATH", True)) bbpath = "%s:%s" % (dname, d.getVar("BBPATH", True))
abs_fn, attempts = bb.utils.which(bbpath, file, history=True) abs_fn = bb.utils.which(bbpath, file)
for af in attempts:
if af != abs_fn:
bb.parse.mark_dependency(d, af)
if abs_fn: if abs_fn:
file = abs_fn file = abs_fn

View File

@@ -82,15 +82,9 @@ def include(oldfn, fn, lineno, data, error_out):
if not os.path.isabs(fn): if not os.path.isabs(fn):
dname = os.path.dirname(oldfn) dname = os.path.dirname(oldfn)
bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True)) bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True))
abs_fn, attempts = bb.utils.which(bbpath, fn, history=True) abs_fn = bb.utils.which(bbpath, fn)
if abs_fn and bb.parse.check_dependency(data, abs_fn):
bb.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True)))
for af in attempts:
bb.parse.mark_dependency(data, af)
if abs_fn: if abs_fn:
fn = abs_fn fn = abs_fn
elif bb.parse.check_dependency(data, fn):
bb.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True)))
from bb.parse import handle from bb.parse import handle
try: try:
@@ -99,7 +93,6 @@ def include(oldfn, fn, lineno, data, error_out):
if error_out: if error_out:
raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno) raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
logger.debug(2, "CONF file '%s' not found", fn) logger.debug(2, "CONF file '%s' not found", fn)
bb.parse.mark_dependency(data, fn)
# We have an issue where a UI might want to enforce particular settings such as # We have an issue where a UI might want to enforce particular settings such as
# an empty DISTRO variable. If configuration files do something like assigning # an empty DISTRO variable. If configuration files do something like assigning

View File

@@ -1204,8 +1204,6 @@ class RunQueueExecuteTasks(RunQueueExecute):
self.stampcache = {} self.stampcache = {}
initial_covered = self.rq.scenequeue_covered.copy()
# Mark initial buildable tasks # Mark initial buildable tasks
for task in xrange(self.stats.total): for task in xrange(self.stats.total):
self.runq_running.append(0) self.runq_running.append(0)
@@ -1259,27 +1257,12 @@ class RunQueueExecuteTasks(RunQueueExecute):
except TypeError: except TypeError:
covered_remove = bb.utils.better_eval(call2, locs) covered_remove = bb.utils.better_eval(call2, locs)
def removecoveredtask(task): for task in covered_remove:
fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]] fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
taskname = self.rqdata.runq_task[task] + '_setscene' taskname = self.rqdata.runq_task[task] + '_setscene'
bb.build.del_stamp(taskname, self.rqdata.dataCache, fn) bb.build.del_stamp(taskname, self.rqdata.dataCache, fn)
self.rq.scenequeue_covered.remove(task)
toremove = covered_remove
for task in toremove:
logger.debug(1, 'Not skipping task %s due to setsceneverify', task) logger.debug(1, 'Not skipping task %s due to setsceneverify', task)
while toremove: self.rq.scenequeue_covered.remove(task)
covered_remove = []
for task in toremove:
removecoveredtask(task)
for deptask in self.rqdata.runq_depends[task]:
if deptask not in self.rq.scenequeue_covered:
continue
if deptask in toremove or deptask in covered_remove or deptask in initial_covered:
continue
logger.debug(1, 'Task %s depends on task %s so not skipping' % (task, deptask))
covered_remove.append(deptask)
toremove = covered_remove
logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered) logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
@@ -1408,7 +1391,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
bb.event.fire(startevent, self.cfgData) bb.event.fire(startevent, self.cfgData)
taskdep = self.rqdata.dataCache.task_deps[fn] taskdep = self.rqdata.dataCache.task_deps[fn]
if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: if 'fakeroot' in taskdep and taskname in taskdep['fakeroot']:
if not self.rq.fakeworker: if not self.rq.fakeworker:
self.rq.start_fakeworker(self) self.rq.start_fakeworker(self)
self.rq.fakeworker.stdin.write("<runtask>" + pickle.dumps((fn, task, taskname, False, self.cooker.collection.get_file_appends(fn))) + "</runtask>") self.rq.fakeworker.stdin.write("<runtask>" + pickle.dumps((fn, task, taskname, False, self.cooker.collection.get_file_appends(fn))) + "</runtask>")

View File

@@ -407,8 +407,7 @@ class URLHandle(unittest.TestCase):
datatable = { datatable = {
"http://www.google.com/index.html" : ('http', 'www.google.com', '/index.html', '', '', {}), "http://www.google.com/index.html" : ('http', 'www.google.com', '/index.html', '', '', {}),
"cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}), "cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}),
"cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}), "cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'})
"git://git.openembedded.org/bitbake;branch=@foo" : ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'})
} }
def test_decodeurl(self): def test_decodeurl(self):

View File

@@ -0,0 +1,738 @@
#
# BitBake ToasterUI Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import datetime
import sys
import bb
import re
import subprocess
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toaster.toastermain.settings")
import toaster.toastermain.settings as toaster_django_settings
from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage
from toaster.orm.models import Variable, VariableHistory
from toaster.orm.models import Target_Package, Build_Package, Build_File
from toaster.orm.models import Task_Dependency, Build_Package_Dependency
from toaster.orm.models import Target_Package_Dependency, Recipe_Dependency
from bb.msg import BBLogFormatter as format
class ORMWrapper(object):
""" This class creates the dictionaries needed to store information in the database
following the format defined by the Django models. It is also used to save this
information in the database.
"""
def __init__(self):
pass
def create_build_object(self, build_info):
build = Build.objects.create(
machine=build_info['machine'],
image_fstypes=build_info['image_fstypes'],
distro=build_info['distro'],
distro_version=build_info['distro_version'],
started_on=build_info['started_on'],
completed_on=build_info['completed_on'],
cooker_log_path=build_info['cooker_log_path'],
build_name=build_info['build_name'],
bitbake_version=build_info['bitbake_version'])
return build
def create_target_objects(self, target_info):
targets = []
for tgt_name in target_info['targets']:
tgt_object = Target.objects.create( build = target_info['build'],
target = tgt_name,
is_image = False,
file_name = "",
file_size = 0);
targets.append(tgt_object)
return targets
def update_build_object(self, build, errors, warnings, taskfailures):
outcome = Build.SUCCEEDED
if errors or taskfailures:
outcome = Build.FAILED
build.completed_on = datetime.datetime.now()
build.errors_no = errors
build.warnings_no = warnings
build.outcome = outcome
build.save()
def get_update_task_object(self, task_information):
task_object, created = Task.objects.get_or_create(
build=task_information['build'],
recipe=task_information['recipe'],
task_name=task_information['task_name'],
)
for v in vars(task_object):
if v in task_information.keys():
vars(task_object)[v] = task_information[v]
# if we got covered by a setscene task, we're SSTATE
if task_object.outcome == Task.OUTCOME_COVERED and 1 == Task.objects.filter(task_executed=True, build = task_object.build, recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").count():
task_object.outcome = Task.OUTCOME_SSTATE
outcome_task_setscene = Task.objects.get(task_executed=True, build = task_object.build,
recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").outcome
if outcome_task_setscene == Task.OUTCOME_SUCCESS:
task_object.sstate_result = Task.SSTATE_RESTORED
elif outcome_task_setscene == Task.OUTCOME_FAILED:
task_object.sstate_result = Task.SSTATE_FAILED
# mark down duration if we have a start time
if 'start_time' in task_information.keys():
duration = datetime.datetime.now() - task_information['start_time']
task_object.elapsed_time = duration.total_seconds()
task_object.save()
return task_object
def get_update_recipe_object(self, recipe_information):
recipe_object, created = Recipe.objects.get_or_create(
layer_version=recipe_information['layer_version'],
file_path=recipe_information['file_path'])
for v in vars(recipe_object):
if v in recipe_information.keys():
vars(recipe_object)[v] = recipe_information[v]
recipe_object.save()
return recipe_object
def get_layer_version_object(self, layer_version_information):
layer_version_object = Layer_Version.objects.get_or_create(
layer = layer_version_information['layer'],
branch = layer_version_information['branch'],
commit = layer_version_information['commit'],
priority = layer_version_information['priority']
)
layer_version_object[0].save()
return layer_version_object[0]
def get_update_layer_object(self, layer_information):
layer_object = Layer.objects.get_or_create(
name=layer_information['name'],
local_path=layer_information['local_path'],
layer_index_url=layer_information['layer_index_url'])
layer_object[0].save()
return layer_object[0]
def save_target_package_information(self, target_obj, packagedict, bldpkgs, recipes):
for p in packagedict:
packagedict[p]['object'] = Target_Package.objects.create( target = target_obj,
name = p,
size = packagedict[p]['size'])
if p in bldpkgs:
packagedict[p]['object'].version = bldpkgs[p]['version']
packagedict[p]['object'].recipe = recipes[bldpkgs[p]['pn']]
packagedict[p]['object'].save()
for p in packagedict:
for (px,deptype) in packagedict[p]['depends']:
Target_Package_Dependency.objects.create( package = packagedict[p]['object'],
depends_on = packagedict[px]['object'],
dep_type = deptype);
def create_logmessage(self, log_information):
log_object = LogMessage.objects.create(
build = log_information['build'],
level = log_information['level'],
message = log_information['message'])
for v in vars(log_object):
if v in log_information.keys():
vars(log_object)[v] = log_information[v]
return log_object.save()
def save_build_package_information(self, build_obj, package_info, recipes):
# create and save the object
bp_object = Build_Package.objects.create( build = build_obj,
recipe = recipes[package_info['PN']],
name = package_info['PKG'],
version = package_info['PKGV'],
revision = package_info['PKGR'],
summary = package_info['SUMMARY'],
description = package_info['DESCRIPTION'],
size = int(package_info['PKGSIZE']) * 1024,
section = package_info['SECTION'],
license = package_info['LICENSE'],
)
# save any attached file information
for path in package_info['FILES_INFO']:
fo = Build_File.objects.create( bpackage = bp_object,
path = path,
size = package_info['FILES_INFO'][path] )
# save soft dependency information
if 'RDEPENDS' in package_info and package_info['RDEPENDS']:
for p in bb.utils.explode_deps(package_info['RDEPENDS']):
Build_Package_Dependency.objects.get_or_create( package = bp_object,
depends_on = p, dep_type = Build_Package_Dependency.TYPE_RDEPENDS)
if 'RPROVIDES' in package_info and package_info['RPROVIDES']:
for p in bb.utils.explode_deps(package_info['RPROVIDES']):
Build_Package_Dependency.objects.get_or_create( package = bp_object,
depends_on = p, dep_type = Build_Package_Dependency.TYPE_RPROVIDES)
if 'RRECOMMENDS' in package_info and package_info['RRECOMMENDS']:
for p in bb.utils.explode_deps(package_info['RRECOMMENDS']):
Build_Package_Dependency.objects.get_or_create( package = bp_object,
depends_on = p, dep_type = Build_Package_Dependency.TYPE_RRECOMMENDS)
if 'RSUGGESTS' in package_info and package_info['RSUGGESTS']:
for p in bb.utils.explode_deps(package_info['RSUGGESTS']):
Build_Package_Dependency.objects.get_or_create( package = bp_object,
depends_on = p, dep_type = Build_Package_Dependency.TYPE_RSUGGESTS)
if 'RREPLACES' in package_info and package_info['RREPLACES']:
for p in bb.utils.explode_deps(package_info['RREPLACES']):
Build_Package_Dependency.objects.get_or_create( package = bp_object,
depends_on = p, dep_type = Build_Package_Dependency.TYPE_RREPLACES)
if 'RCONFLICTS' in package_info and package_info['RCONFLICTS']:
for p in bb.utils.explode_deps(package_info['RCONFLICTS']):
Build_Package_Dependency.objects.get_or_create( package = bp_object,
depends_on = p, dep_type = Build_Package_Dependency.TYPE_RCONFLICTS)
return bp_object
def save_build_variables(self, build_obj, vardump):
for k in vardump:
if not bool(vardump[k]['func']):
value = vardump[k]['v'];
if value is None:
value = ''
desc = vardump[k]['doc'];
if desc is None:
var_words = [word for word in k.split('_')]
root_var = "_".join([word for word in var_words if word.isupper()])
if root_var and root_var != k and root_var in vardump:
desc = vardump[root_var]['doc']
if desc is None:
desc = ''
variable_obj = Variable.objects.create( build = build_obj,
variable_name = k,
variable_value = value,
description = desc)
for vh in vardump[k]['history']:
VariableHistory.objects.create( variable = variable_obj,
file_name = vh['file'],
line_number = vh['line'],
operation = vh['op'])
class BuildInfoHelper(object):
""" This class gathers the build information from the server and sends it
towards the ORM wrapper for storing in the database
It is instantiated once per build
Keeps in memory all data that needs matching before writing it to the database
"""
def __init__(self, server, has_build_history = False):
self._configure_django()
self.internal_state = {}
self.task_order = 0
self.server = server
self.orm_wrapper = ORMWrapper()
self.has_build_history = has_build_history
self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0]
def _configure_django(self):
# Add toaster to sys path for importing modules
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'toaster'))
###################
## methods to convert event/external info into objects that the ORM layer uses
def _get_layer_dict(self, layer_path):
layer_info = {}
layer_name = layer_path.split('/')[-1]
layer_url = 'http://layers.openembedded.org/layerindex/layer/{layer}/'
layer_url_name = self._get_url_map_name(layer_name)
layer_info['name'] = layer_name
layer_info['local_path'] = layer_path
layer_info['layer_index_url'] = layer_url.format(layer=layer_url_name)
return layer_info
def _get_url_map_name(self, layer_name):
""" Some layers have a different name on openembedded.org site,
this method returns the correct name to use in the URL
"""
url_name = layer_name
url_mapping = {'meta': 'openembedded-core'}
for key in url_mapping.keys():
if key == layer_name:
url_name = url_mapping[key]
return url_name
def _get_layer_information(self):
layer_info = {}
return layer_info
def _get_layer_version_information(self, layer_object):
layer_version_info = {}
layer_version_info['build'] = self.internal_state['build']
layer_version_info['layer'] = layer_object
layer_version_info['branch'] = self._get_git_branch(layer_object.local_path)
layer_version_info['commit'] = self._get_git_revision(layer_object.local_path)
layer_version_info['priority'] = 0
return layer_version_info
def _get_git_branch(self, layer_path):
branch = subprocess.Popen("git symbolic-ref HEAD 2>/dev/null ", cwd=layer_path, shell=True, stdout=subprocess.PIPE).communicate()[0]
branch = branch.replace('refs/heads/', '').rstrip()
return branch
def _get_git_revision(self, layer_path):
revision = subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=layer_path, shell=True, stdout=subprocess.PIPE).communicate()[0].rstrip()
return revision
def _get_build_information(self):
build_info = {}
# Generate an identifier for each new build
build_info['machine'] = self.server.runCommand(["getVariable", "MACHINE"])[0]
build_info['distro'] = self.server.runCommand(["getVariable", "DISTRO"])[0]
build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0]
build_info['started_on'] = datetime.datetime.now()
build_info['completed_on'] = datetime.datetime.now()
build_info['image_fstypes'] = self._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_FSTYPES"])[0] or "")
build_info['cooker_log_path'] = self.server.runCommand(["getVariable", "BB_CONSOLELOG"])[0]
build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0]
build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0]
return build_info
def _get_task_information(self, event, recipe):
task_information = {}
task_information['build'] = self.internal_state['build']
task_information['outcome'] = Task.OUTCOME_NA
task_information['recipe'] = recipe
task_information['task_name'] = event.taskname
try:
# some tasks don't come with a hash. and that's ok
task_information['sstate_checksum'] = event.taskhash
except AttributeError:
pass
return task_information
def _get_layer_version_for_path(self, path):
def _slkey(layer_version):
return len(layer_version.layer.local_path)
# Heuristics: we always match recipe to the deepest layer path that
# we can match to the recipe file path
for bl in sorted(self.internal_state['layer_versions'], reverse=True, key=_slkey):
if (path.startswith(bl.layer.local_path)):
return bl
#TODO: if we get here, we didn't read layers correctly
assert False
return None
def _get_recipe_information_from_build_event(self, event):
layer_version_obj = self._get_layer_version_for_path(re.split(':', event.taskfile)[-1])
recipe_info = {}
recipe_info['layer_version'] = layer_version_obj
recipe_info['file_path'] = re.split(':', event.taskfile)[-1]
return recipe_info
def _get_task_build_stats(self, task_object):
bs_path = self._get_path_information(task_object)
for bp in bs_path: # TODO: split for each target
task_build_stats = self._get_build_stats_from_file(bp, task_object.task_name)
return task_build_stats
def _get_path_information(self, task_object):
build_stats_format = "{tmpdir}/buildstats/{target}-{machine}/{buildname}/{package}/"
build_stats_path = []
for t in self.internal_state['targets']:
target = t.target
machine = self.internal_state['build'].machine
buildname = self.internal_state['build'].build_name
pe, pv = task_object.recipe.version.split(":",1)
if len(pe) > 0:
package = task_object.recipe.name + "-" + pe + "_" + pv
else:
package = task_object.recipe.name + "-" + pv
build_stats_path.append(build_stats_format.format(tmpdir=self.tmp_dir, target=target,
machine=machine, buildname=buildname,
package=package))
return build_stats_path
def _get_build_stats_from_file(self, bs_path, task_name):
task_bs_filename = str(bs_path) + str(task_name)
task_bs = open(task_bs_filename, 'r')
cpu_usage = 0
disk_io = 0
startio = ''
endio = ''
for line in task_bs.readlines():
if line.startswith('CPU usage: '):
cpu_usage = line[11:]
elif line.startswith('EndTimeIO: '):
endio = line[11:]
elif line.startswith('StartTimeIO: '):
startio = line[13:]
task_bs.close()
if startio and endio:
disk_io = int(endio.strip('\n ')) - int(startio.strip('\n '))
if cpu_usage:
cpu_usage = float(cpu_usage.strip('% \n'))
task_build_stats = {'cpu_usage': cpu_usage, 'disk_io': disk_io}
return task_build_stats
def _remove_redundant(self, string):
ret = []
for i in string.split():
if i not in ret:
ret.append(i)
return " ".join(ret)
################################
## external available methods to store information
def store_layer_info(self):
layers = self.server.runCommand(["getVariable", "BBLAYERS"])[0].strip().split(" ")
self.internal_state['layers'] = []
for layer_path in { l for l in layers if len(l) }:
layer_information = self._get_layer_dict(layer_path)
self.internal_state['layers'].append(self.orm_wrapper.get_update_layer_object(layer_information))
def store_started_build(self, event):
build_information = self._get_build_information()
build_obj = self.orm_wrapper.create_build_object(build_information)
self.internal_state['build'] = build_obj
# create target information
target_information = {}
target_information['targets'] = event.getPkgs()
target_information['build'] = build_obj
self.internal_state['targets'] = self.orm_wrapper.create_target_objects(target_information)
# Load layer information for the build
self.internal_state['layer_versions'] = []
for layer_object in self.internal_state['layers']:
layer_version_information = self._get_layer_version_information(layer_object)
self.internal_state['layer_versions'].append(self.orm_wrapper.get_layer_version_object(layer_version_information))
del self.internal_state['layers']
# Save build configuration
self.orm_wrapper.save_build_variables(build_obj, self.server.runCommand(["getAllKeysWithFlags", ["doc", "func"]])[0])
def update_build_information(self, event, errors, warnings, taskfailures):
if 'build' in self.internal_state:
self.orm_wrapper.update_build_object(self.internal_state['build'], errors, warnings, taskfailures)
def store_started_task(self, event):
identifier = event.taskfile + event.taskname
recipe_information = self._get_recipe_information_from_build_event(event)
recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
task_information = self._get_task_information(event, recipe)
task_information['outcome'] = Task.OUTCOME_NA
if isinstance(event, bb.runqueue.runQueueTaskSkipped):
task_information['task_executed'] = False
if event.reason == "covered":
task_information['outcome'] = Task.OUTCOME_COVERED
if event.reason == "existing":
task_information['outcome'] = Task.OUTCOME_EXISTING
else:
task_information['task_executed'] = True
if 'noexec' in vars(event) and event.noexec == True:
task_information['script_type'] = Task.CODING_NOEXEC
self.task_order += 1
task_information['order'] = self.task_order
task_obj = self.orm_wrapper.get_update_task_object(task_information)
self.internal_state[identifier] = {'start_time': datetime.datetime.now()}
def update_and_store_task(self, event):
identifier = event.taskfile + event.taskname
recipe_information = self._get_recipe_information_from_build_event(event)
recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
task_information = self._get_task_information(event,recipe)
try:
task_information['start_time'] = self.internal_state[identifier]['start_time']
except:
pass
if 'logfile' in vars(event):
task_information['logfile'] = event.logfile
if '_message' in vars(event):
task_information['message'] = event._message
if 'taskflags' in vars(event):
# with TaskStarted, we get even more information
if 'python' in event.taskflags.keys() and event.taskflags['python'] == '1':
task_information['script_type'] = Task.CODING_PYTHON
else:
task_information['script_type'] = Task.CODING_SHELL
if isinstance(event, (bb.runqueue.runQueueTaskCompleted, bb.runqueue.sceneQueueTaskCompleted)):
task_information['outcome'] = Task.OUTCOME_SUCCESS
task_build_stats = self._get_task_build_stats(self.orm_wrapper.get_update_task_object(task_information))
task_information['cpu_usage'] = task_build_stats['cpu_usage']
task_information['disk_io'] = task_build_stats['disk_io']
del self.internal_state[identifier]
if isinstance(event, (bb.runqueue.runQueueTaskFailed, bb.runCommand.sceneQueueTaskFailed)):
task_information['outcome'] = Task.OUTCOME_FAILED
del self.internal_state[identifier]
self.orm_wrapper.get_update_task_object(task_information)
def read_target_package_dep_data(self, event):
# for all targets
for target in self.internal_state['targets']:
# verify that we have something to read
if not target.is_image or not self.has_build_history:
print "not collecting package info ", target.is_image, self.has_build_history
break
# TODO this is a temporary replication of the code in buildhistory.bbclass
# This MUST be changed to query the actual BUILD_DIR_IMAGE in the target context when
# the capability will be implemented in Bitbake
MACHINE_ARCH, error = self.server.runCommand(['getVariable', 'MACHINE_ARCH'])
TCLIBC, error = self.server.runCommand(['getVariable', 'TCLIBC'])
BUILDHISTORY_DIR, error = self.server.runCommand(['getVariable', 'BUILDHISTORY_DIR'])
BUILDHISTORY_DIR_IMAGE = "%s/images/%s/%s/%s" % (BUILDHISTORY_DIR, MACHINE_ARCH, TCLIBC, target.target)
self.internal_state['packages'] = {}
with open("%s/installed-package-sizes.txt" % BUILDHISTORY_DIR_IMAGE, "r") as fin:
for line in fin:
line = line.rstrip(";")
psize, px = line.split("\t")
punit, pname = px.split(" ")
self.internal_state['packages'][pname.strip()] = {'size':int(psize)*1024, 'depends' : []}
with open("%s/depends.dot" % BUILDHISTORY_DIR_IMAGE, "r") as fin:
p = re.compile(r' -> ')
dot = re.compile(r'.*style=dotted')
for line in fin:
line = line.rstrip(';')
linesplit = p.split(line)
if len(linesplit) == 2:
pname = linesplit[0].rstrip('"').strip('"')
dependsname = linesplit[1].split(" ")[0].strip().strip(";").strip('"').rstrip('"')
deptype = Target_Package_Dependency.TYPE_DEPENDS
if dot.match(line):
deptype = Target_Package_Dependency.TYPE_RECOMMENDS
if not pname in self.internal_state['packages']:
self.internal_state['packages'][pname] = {'size': 0, 'depends' : []}
if not dependsname in self.internal_state['packages']:
self.internal_state['packages'][dependsname] = {'size': 0, 'depends' : []}
self.internal_state['packages'][pname]['depends'].append((dependsname, deptype))
self.orm_wrapper.save_target_package_information(target,
self.internal_state['packages'],
self.internal_state['bldpkgs'], self.internal_state['recipes'])
def store_dependency_information(self, event):
# save layer version priorities
if 'layer-priorities' in event._depgraph.keys():
for lv in event._depgraph['layer-priorities']:
(name, path, regexp, priority) = lv
layer_version_obj = self._get_layer_version_for_path(path[1:]) # paths start with a ^
assert layer_version_obj is not None
layer_version_obj.priority = priority
layer_version_obj.save()
# save build time package information
self.internal_state['bldpkgs'] = {}
for pkg in event._depgraph['packages']:
self.internal_state['bldpkgs'][pkg] = event._depgraph['packages'][pkg]
# save recipe information
self.internal_state['recipes'] = {}
for pn in event._depgraph['pn']:
file_name = re.split(':', event._depgraph['pn'][pn]['filename'])[-1]
layer_version_obj = self._get_layer_version_for_path(re.split(':', file_name)[-1])
assert layer_version_obj is not None
recipe_info = {}
recipe_info['name'] = pn
recipe_info['version'] = event._depgraph['pn'][pn]['version']
recipe_info['layer_version'] = layer_version_obj
recipe_info['summary'] = event._depgraph['pn'][pn]['summary']
recipe_info['license'] = event._depgraph['pn'][pn]['license']
recipe_info['description'] = event._depgraph['pn'][pn]['description']
recipe_info['section'] = event._depgraph['pn'][pn]['section']
recipe_info['licensing_info'] = 'Not Available'
recipe_info['homepage'] = event._depgraph['pn'][pn]['homepage']
recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker']
recipe_info['file_path'] = file_name
recipe = self.orm_wrapper.get_update_recipe_object(recipe_info)
if 'inherits' in event._depgraph['pn'][pn].keys():
recipe.is_image = True in map(lambda x: x.endswith('image.bbclass'), event._depgraph['pn'][pn]['inherits'])
else:
recipe.is_image = False
if recipe.is_image:
for t in self.internal_state['targets']:
if pn == t.target:
t.is_image = True
t.save()
self.internal_state['recipes'][pn] = recipe
# save recipe dependency
# buildtime
for recipe in event._depgraph['depends']:
try:
target = self.internal_state['recipes'][recipe]
for dep in event._depgraph['depends'][recipe]:
dependency = self.internal_state['recipes'][dep]
Recipe_Dependency.objects.get_or_create( recipe = target,
depends_on = dependency, dep_type = Recipe_Dependency.TYPE_DEPENDS)
except KeyError: # we'll not get recipes for key w/ values listed in ASSUME_PROVIDED
pass
# runtime
for recipe in event._depgraph['rdepends-pn']:
try:
target = self.internal_state['recipes'][recipe]
for dep in event._depgraph['rdepends-pn'][recipe]:
dependency = self.internal_state['recipes'][dep]
Recipe_Dependency.objects.get_or_create( recipe = target,
depends_on = dependency, dep_type = Recipe_Dependency.TYPE_RDEPENDS)
except KeyError: # we'll not get recipes for key w/ values listed in ASSUME_PROVIDED
pass
# save all task information
def _save_a_task(taskdesc):
spec = re.split(r'\.', taskdesc);
pn = ".".join(spec[0:-1])
taskname = spec[-1]
e = event
e.taskname = pn
recipe = self.internal_state['recipes'][pn]
task_info = self._get_task_information(e, recipe)
task_info['task_name'] = taskname
task_obj = self.orm_wrapper.get_update_task_object(task_info)
return task_obj
for taskdesc in event._depgraph['tdepends']:
target = _save_a_task(taskdesc)
for taskdesc1 in event._depgraph['tdepends'][taskdesc]:
dep = _save_a_task(taskdesc1)
Task_Dependency.objects.get_or_create( task = target, depends_on = dep )
def store_build_package_information(self, event):
package_info = event.data
self.orm_wrapper.save_build_package_information(self.internal_state['build'],
package_info,
self.internal_state['recipes'],
)
def _store_log_information(self, level, text):
log_information = {}
log_information['build'] = self.internal_state['build']
log_information['level'] = level
log_information['message'] = text
self.orm_wrapper.create_logmessage(log_information)
def store_log_info(self, text):
self._store_log_information(LogMessage.INFO, text)
def store_log_warn(self, text):
self._store_log_information(LogMessage.WARNING, text)
def store_log_error(self, text):
self._store_log_information(LogMessage.ERROR, text)
def store_log_event(self, event):
# look up license files info from insane.bbclass
m = re.match("([^:]*): md5 checksum matched for ([^;]*)", event.msg)
if m:
(pn, fn) = m.groups()
self.internal_state['recipes'][pn].licensing_info = fn
self.internal_state['recipes'][pn].save()
if event.levelno < format.WARNING:
return
if not 'build' in self.internal_state:
return
log_information = {}
log_information['build'] = self.internal_state['build']
if event.levelno >= format.ERROR:
log_information['level'] = LogMessage.ERROR
elif event.levelno == format.WARNING:
log_information['level'] = LogMessage.WARNING
log_information['message'] = event.msg
log_information['pathname'] = event.pathname
log_information['lineno'] = event.lineno
self.orm_wrapper.create_logmessage(log_information)

View File

@@ -199,9 +199,7 @@ class PackageListModel(gtk.ListStore):
return self.cmp_vals(val1, val2, user_data) return self.cmp_vals(val1, val2, user_data)
def cmp_vals(self, val1, val2, user_data): def cmp_vals(self, val1, val2, user_data):
if val1 is None or val2 is None: if val1.startswith(user_data) and not val2.startswith(user_data):
return 0
elif val1.startswith(user_data) and not val2.startswith(user_data):
return -1 return -1
elif not val1.startswith(user_data) and val2.startswith(user_data): elif not val1.startswith(user_data) and val2.startswith(user_data):
return 1 return 1
@@ -577,9 +575,7 @@ class RecipeListModel(gtk.ListStore):
return self.cmp_vals(val1, val2, user_data) return self.cmp_vals(val1, val2, user_data)
def cmp_vals(self, val1, val2, user_data): def cmp_vals(self, val1, val2, user_data):
if val1 is None or val2 is None: if val1.startswith(user_data) and not val2.startswith(user_data):
return 0
elif val1.startswith(user_data) and not val2.startswith(user_data):
return -1 return -1
elif not val1.startswith(user_data) and val2.startswith(user_data): elif not val1.startswith(user_data) and val2.startswith(user_data):
return 1 return 1

View File

@@ -355,9 +355,9 @@ class ImageDetailsPage (HobPage):
vallist.append(base_image) vallist.append(base_image)
i = 0 i = 0
for layer in layers: for layer in layers:
varlist.append(" - ")
if i > layer_num_limit: if i > layer_num_limit:
break break
varlist.append(" - ")
i += 1 i += 1
vallist.append("") vallist.append("")
i = 0 i = 0

View File

@@ -0,0 +1,272 @@
#
# BitBake ToasterUI Implementation
# based on (No)TTY UI Implementation by Richard Purdie
#
# Handling output to TTYs or files (no TTY)
#
# Copyright (C) 2006-2012 Richard Purdie
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from __future__ import division
try:
import bb
except RuntimeError as exc:
sys.exit(str(exc))
from bb.ui import uihelper
from bb.ui.buildinfohelper import BuildInfoHelper
import bb.msg
import copy
import fcntl
import logging
import os
import progressbar
import signal
import struct
import sys
import time
import xmlrpclib
featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING]
logger = logging.getLogger("BitBake")
interactive = sys.stdout.isatty()
def _log_settings_from_server(server):
# Get values of variables which control our output
includelogs, error = server.runCommand(["getVariable", "BBINCLUDELOGS"])
if error:
logger.error("Unable to get the value of BBINCLUDELOGS variable: %s" % error)
raise BaseException(error)
loglines, error = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
if error:
logger.error("Unable to get the value of BBINCLUDELOGS_LINES variable: %s" % error)
raise BaseException(error)
return includelogs, loglines
def main(server, eventHandler, params ):
includelogs, loglines = _log_settings_from_server(server)
# verify and warn
build_history_enabled = True
inheritlist, error = server.runCommand(["getVariable", "INHERIT"])
if not "buildhistory" in inheritlist.split(" "):
logger.warn("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.")
build_history_enabled = False
helper = uihelper.BBUIHelper()
console = logging.StreamHandler(sys.stdout)
format_str = "%(levelname)s: %(message)s"
format = bb.msg.BBLogFormatter(format_str)
bb.msg.addDefaultlogFilter(console)
console.setFormatter(format)
logger.addHandler(console)
if not params.observe_only:
logger.error("ToasterUI can only work in observer mode")
return
main.shutdown = 0
interrupted = False
return_value = 0
errors = 0
warnings = 0
taskfailures = []
buildinfohelper = BuildInfoHelper(server, build_history_enabled)
buildinfohelper.store_layer_info()
while True:
try:
event = eventHandler.waitEvent(0.25)
if event is None:
if main.shutdown > 0:
break
continue
helper.eventHandler(event)
if isinstance(event, bb.event.BuildStarted):
buildinfohelper.store_started_build(event)
if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
buildinfohelper.update_and_store_task(event)
continue
if isinstance(event, bb.event.LogExecTTY):
logger.warn(event.msg)
continue
if isinstance(event, logging.LogRecord):
buildinfohelper.store_log_event(event)
if event.levelno >= format.ERROR:
errors = errors + 1
return_value = 1
elif event.levelno == format.WARNING:
warnings = warnings + 1
# For "normal" logging conditions, don't show note logs from tasks
# but do show them if the user has changed the default log level to
# include verbose/debug messages
if event.taskpid != 0 and event.levelno <= format.NOTE:
continue
logger.handle(event)
continue
if isinstance(event, bb.build.TaskFailed):
buildinfohelper.update_and_store_task(event)
return_value = 1
logfile = event.logfile
if logfile and os.path.exists(logfile):
bb.error("Logfile of failure stored in: %s" % logfile)
continue
# these events are unprocessed now, but may be used in the future to log
# timing and error informations from the parsing phase in Toaster
if isinstance(event, bb.event.ParseStarted):
continue
if isinstance(event, bb.event.ParseProgress):
continue
if isinstance(event, bb.event.ParseCompleted):
continue
if isinstance(event, bb.event.CacheLoadStarted):
continue
if isinstance(event, bb.event.CacheLoadProgress):
continue
if isinstance(event, bb.event.CacheLoadCompleted):
continue
if isinstance(event, bb.event.MultipleProviders):
continue
if isinstance(event, bb.event.NoProvider):
return_value = 1
errors = errors + 1
if event._runtime:
r = "R"
else:
r = ""
if event._dependees:
text = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
else:
text = "Nothing %sPROVIDES '%s'" % (r, event._item)
logger.error(text)
if event._reasons:
for reason in event._reasons:
logger.error("%s", reason)
text += reason
buildinfohelper.store_log_error(text)
continue
if isinstance(event, bb.event.ConfigParsed):
continue
if isinstance(event, bb.event.RecipeParsed):
continue
# end of saved events
if isinstance(event, (bb.runqueue.sceneQueueTaskStarted, bb.runqueue.runQueueTaskStarted, bb.runqueue.runQueueTaskSkipped)):
buildinfohelper.store_started_task(event)
continue
if isinstance(event, bb.runqueue.runQueueTaskCompleted):
buildinfohelper.update_and_store_task(event)
continue
if isinstance(event, bb.runqueue.runQueueTaskFailed):
buildinfohelper.update_and_store_task(event)
taskfailures.append(event.taskstring)
logger.error("Task %s (%s) failed with exit code '%s'",
event.taskid, event.taskstring, event.exitcode)
continue
if isinstance(event, (bb.runqueue.sceneQueueTaskCompleted, bb.runqueue.sceneQueueTaskFailed)):
buildinfohelper.update_and_store_task(event)
continue
if isinstance(event, (bb.event.TreeDataPreparationStarted, bb.event.TreeDataPreparationCompleted)):
continue
if isinstance(event, (bb.event.BuildCompleted)):
buildinfohelper.read_target_package_dep_data(event)
buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
continue
if isinstance(event, (bb.command.CommandCompleted,
bb.command.CommandFailed,
bb.command.CommandExit)):
buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
# we start a new build info
errors = 0
warnings = 0
taskfailures = []
buildinfohelper = BuildInfoHelper(server, build_history_enabled)
buildinfohelper.store_layer_info()
continue
if isinstance(event, bb.event.MetadataEvent):
if event.type == "SinglePackageInfo":
buildinfohelper.store_build_package_information(event)
continue
# ignore
if isinstance(event, (bb.event.BuildBase,
bb.event.StampUpdate,
bb.event.RecipePreFinalise,
bb.runqueue.runQueueEvent,
bb.runqueue.runQueueExitWait,
bb.event.OperationProgress,
bb.command.CommandFailed,
bb.command.CommandExit,
bb.command.CommandCompleted,
bb.cooker.CookerExit)):
continue
if isinstance(event, bb.event.DepTreeGenerated):
buildinfohelper.store_dependency_information(event)
continue
logger.error("Unknown event: %s", event)
except EnvironmentError as ioerror:
# ignore interrupted io
if ioerror.args[0] == 4:
pass
except KeyboardInterrupt:
main.shutdown = 1
pass
except Exception as e:
logger.error(e)
import traceback
traceback.print_exc()
pass
if interrupted:
if return_value == 0:
return_value = 1
return return_value

View File

@@ -793,28 +793,22 @@ def copyfile(src, dest, newmtime = None, sstat = None):
newmtime = sstat[stat.ST_MTIME] newmtime = sstat[stat.ST_MTIME]
return newmtime return newmtime
def which(path, item, direction = 0, history = False): def which(path, item, direction = 0):
""" """
Locate a file in a PATH Locate a file in a PATH
""" """
hist = []
paths = (path or "").split(':') paths = (path or "").split(':')
if direction != 0: if direction != 0:
paths.reverse() paths.reverse()
for p in paths: for p in paths:
next = os.path.join(p, item) next = os.path.join(p, item)
hist.append(next)
if os.path.exists(next): if os.path.exists(next):
if not os.path.isabs(next): if not os.path.isabs(next):
next = os.path.abspath(next) next = os.path.abspath(next)
if history:
return next, hist
return next return next
if history:
return "", hist
return "" return ""
def to_boolean(string, default=None): def to_boolean(string, default=None):

View File

View File

@@ -0,0 +1,37 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.conf.urls import patterns, include, url
urlpatterns = patterns('bldviewer.views',
url(r'^builds$', 'model_explorer', {'model_name':'build'}, name='builds'),
url(r'^targets$', 'model_explorer', {'model_name':'target'}, name='targets'),
url(r'^tasks$', 'model_explorer', {'model_name':'task'}, name='task'),
url(r'^task_dependencies$', 'model_explorer', {'model_name':'task_dependency'}, name='task_dependencies'),
url(r'^packages$', 'model_explorer', {'model_name':'build_package'}, name='build_packages'),
url(r'^package_dependencies$', 'model_explorer', {'model_name':'build_package_dependency'}, name='build_package_dependencies'),
url(r'^target_packages$', 'model_explorer', {'model_name':'target_package'}, name='target_packages'),
url(r'^package_files$', 'model_explorer', {'model_name':'build_file'}, name='build_files'),
url(r'^layers$', 'model_explorer', {'model_name':'layer'}, name='layer'),
url(r'^layerversions$', 'model_explorer', {'model_name':'layerversion'}, name='layerversion'),
url(r'^recipes$', 'model_explorer', {'model_name':'recipe'}, name='recipe'),
url(r'^recipe_dependencies$', 'model_explorer', {'model_name':'recipe_dependency'}, name='recipe_dependencies'),
url(r'^variables$', 'model_explorer', {'model_name':'variable'}, name='variables'),
url(r'^logmessages$', 'model_explorer', {'model_name':'logmessage'}, name='logmessages'),
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,30 @@
<!DOCTYPE html>
{% load static %}
<html>
<head>
<title>Toaster Simple Explorer</title>
<script src="{% static 'js/jquery-2.0.3.js' %}">
</script>
<script src="{% static 'js/bootstrap.js' %}">
</script>
<link href="{% static 'css/bootstrap.css' %}" rel="stylesheet" type="text/css">
</head>
<body style="height: 100%">
<div style="width:100%; height: 100%; position:absolute">
<div style="width: 100%; height: 3em" class="nav">
<ul class="nav nav-tabs">
<li><a href="{% url all-builds %}">All Builds</a></li>
<li><a href="{% url all-layers %}">All Layers</a></li>
</ul>
</div>
<div style="overflow-y:scroll; width: 100%; position: absolute; top: 3em; bottom:70px ">
{% block pagecontent %}
{% endblock %}
</div>
<div class="navbar" style="position: absolute; bottom: 0; width:100%"><br/>About Toaster | Yocto Project </div>
</div>
</body>
</html>

View File

@@ -0,0 +1,17 @@
{% extends "basetable.html" %}
{% block pagename %}
<ul class="nav nav-tabs" style="display: inline-block">
<li><a>Build {{build.target_set.all|join:"&nbsp;"}} at {{build.started_on}} : </a></li>
<li><a href="{% url task build.id %}"> Tasks </a></li>
<li><a href="{% url bpackage build.id %}"> Build Packages </a></li>
{% for t in build.target_set.all %}
{% if t.is_image %}
<li><a href="{% url tpackage build.id t.pk %}"> Packages for {{t.target}} </a> </li>
{% endif %}
{% endfor %}
<li><a href="{% url configuration build.id %}"> Configuration </a> </li>
</ul>
<h1>Toaster - Build {% block pagetitle %} {% endblock %}</h1>
{% endblock %}

View File

@@ -0,0 +1,46 @@
{% extends "base.html" %}
{% block pagecontent %}
<script>
function showhideTableColumn(i, sh) {
if (sh)
$('td:nth-child('+i+'),th:nth-child('+i+')').show();
else
$('td:nth-child('+i+'),th:nth-child('+i+')').hide();
}
function filterTableRows(test) {
if (test.length > 0) {
var r = test.split(/[ ,]+/).map(function (e) { return new RegExp(e, 'i') });
$('tr.data').map( function (i, el) {
(! r.map(function (j) { return j.test($(el).html())}).reduce(function (c, p) { return c && p;} )) ? $(el).hide() : $(el).show();
});
} else
{
$('tr.data').show();
}
}
</script>
<div style="margin-bottom: 0.5em">
{% block pagename %}
{% endblock %}
<div align="left" style="display:inline-block; width: 40%; margin-left: 2em"> Search: <input type="search" id="filterstring" style="width: 80%" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off">
</div>
{% if hideshowcols %}
<div align="right" style="display: inline-block; width: 40%">Show/Hide columns:
{% for i in hideshowcols %}
<span>{{i.name}} <input type="checkbox" id="ct{{i.name}}" onchange="showhideTableColumn({{i.order}}, $('#ct{{i.name}}').is(':checked'))" checked autocomplete="off"></span> |
{% endfor %}
</div>
{% endif %}
</div>
<div>
<table class="table table-striped table-condensed" style="width:95%">
{% block pagetable %}
{% endblock %}
</table>
</div>
{% endblock %}

View File

@@ -0,0 +1,24 @@
{% extends "basebuildpage.html" %}
{% block pagetitle %}Files for package {{files.0.bpackage.name}} {% endblock %}
{% block pagetable %}
{% if not files %}
<p>No files were recorded for this package!</p>
{% else %}
<tr>
<th>Name</th>
<th>Size (Bytes)</th>
</tr>
{% for file in files %}
<tr class="data">
<td>{{file.path}}</td>
<td>{{file.size}}</td>
{% endfor %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,44 @@
{% extends "basebuildpage.html" %}
{% block pagetitle %}Packages{% endblock %}
{% block pagetable %}
{% if not packages %}
<p>No packages were recorded for this target!</p>
{% else %}
<tr>
<th>Name</th>
<th>Version</th>
<th>Recipe</th>
<th>Summary</th>
<th>Section</th>
<th>Description</th>
<th>Size on host disk (Bytes)</th>
<th>License</th>
<th>Dependencies List (all)</th>
</tr>
{% for package in packages %}
<tr class="data">
<td><a name="#{{package.name}}" href="{% url bfile build.pk package.pk %}">{{package.name}} ({{package.filelist_bpackage.count}} files)</a></td>
<td>{{package.version}}-{{package.revision}}</td>
<td><a href="{% url layer_versions_recipes package.recipe.layer_version_id %}#{{package.recipe.name}}">{{package.recipe.name}}</a>{{package.package_name}}</a></td>
<td>{{package.summary}}</td>
<td>{{package.section}}</td>
<td>{{package.description}}</td>
<td>{{package.size}}</td>
<td>{{package.license}}</td>
<td>
<div style="height: 3em; overflow:auto">
{% for bpd in package.bpackage_dependencies_package.all %}
{{bpd.dep_type}}: {{bpd.depends_on}} <br/>
{% endfor %}
</div>
</td>
{% endfor %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,43 @@
{% extends "basetable.html" %}
{% block pagename %}
<h1>Toaster - Builds</h1>
{% endblock %}
{% block pagetable %}
{% load projecttags %}
<tr>
<th>Outcome</th>
<th>Started On</th>
<th>Completed On</th>
<th>Target</th>
<th>Machine</th>
<th>Time</th>
<th>Errors</th>
<th>Warnings</th>
<th>Output</th>
<th>Log</th>
<th>Bitbake Version</th>
<th>Build Name</th>
</tr>
{% for build in builds %}
<tr class="data">
<td><a href="{% url configuration build.id %}">{{build.get_outcome_display}}</a></td>
<td>{{build.started_on}}</td>
<td>{{build.completed_on}}</td>
<td>{% for t in build.target_set.all %}<a href="{% url tpackage build.id t.id %}">{{t.target}}</a>{% if t.is_image %} (Img){% endif %}<br/>{% endfor %}</td>
<td>{{build.machine}}</td>
<td>{% time_difference build.started_on build.completed_on %}</td>
<td>{{build.errors_no}}:{% if build.errors_no %}{% for error in logs %}{% if error.build == build %}{% if error.level == 2 %}<p>{{error.message}}</p>{% endif %}{% endif %}{% endfor %}{% else %}None{% endif %}</td>
<td>{{build.warnings_no}}:{% if build.warnings_no %}{% for warning in logs %}{% if warning.build == build %}{% if warning.level == 1 %}<p>{{warning.message}}</p>{% endif %}{% endif %}{% endfor %}{% else %}None{% endif %}</td>
<td>{% if build.outcome == 0 %}{% for t in build.target_set.all %}{% if t.is_image %}{{build.image_fstypes}}{% endif %}{% endfor %}{% endif %}</td>
<td>{{build.cooker_log_path}}</td>
<td>{{build.bitbake_version}}</td>
<td>{{build.build_name}}</td>
</tr>
{% endfor %}
{% endblock %}

View File

@@ -0,0 +1,22 @@
{% extends "basebuildpage.html" %}
{% block pagetitle %}Configuration{% endblock %}
{% block pagetable %}
<tr>
<th>Name</th>
<th>Description</th>
<th>Definition history</th>
<th>Value</th>
</tr>
{% for variable in configuration %}
<tr class="data">
<td>{{variable.variable_name}}</td>
<td>{% if variable.description %}{{variable.description}}{% endif %}</td>
<td>{% for vh in variable.variablehistory_set.all %}{{vh.operation}} in {{vh.file_name}}:{{vh.line_number}}<br/>{%endfor%}</td>
<td>{{variable.variable_value}}</td>
{% endfor %}
{% endblock %}

View File

@@ -0,0 +1,34 @@
{% extends "basetable.html" %}
{% block pagename %}
<h1>Toaster - Layers</h1>
{% endblock %}
{% block pagetable %}
{% load projecttags %}
<tr>
<th>Name</th>
<th>Local Path</th>
<th>Layer Index URL</th>
<th>Known Versions</th>
</tr>
{% for layer in layers %}
<tr class="data">
<td>{{layer.name}}</td>
<td>{{layer.local_path}}</td>
<td><a href='{{layer.layer_index_url}}'>{{layer.layer_index_url}}</a></td>
<td><table>
{% for lv in layer.versions %}
<tr><td>
<a href="{% url layer_versions_recipes lv.id %}">({{lv.priority}}){{lv.branch}}:{{lv.commit}} ({{lv.count}} recipes)</a>
</td></tr>
{% endfor %}
</table></td>
</tr>
{% endfor %}
{% endblock %}

View File

@@ -0,0 +1,36 @@
{% extends "basebuildpage.html" %}
{% block pagetable %}
{% if not packages %}
<p>No packages were recorded for this target!</p>
{% else %}
<tr>
<th>Name</th>
<th>Version</th>
<th>Size (Bytes)</th>
<th>Recipe</th>
<th>Depends on</th>
</tr>
{% for package in packages %}
<tr class="data">
<td><a name="#{{package.name}}">{{package.name}}</a></td>
<td>{{package.version}}</td>
<td>{{package.size}}</td>
<td>{%if package.recipe %}<a name="{{package.recipe.name}}.{{package.package_name}}">
<a href="{% url layer_versions_recipes package.recipe.layer_version_id %}#{{package.recipe.name}}">{{package.recipe.name}}</a>{{package.package_name}}</a>{%endif%}</td>
<td>
<div style="height: 4em; overflow:auto">
{% for d in package.tpackage_dependencies_package.all %}
<a href="#{{d.name}}">{{d.depends_on.name}}</a><br/>
{% endfor %}
</div>
</td>
{% endfor %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,53 @@
{% extends "basetable.html" %}
{% block pagename %}
<ul class="nav nav-tabs" style="display: inline-block">
<li><a>Layer {{layer_version.layer.name}}&nbsp;:&nbsp;{{layer_version.branch}}&nbsp;:&nbsp;{{layer_version.commit}}&nbsp;:&nbsp;{{layer_version.priority}}</a></li>
</ul>
<h1>Toaster - Recipes for a Layer</h1>
{% endblock %}
{% block pagetable %}
{% load projecttags %}
<tr>
</tr>
<th>Name</th>
<th>Version</th>
<th>Summary</th>
<th>Description</th>
<th>Section</th>
<th>License</th>
<th>License file</th>
<th>Homepage</th>
<th>Bugtracker</th>
<th>Author</th>
<th>File_path</th>
<th style="width: 30em">Recipe Dependency</th>
{% for recipe in recipes %}
<tr class="data">
<td><a name="{{recipe.name}}">{{recipe.name}}</a></td>
<td>{{recipe.version}}</td>
<td>{{recipe.summary}}</td>
<td>{{recipe.description}}</td>
<td>{{recipe.section}}</td>
<td>{{recipe.license}}</td>
<td>{{recipe.licensing_info}}</td>
<td>{{recipe.homepage}}</td>
<td>{{recipe.bugtracker}}</td>
<td>{{recipe.file_path}}</td>
<td>
<div style="height: 5em; overflow:auto">
{% for rr in recipe.r_dependencies_recipe.all %}
<a href="#{{rr.depends_on.name}}">{{rr.depends_on.name}}</a><br/>
{% endfor %}
</div>
</td>
</tr>
{% endfor %}
{% endblock %}

View File

@@ -0,0 +1,63 @@
{% extends "basebuildpage.html" %}
{% block pagetitle %}Tasks{% endblock %}
{% block pagetable %}
{% if not tasks %}
<p>No tasks were executed in this build!</p>
{% else %}
<tr>
<th>Order</th>
<th>Task</th>
<th>Recipe Version</th>
<th>Task Type</th>
<th>Checksum</th>
<th>Outcome</th>
<th>Message</th>
<th>Logfile</th>
<th>Time</th>
<th>CPU usage</th>
<th>Disk I/O</th>
<th>Script type</th>
<th>File path</th>
<th>Depends</th>
</tr>
{% for task in tasks %}
<tr class="data">
<td>{{task.order}}</td>
<td><a name="{{task.recipe.name}}.{{task.task_name}}">
<a href="{% url layer_versions_recipes task.recipe.layer_version_id %}#{{task.recipe.name}}">{{task.recipe.name}}</a>.{{task.task_name}}</a></td>
<td>{{task.recipe.version}}</td>
{% if task.task_executed %}
<td>Executed</td>
{% else %}
<td>Prebuilt</td>
{% endif %}
<td>{{task.sstate_checksum}}</td>
<td>{{task.get_outcome_display}}{% if task.provider %}</br>(by <a href="#{{task.provider.recipe.name}}.{{task.provider.task_name}}">{{task.provider.recipe.name}}.{{task.provider.task_name}}</a>){% endif %}</td>
<td><p>{{task.message}}</td>
<td><a target="_fileview" href="file:///{{task.logfile}}">{{task.logfile}}</a></td>
<td>{{task.elapsed_time}}</td>
<td>{{task.cpu_usage}}</td>
<td>{{task.disk_io}}</td>
<td>{{task.get_script_type_display}}</td>
<td><a target="_fileview" href="file:///{{task.recipe.file_path}}">{{task.recipe.file_path}}</a></td>
<td>
<div style="height: 3em; overflow:auto">
{% for tt in task.task_dependencies_task.all %}
<a href="#{{tt.depends_on.recipe.name}}.{{tt.depends_on.task_name}}">
{{tt.depends_on.recipe.name}}.{{tt.depends_on.task_name}}</a><br/>
{% endfor %}
</div>
</td>
</tr>
{% endfor %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,26 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from datetime import datetime
from django import template
register = template.Library()
@register.simple_tag
def time_difference(start_time, end_time):
return end_time - start_time

View File

@@ -0,0 +1,32 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.conf.urls import patterns, include, url
from django.views.generic.simple import redirect_to
urlpatterns = patterns('bldviewer.views',
url(r'^builds/$', 'build', name='all-builds'),
url(r'^build/(?P<build_id>\d+)/task/$', 'task', name='task'),
url(r'^build/(?P<build_id>\d+)/packages/$', 'bpackage', name='bpackage'),
url(r'^build/(?P<build_id>\d+)/package/(?P<package_id>\d+)/files/$', 'bfile', name='bfile'),
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/packages/$', 'tpackage', name='tpackage'),
url(r'^build/(?P<build_id>\d+)/configuration/$', 'configuration', name='configuration'),
url(r'^layers/$', 'layer', name='all-layers'),
url(r'^layerversions/(?P<layerversion_id>\d+)/recipes/.*$', 'layer_versions_recipes', name='layer_versions_recipes'),
url(r'^$', redirect_to, {'url': 'builds/'}),
)

View File

@@ -0,0 +1,260 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import operator
from django.db.models import Q
from django.shortcuts import render
from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, Target_Package, LogMessage, Variable
from orm.models import Task_Dependency, Recipe_Dependency, Build_Package, Build_File, Build_Package_Dependency
from django.views.decorators.cache import cache_control
@cache_control(no_store=True)
def build(request):
template = 'build.html'
build_info = Build.objects.all()
logs = LogMessage.objects.all()
context = {'builds': build_info, 'logs': logs ,
'hideshowcols' : [
{'name': 'Output', 'order':10},
{'name': 'Log', 'order':11},
]}
return render(request, template, context)
def _find_task_revdep(task):
tp = []
for p in Task_Dependency.objects.filter(depends_on=task):
tp.append(p.task);
return tp
def _find_task_provider(task):
task_revdeps = _find_task_revdep(task)
for tr in task_revdeps:
if tr.outcome != Task.OUTCOME_COVERED:
return tr
for tr in task_revdeps:
trc = _find_task_provider(tr)
if trc is not None:
return trc
return None
def task(request, build_id):
template = 'task.html'
tasks = Task.objects.filter(build=build_id)
for t in tasks:
if t.outcome == Task.OUTCOME_COVERED:
t.provider = _find_task_provider(t)
context = {'build': Build.objects.filter(pk=build_id)[0], 'tasks': tasks}
return render(request, template, context)
def configuration(request, build_id):
template = 'configuration.html'
variables = Variable.objects.filter(build=build_id)
context = {'build': Build.objects.filter(pk=build_id)[0], 'configuration' : variables}
return render(request, template, context)
def bpackage(request, build_id):
template = 'bpackage.html'
packages = Build_Package.objects.filter(build = build_id)
context = {'build': Build.objects.filter(pk=build_id)[0], 'packages' : packages}
return render(request, template, context)
def bfile(request, build_id, package_id):
template = 'bfile.html'
files = Build_File.objects.filter(bpackage = package_id)
context = {'build': Build.objects.filter(pk=build_id)[0], 'files' : files}
return render(request, template, context)
def tpackage(request, build_id, target_id):
template = 'package.html'
packages = Target_Package.objects.filter(target=target_id)
context = {'build' : Build.objects.filter(pk=build_id)[0],'packages': packages}
return render(request, template, context)
def layer(request):
template = 'layer.html'
layer_info = Layer.objects.all()
for li in layer_info:
li.versions = Layer_Version.objects.filter(layer = li)
for liv in li.versions:
liv.count = Recipe.objects.filter(layer_version__id = liv.id).count()
context = {'layers': layer_info}
return render(request, template, context)
def layer_versions_recipes(request, layerversion_id):
template = 'recipe.html'
recipes = Recipe.objects.filter(layer_version__id = layerversion_id)
context = {'recipes': recipes,
'layer_version' : Layer_Version.objects.filter( id = layerversion_id )[0]
}
return render(request, template, context)
#### API
import json
from django.core import serializers
from django.http import HttpResponse, HttpResponseBadRequest
def model_explorer(request, model_name):
DESCENDING = 'desc'
response_data = {}
model_mapping = {
'build': Build,
'target': Target,
'target_package': Target_Package,
'task': Task,
'task_dependency': Task_Dependency,
'package': Build_Package,
'layer': Layer,
'layerversion': Layer_Version,
'recipe': Recipe,
'recipe_dependency': Recipe_Dependency,
'build_package': Build_Package,
'build_package_dependency': Build_Package_Dependency,
'build_file': Build_File,
'variable': Variable,
'logmessage': LogMessage,
}
if model_name not in model_mapping.keys():
return HttpResponseBadRequest()
model = model_mapping[model_name]
try:
limit = int(request.GET.get('limit', 0))
except ValueError:
limit = 0
try:
offset = int(request.GET.get('offset', 0))
except ValueError:
offset = 0
ordering_string, invalid = _validate_input(request.GET.get('orderby', ''),
model)
if invalid:
return HttpResponseBadRequest()
filter_string, invalid = _validate_input(request.GET.get('filter', ''),
model)
if invalid:
return HttpResponseBadRequest()
search_term = request.GET.get('search', '')
if filter_string:
filter_terms = _get_filtering_terms(filter_string)
try:
queryset = model.objects.filter(**filter_terms)
except ValueError:
queryset = []
else:
queryset = model.objects.all()
if search_term:
queryset = _get_search_results(search_term, queryset, model)
if ordering_string and queryset:
column, order = ordering_string.split(':')
if order.lower() == DESCENDING:
queryset = queryset.order_by('-' + column)
else:
queryset = queryset.order_by(column)
if offset and limit:
queryset = queryset[offset:(offset+limit)]
elif offset:
queryset = queryset[offset:]
elif limit:
queryset = queryset[:limit]
if queryset:
response_data['count'] = queryset.count()
else:
response_data['count'] = 0
response_data['list'] = serializers.serialize('json', queryset)
return HttpResponse(json.dumps(response_data),
content_type='application/json')
def _get_filtering_terms(filter_string):
search_terms = filter_string.split(":")
keys = search_terms[0].split(',')
values = search_terms[1].split(',')
return dict(zip(keys, values))
def _validate_input(input, model):
invalid = 0
if input:
input_list = input.split(":")
# Check we have only one colon
if len(input_list) != 2:
invalid = 1
return None, invalid
# Check we have an equal number of terms both sides of the colon
if len(input_list[0].split(',')) != len(input_list[1].split(',')):
invalid = 1
return None, invalid
# Check we are looking for a valid field
valid_fields = model._meta.get_all_field_names()
for field in input_list[0].split(','):
if field not in valid_fields:
invalid = 1
return None, invalid
return input, invalid
def _get_search_results(search_term, queryset, model):
search_objects = []
for st in search_term.split(" "):
q_map = map(lambda x: Q(**{x+'__icontains': st}),
model.search_allowed_fields)
search_objects.append(reduce(operator.or_, q_map))
search_object = reduce(operator.and_, search_objects)
queryset = queryset.filter(search_object)
return queryset

10
bitbake/lib/toaster/manage.py Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toastermain.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)

View File

View File

@@ -0,0 +1,265 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class Build(models.Model):
SUCCEEDED = 0
FAILED = 1
IN_PROGRESS = 2
BUILD_OUTCOME = (
(SUCCEEDED, 'Succeeded'),
(FAILED, 'Failed'),
(IN_PROGRESS, 'In Progress'),
)
search_allowed_fields = ['machine',
'cooker_log_path']
machine = models.CharField(max_length=100)
image_fstypes = models.CharField(max_length=100)
distro = models.CharField(max_length=100)
distro_version = models.CharField(max_length=100)
started_on = models.DateTimeField()
completed_on = models.DateTimeField()
outcome = models.IntegerField(choices=BUILD_OUTCOME, default=IN_PROGRESS)
errors_no = models.IntegerField(default=0)
warnings_no = models.IntegerField(default=0)
cooker_log_path = models.CharField(max_length=500)
build_name = models.CharField(max_length=100)
bitbake_version = models.CharField(max_length=50)
@python_2_unicode_compatible
class Target(models.Model):
search_allowed_fields = ['target', 'image_fstypes', 'file_name']
build = models.ForeignKey(Build)
target = models.CharField(max_length=100)
is_image = models.BooleanField(default = False)
file_name = models.CharField(max_length=100)
file_size = models.IntegerField()
def __str__(self):
return self.target
class Task(models.Model):
SSTATE_NA = 0
SSTATE_MISS = 1
SSTATE_FAILED = 2
SSTATE_RESTORED = 3
SSTATE_RESULT = (
(SSTATE_NA, 'Not Applicable'), # For rest of tasks, but they still need checking.
(SSTATE_MISS, 'Missing'), # it is a miss
(SSTATE_FAILED, 'Failed'), # there was a pkg, but the script failed
(SSTATE_RESTORED, 'Restored'), # succesfully restored
)
CODING_NA = 0
CODING_NOEXEC = 1
CODING_PYTHON = 2
CODING_SHELL = 3
TASK_CODING = (
(CODING_NA, 'N/A'),
(CODING_NOEXEC, 'NoExec'),
(CODING_PYTHON, 'Python'),
(CODING_SHELL, 'Shell'),
)
OUTCOME_SUCCESS = 0
OUTCOME_COVERED = 1
OUTCOME_SSTATE = 2
OUTCOME_EXISTING = 3
OUTCOME_FAILED = 4
OUTCOME_NA = 5
TASK_OUTCOME = (
(OUTCOME_SUCCESS, 'Succeeded'),
(OUTCOME_COVERED, 'Covered'),
(OUTCOME_SSTATE, 'Sstate'),
(OUTCOME_EXISTING, 'Existing'),
(OUTCOME_FAILED, 'Failed'),
(OUTCOME_NA, 'Not Available'),
)
build = models.ForeignKey(Build, related_name='task_build')
order = models.IntegerField(null=True)
task_executed = models.BooleanField(default=False) # True means Executed, False means Prebuilt
outcome = models.IntegerField(choices=TASK_OUTCOME, default=OUTCOME_NA)
sstate_checksum = models.CharField(max_length=100, blank=True)
path_to_sstate_obj = models.FilePathField(max_length=500, blank=True)
recipe = models.ForeignKey('Recipe', related_name='build_recipe')
task_name = models.CharField(max_length=100)
source_url = models.FilePathField(max_length=255, blank=True)
work_directory = models.FilePathField(max_length=255, blank=True)
script_type = models.IntegerField(choices=TASK_CODING, default=CODING_NA)
line_number = models.IntegerField(default=0)
disk_io = models.IntegerField(null=True)
cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, null=True)
elapsed_time = models.CharField(max_length=50, default=0)
sstate_result = models.IntegerField(choices=SSTATE_RESULT, default=SSTATE_NA)
message = models.CharField(max_length=240)
logfile = models.FilePathField(max_length=255, blank=True)
class Meta:
ordering = ('order', 'recipe' ,)
class Task_Dependency(models.Model):
task = models.ForeignKey(Task, related_name='task_dependencies_task')
depends_on = models.ForeignKey(Task, related_name='task_dependencies_depends')
class Build_Package(models.Model):
build = models.ForeignKey('Build')
recipe = models.ForeignKey('Recipe', null=True)
name = models.CharField(max_length=100)
version = models.CharField(max_length=100, blank=True)
revision = models.CharField(max_length=32, blank=True)
summary = models.CharField(max_length=200, blank=True)
description = models.CharField(max_length=200, blank=True)
size = models.IntegerField(default=0)
section = models.CharField(max_length=80, blank=True)
license = models.CharField(max_length=80, blank=True)
class Build_Package_Dependency(models.Model):
TYPE_RDEPENDS = 0
TYPE_RPROVIDES = 1
TYPE_RRECOMMENDS = 2
TYPE_RSUGGESTS = 3
TYPE_RREPLACES = 4
TYPE_RCONFLICTS = 5
DEPENDS_TYPE = (
(TYPE_RDEPENDS, "rdepends"),
(TYPE_RPROVIDES, "rprovides"),
(TYPE_RRECOMMENDS, "rrecommends"),
(TYPE_RSUGGESTS, "rsuggests"),
(TYPE_RREPLACES, "rreplaces"),
(TYPE_RCONFLICTS, "rconflicts"),
)
package = models.ForeignKey(Build_Package, related_name='bpackage_dependencies_package')
depends_on = models.CharField(max_length=100) # soft dependency
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
class Target_Package(models.Model):
target = models.ForeignKey('Target')
recipe = models.ForeignKey('Recipe', null=True)
name = models.CharField(max_length=100)
version = models.CharField(max_length=100, blank=True)
size = models.IntegerField()
class Target_Package_Dependency(models.Model):
TYPE_DEPENDS = 0
TYPE_RDEPENDS = 1
TYPE_RECOMMENDS = 2
DEPENDS_TYPE = (
(TYPE_DEPENDS, "depends"),
(TYPE_RDEPENDS, "rdepends"),
(TYPE_RECOMMENDS, "recommends"),
)
package = models.ForeignKey(Target_Package, related_name='tpackage_dependencies_package')
depends_on = models.ForeignKey(Target_Package, related_name='tpackage_dependencies_depends')
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
class Build_File(models.Model):
bpackage = models.ForeignKey(Build_Package, related_name='filelist_bpackage')
path = models.FilePathField(max_length=255, blank=True)
size = models.IntegerField()
class Target_File(models.Model):
tpackage = models.ForeignKey(Target_Package, related_name='filelist_tpackage')
path = models.FilePathField(max_length=255, blank=True)
size = models.IntegerField()
class Recipe(models.Model):
name = models.CharField(max_length=100, blank=True)
version = models.CharField(max_length=100, blank=True)
layer_version = models.ForeignKey('Layer_Version', related_name='recipe_layer_version')
summary = models.CharField(max_length=100, blank=True)
description = models.CharField(max_length=100, blank=True)
section = models.CharField(max_length=100, blank=True)
license = models.CharField(max_length=200, blank=True)
licensing_info = models.TextField(blank=True)
homepage = models.URLField(blank=True)
bugtracker = models.URLField(blank=True)
file_path = models.FilePathField(max_length=255)
class Recipe_Dependency(models.Model):
TYPE_DEPENDS = 0
TYPE_RDEPENDS = 1
DEPENDS_TYPE = (
(TYPE_DEPENDS, "depends"),
(TYPE_RDEPENDS, "rdepends"),
)
recipe = models.ForeignKey(Recipe, related_name='r_dependencies_recipe')
depends_on = models.ForeignKey(Recipe, related_name='r_dependencies_depends')
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
class Layer(models.Model):
name = models.CharField(max_length=100)
local_path = models.FilePathField(max_length=255)
layer_index_url = models.URLField()
class Layer_Version(models.Model):
layer = models.ForeignKey(Layer, related_name='layer_version_layer')
branch = models.CharField(max_length=50)
commit = models.CharField(max_length=100)
priority = models.IntegerField()
class Variable(models.Model):
build = models.ForeignKey(Build, related_name='variable_build')
variable_name = models.CharField(max_length=100)
variable_value = models.TextField(blank=True)
changed = models.BooleanField(default=False)
human_readable_name = models.CharField(max_length=200)
description = models.TextField(blank=True)
class VariableHistory(models.Model):
variable = models.ForeignKey(Variable)
file_name = models.FilePathField(max_length=255)
line_number = models.IntegerField(null=True)
operation = models.CharField(max_length=16)
class LogMessage(models.Model):
INFO = 0
WARNING = 1
ERROR = 2
LOG_LEVEL = ( (INFO, "info"),
(WARNING, "warn"),
(ERROR, "error") )
build = models.ForeignKey(Build)
level = models.IntegerField(choices=LOG_LEVEL, default=INFO)
message=models.CharField(max_length=240)
pathname = models.FilePathField(max_length=255, blank=True)
lineno = models.IntegerField(null=True)

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,13 @@
<html>
<head>
<title>GUI Page</title>
</head>
<body>
{% load staticfiles %}
<img src="{% static "/static/images/yocto.jpg" %}" alt="Yocto"/>
This is your basic index page!
</body>
</html>

View File

@@ -0,0 +1,27 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
from django.conf import settings
from django.conf.urls import patterns, include, url
urlpatterns = patterns('toastergui.views',
url(r'^$', 'guihome', name='guihome'),
)

View File

@@ -0,0 +1,26 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.shortcuts import render
from orm.models import Build, Task
def guihome(request):
template = 'index.html'
return render(request, template)

View File

@@ -0,0 +1,191 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Django settings for Toaster project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'toaster.sqlite', # Or path to database file if using sqlite3.
'USER': '',
'PASSWORD': '',
'HOST': '127.0.0.1', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '3306', # Set to empty string for default.
}
}
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
# Always use local computer's time zone
import time
TIME_ZONE = time.tzname[0]
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = ''
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = ''
# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'NOT_SUITABLE_FOR_HOSTED_DEPLOYMENT'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'toastermain.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'toastermain.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (
#'django.contrib.auth',
#'django.contrib.contenttypes',
#'django.contrib.sessions',
#'django.contrib.sites',
#'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'orm',
'toastermain',
'bldviewer',
'toastergui',
)
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
# If we're using sqlite, we need to tweak the performance a bit
from django.db.backends.signals import connection_created
def activate_synchronous_off(sender, connection, **kwargs):
if connection.vendor == 'sqlite':
cursor = connection.cursor()
cursor.execute('PRAGMA synchronous = 0;')
connection_created.connect(activate_synchronous_off)
#

View File

@@ -0,0 +1,41 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.conf.urls import patterns, include, url
from django.views.generic.simple import redirect_to
from django.views.decorators.cache import never_cache
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
url(r'^simple/', include('bldviewer.urls')),
url(r'^api/1.0/', include('bldviewer.api')),
url(r'^gui/', include('toastergui.urls')),
url(r'^$', never_cache(redirect_to), {'url': '/simple/'}),
# Examples:
# url(r'^toaster/', include('toaster.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
)

View File

@@ -0,0 +1,32 @@
"""
WSGI config for Toaster project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` setting.
Usually you will have the standard Django WSGI application here, but it also
might make sense to replace the whole Django WSGI application with a custom one
that later delegates to the Django one. For example, you could introduce WSGI
middleware here, or combine a Django application with an application of another
framework.
"""
import os
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
# os.environ["DJANGO_SETTINGS_MODULE"] = "Toaster.settings"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toastermain.settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

View File

@@ -8,32 +8,23 @@
<para> <para>
Recall that earlier the manual discussed how to use an existing toolchain Recall that earlier the manual discussed how to use an existing toolchain
tarball that had been installed into the default installation tarball that had been installed into the default installation
directory, <filename>/opt/poky/&DISTRO;</filename>, which is outside of the directory, <filename>/opt/poky</filename>, which is outside of the
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
(see the section "<link linkend='using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball)</link>". (see the section "<link linkend='using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball)</link>".
And, that sourcing your architecture-specific environment setup script And, that sourcing your architecture-specific environment setup script
initializes a suitable cross-toolchain development environment. initializes a suitable cross-toolchain development environment.
</para> During the setup, locations for the compiler, QEMU scripts, QEMU binary,
<para>
During this setup, locations for the compiler, QEMU scripts, QEMU binary,
a special version of <filename>pkgconfig</filename> and other useful a special version of <filename>pkgconfig</filename> and other useful
utilities are added to the <filename>PATH</filename> variable. utilities are added to the <filename>PATH</filename> variable.
Also, variables to assist Variables to assist <filename>pkgconfig</filename> and <filename>autotools</filename>
<filename>pkgconfig</filename> and <filename>autotools</filename> are also defined so that,
are also defined so that, for example, <filename>configure.sh</filename> for example, <filename>configure.sh</filename> can find pre-generated
can find pre-generated test results for tests that need target hardware test results for tests that need target hardware on which to run.
on which to run. These conditions allow you to easily use the toolchain outside of the
OpenEmbedded build environment on both autotools-based projects and
Makefile-based projects.
</para> </para>
<para>
Collectively, these conditions allow you to easily use the toolchain
outside of the OpenEmbedded build environment on both autotools-based
projects and Makefile-based projects.
This chapter provides information for both these types of projects.
</para>
<section id='autotools-based-projects'> <section id='autotools-based-projects'>
<title>Autotools-Based Projects</title> <title>Autotools-Based Projects</title>
@@ -188,7 +179,7 @@
If <filename>configure</filename> script results in problems recognizing the If <filename>configure</filename> script results in problems recognizing the
<filename>--with-libtool-sysroot=&lt;sysroot-dir&gt;</filename> option, <filename>--with-libtool-sysroot=&lt;sysroot-dir&gt;</filename> option,
regenerate the script to enable the support by doing the following and then regenerate the script to enable the support by doing the following and then
run the script again: re-running the script:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ libtoolize --automake $ libtoolize --automake
$ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal \ $ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal \

View File

@@ -149,7 +149,8 @@
that causes skips in audio, that causes skips in audio,
stutters in your desktop experience, or situations that overload your server stutters in your desktop experience, or situations that overload your server
even when you have plenty of CPU power left. even when you have plenty of CPU power left.
</para></listitem> You can find out more about LatencyTOP at
<ulink url='https://latencytop.org/'></ulink>.</para></listitem>
<listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what <listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what
software is using the most power. software is using the most power.
You can find out more about PowerTOP at You can find out more about PowerTOP at

View File

@@ -66,26 +66,6 @@
<date>October 2013</date> <date>October 2013</date>
<revremark>Released with the Yocto Project 1.5 Release.</revremark> <revremark>Released with the Yocto Project 1.5 Release.</revremark>
</revision> </revision>
<revision>
<revnumber>1.5.1</revnumber>
<date>January 2014</date>
<revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.2</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.5.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.3</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.5.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.4</revnumber>
<date>December 2014</date>
<revremark>Released with the Yocto Project 1.5.4 Release.</revremark>
</revision>
</revhistory> </revhistory>
<copyright> <copyright>
@@ -99,10 +79,11 @@
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons. the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para> </para>
<note> <note>
For the latest version of this manual associated with this Due to production processes, there could be differences between the Yocto Project
Yocto Project release, see the documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink> <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink> on
from the Yocto Project website. the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note> </note>
</legalnotice> </legalnotice>

View File

@@ -80,48 +80,39 @@
<para> <para>
The ADT Installer is contained in the ADT Installer tarball. The ADT Installer is contained in the ADT Installer tarball.
You can get the tarball using either of these methods: You can download the tarball into any directory from the
<itemizedlist> <ulink url='&YOCTO_DL_URL;/releases'>Index of Releases</ulink>, specifically
<listitem><para><emphasis>Download the Tarball:</emphasis> at
You can download the tarball from <ulink url='&YOCTO_ADTINSTALLER_DL_URL;'></ulink>.
<ulink url='&YOCTO_ADTINSTALLER_DL_URL;'></ulink> into Or, you can use BitBake to generate the tarball inside the existing
any directory.</para></listitem> <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
<listitem><para><emphasis>Build the Tarball:</emphasis> </para>
You can use BitBake to generate the tarball inside an
existing <para>
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>. If you use BitBake to generate the ADT Installer tarball, you must
</para> <filename>source</filename> the environment setup script
<para>If you use BitBake to generate the ADT Installer (<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
tarball, you must <filename>source</filename> the or
environment setup script <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
(<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink> located in the Source Directory before running the
or BitBake command that creates the tarball.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>) </para>
located in the Source Directory before running the
BitBake command that creates the tarball.</para> <para>
<para>The following example commands establish The following example commands download the Poky tarball, set up the
the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>, set up the environment while also creating the default Build Directory,
check out the current release branch, set up the and run the BitBake command that results in the tarball
build environment while also creating the default <filename>~/yocto-project/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>:
Build Directory, and run the BitBake command that <literallayout class='monospaced'>
results in the tarball
<filename>poky/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>:
<note>
Before using BitBake to build the ADT tarball, be
sure to make sure your
<filename>local.conf</filename> file is properly
configured.
</note>
<literallayout class='monospaced'>
$ cd ~ $ cd ~
$ git clone git://git.yoctoproject.org/poky $ mkdir yocto-project
$ cd poky $ cd yocto-project
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME; $ wget &YOCTO_RELEASE_DL_URL;/&YOCTO_POKY_TARBALL;
$ source &OE_INIT_FILE; $ tar xjf &YOCTO_POKY_TARBALL;
$ source &OE_INIT_PATH;
$ bitbake adt-installer $ bitbake adt-installer
</literallayout></para></listitem> </literallayout>
</itemizedlist>
</para> </para>
</section> </section>
@@ -136,7 +127,7 @@
a top-level directory named <filename>adt-installer</filename>: a top-level directory named <filename>adt-installer</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd ~ $ cd ~
$ cp poky/build/tmp/deploy/sdk/adt_installer.tar.bz2 $HOME $ cp ~/poky/build/tmp/deploy/sdk/adt_installer.tar.bz2 $HOME
$ tar -xjf adt_installer.tar.bz2 $ tar -xjf adt_installer.tar.bz2
</literallayout> </literallayout>
Unpacking it creates the directory <filename>adt-installer</filename>, Unpacking it creates the directory <filename>adt-installer</filename>,
@@ -201,9 +192,12 @@
<para> <para>
After you have configured the <filename>adt_installer.conf</filename> file, After you have configured the <filename>adt_installer.conf</filename> file,
run the installer using the following command: run the installer using the following command.
Be sure that you are not trying to use cross-compilation tools.
When you run the installer, the environment must use a
host <filename>gcc</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd adt-installer $ cd ~/adt-installer
$ ./adt_installer $ ./adt_installer
</literallayout> </literallayout>
Once the installer begins to run, you are asked to enter the Once the installer begins to run, you are asked to enter the
@@ -274,7 +268,7 @@
target, go into the <filename>x86_64</filename> target, go into the <filename>x86_64</filename>
folder and download the following installer: folder and download the following installer:
<literallayout class='monospaced'> <literallayout class='monospaced'>
poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh poky-eglibc-x86_64-core-image-sato-i586-&DISTRO;.sh
</literallayout></para></listitem> </literallayout></para></listitem>
<listitem><para>Build your own toolchain installer. <listitem><para>Build your own toolchain installer.
For cases where you cannot use an installer For cases where you cannot use an installer
@@ -285,32 +279,27 @@
</itemizedlist></para></listitem> </itemizedlist></para></listitem>
<listitem><para>Once you have the installer, run it to install <listitem><para>Once you have the installer, run it to install
the toolchain. the toolchain.
<note> You must change the permissions on the toolchain installer
You must change the permissions on the toolchain script so that it is executable.</para>
installer script so that it is executable.
</note></para>
<para>The following command shows how to run the installer <para>The following command shows how to run the installer
given a toolchain tarball for a 64-bit x86 development host given a toolchain tarball for a 64-bit x86 development host
system and a 32-bit x86 target architecture. system and a 32-bit x86 target architecture.
The example assumes the toolchain installer is located The example assumes the toolchain installer is located
in <filename>~/Downloads/</filename>. in <filename>~/Downloads/</filename>.
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ ~/Downloads/poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh $ ~/Downloads/poky-eglibc-x86_64-core-image-sato-i586-&DISTRO;.sh
</literallayout> </literallayout>
The first thing the installer prompts you for is the <note>
directory into which you want to install the toolchain. If you do not have write permissions for the directory
The default directory used is into which you are installing the toolchain, the
<filename>/opt/poky/&DISTRO;</filename>. toolchain installer notifies you and exits.
If you do not have write permissions for the directory Be sure you have write permissions in the directory and
into which you are installing the toolchain, the run the installer again.
toolchain installer notifies you and exits. </note>
Be sure you have write permissions in the directory and Once the tarball is expanded, the cross-toolchain is
run the installer again.</para>
<para>When the script finishes, the cross-toolchain is
installed. installed.
You will notice environment setup files for the You will notice environment setup files for the
cross-toolchain in the installation directory. cross-toolchain in the directory.</para></listitem>
</para></listitem>
</orderedlist> </orderedlist>
</para> </para>
</section> </section>
@@ -331,43 +320,37 @@
<para> <para>
Follow these steps to generate the toolchain into the Build Directory: Follow these steps to generate the toolchain into the Build Directory:
<orderedlist> <orderedlist>
<listitem><para><emphasis>Set up the Build Environment:</emphasis> <listitem><para>Source the environment setup script
Source the OpenEmbedded build environment setup <filename>&OE_INIT_FILE;</filename> located in the
script (i.e.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
or
<ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
located in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Check your Local Configuration File:</emphasis> <listitem><para>At this point, you should be sure that the
At this point, you should be sure that the
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable
in the <filename>local.conf</filename> file found in the in the <filename>local.conf</filename> file found in the
<filename>conf</filename> directory of the Build Directory <filename>conf</filename> directory of the Build Directory
is set for the target architecture. is set for the target architecture.
Comments within the <filename>local.conf</filename> file Comments within the <filename>local.conf</filename> file list the values you
list the values you can use for the can use for the <filename>MACHINE</filename> variable.
<filename>MACHINE</filename> variable. <note>You can populate the Build Directory with the cross-toolchains for more
<note> than a single architecture.
You can populate the Build Directory with the You just need to edit the <filename>MACHINE</filename> variable in the
cross-toolchains for more than a single architecture. <filename>local.conf</filename> file and re-run the BitBake
You just need to edit the <filename>MACHINE</filename> command.</note></para></listitem>
variable in the <filename>local.conf</filename> file and <listitem><para>Run <filename>bitbake meta-ide-support</filename> to complete the
re-run the BitBake command. cross-toolchain generation.
</note></para></listitem> <note>If you change out of your working directory after you
<listitem><para><emphasis>Generate the Cross-Toolchain:</emphasis> <filename>source</filename> the environment setup script and before you run
Run <filename>bitbake meta-ide-support</filename> to the BitBake command, the command might not work.
complete the cross-toolchain generation. Be sure to run the BitBake command immediately
Once the BitBake command finishes, the cross-toolchain is after checking or editing the <filename>local.conf</filename> but without
generated and populated within the Build Directory. changing out of your working directory.</note>
You will notice environment setup files for the Once the BitBake command finishes,
cross-toolchain that contain the string the cross-toolchain is generated and populated within the Build Directory.
"<filename>environment-setup</filename>" in the You will notice environment setup files for the cross-toolchain in the
Build Directory's <filename>tmp</filename> folder.</para> Build Directory in the <filename>tmp</filename> directory.
<para>Be aware that when you use this method to install the Setup script filenames contain the strings <filename>environment-setup</filename>.</para>
toolchain, you still need to separately extract and install <para>Be aware that when you use this method to install the toolchain you still need
the sysroot filesystem. to separately extract and install the sysroot filesystem.
For information on how to do this, see the For information on how to do this, see the
"<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>" section. "<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>" section.
</para></listitem> </para></listitem>
@@ -454,8 +437,8 @@
application from within the application from within the
Eclipse IDE, you must have an image that contains the Yocto Target Communication Eclipse IDE, you must have an image that contains the Yocto Target Communication
Framework (TCF) agent (<filename>tcf-agent</filename>). Framework (TCF) agent (<filename>tcf-agent</filename>).
By default, the Yocto Project provides only one type of pre-built By default, the Yocto Project provides only one type pre-built image that contains the
image that contains the <filename>tcf-agent</filename>. <filename>tcf-agent</filename>.
And, those images are SDK (e.g.<filename>core-image-sato-sdk</filename>). And, those images are SDK (e.g.<filename>core-image-sato-sdk</filename>).
</para> </para>
@@ -484,16 +467,13 @@
the following commands: the following commands:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git $ git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
$ cd org.eclipse.tcf.agent/agent $ cd agent
</literallayout></para></listitem> </literallayout></para></listitem>
<listitem><para>Locate the <listitem><para>Modify the <filename>Makefile.inc</filename> file
<filename>Makefile.inc</filename> file inside the
<filename>agent</filename> folder and modify it
for the cross-compilation environment by setting the for the cross-compilation environment by setting the
<filename>OPSYS</filename> and <filename>OPSYS</filename> and
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
variables according to your target. variables according to your target.</para></listitem>
</para></listitem>
<listitem><para>Use the cross-development tools to build the <listitem><para>Use the cross-development tools to build the
<filename>tcf-agent</filename>. <filename>tcf-agent</filename>.
Before you "Make" the file, be sure your cross-tools are set up first. Before you "Make" the file, be sure your cross-tools are set up first.
@@ -513,63 +493,32 @@
<title>Extracting the Root Filesystem</title> <title>Extracting the Root Filesystem</title>
<para> <para>
If you install your toolchain by hand or build it using BitBake and You must extract the root filesystem if you want to boot the image using NFS
you need a root filesystem, you need to extract it separately. or you want to use the root filesystem as the target sysroot.
If you use the ADT Installer to install the ADT, the root For example, the Eclipse IDE environment with the Eclipse Yocto Plug-in installed allows you
filesystem is automatically extracted and installed. to use QEMU to boot under NFS.
</para> Another example is if you want to develop your target application using the
root filesystem as the target sysroot.
<para>
Here are some cases where you need to extract the root filesystem:
<itemizedlist>
<listitem><para>You want to boot the image using NFS.
</para></listitem>
<listitem><para>You want to use the root filesystem as the
target sysroot.
For example, the Eclipse IDE environment with the Eclipse
Yocto Plug-in installed allows you to use QEMU to boot
under NFS.</para></listitem>
<listitem><para>You want to develop your target application
using the root filesystem as the target sysroot.
</para></listitem>
</itemizedlist>
</para> </para>
<para> <para>
To extract the root filesystem, first <filename>source</filename> To extract the root filesystem, first <filename>source</filename>
the cross-development environment setup script. the cross-development environment setup script and then
If you built the toolchain in the Build Directory, you will find use the <filename>runqemu-extract-sdk</filename> command on the
the toolchain environment script in the
<filename>tmp</filename> directory.
If you installed the toolchain by hand, the environment setup
script is located in <filename>/opt/poky/&DISTRO;</filename>.
</para>
<para>
After sourcing the environment script, use the
<filename>runqemu-extract-sdk</filename> command and provide the
filesystem image. filesystem image.
</para> For example, the following commands set up the environment and then extract
the root filesystem from a previously built filesystem image tarball named
<para> <filename>core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2</filename>.
Following is an example. The example extracts the root filesystem into the <filename>$HOME/qemux86-sato</filename>
The second command sets up the environment. directory:
In this case, the setup script is located in the
<filename>/opt/poky/&DISTRO;</filename> directory.
The third command extracts the root filesystem from a previously
built filesystem that is located in the
<filename>~/Downloads</filename> directory.
Furthermore, this command extracts the root filesystem into the
<filename>qemux86-sato</filename> directory:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd ~ $ source $HOME/toolchain_dir/environment-setup-i586-poky-linux
$ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
$ runqemu-extract-sdk \ $ runqemu-extract-sdk \
~/Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \ ~Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \
$HOME/qemux86-sato $HOME/qemux86-sato
</literallayout> </literallayout>
You could now point to the target sysroot at In this case, you could now point to the target sysroot at
<filename>qemux86-sato</filename>. <filename>$HOME/qemux86-sato</filename>.
</para> </para>
</section> </section>
</section> </section>
@@ -579,26 +528,30 @@
<para> <para>
As an alternative to locating and downloading a toolchain installer, As an alternative to locating and downloading a toolchain installer,
you can build the toolchain installer one of two ways if you have a you can build the toolchain installer if you have a
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>: <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
<itemizedlist>
<listitem><para>Use <filename>bitbake meta-toolchain</filename>.
This method requires you to still install the target
sysroot by installing and extracting it separately.
For information on how to install the sysroot, see the
"<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>"
section.</para></listitem>
<listitem><para>Use
<filename>bitbake image -c populate_sdk</filename>.
This method has significant advantages over the previous method
because it results in a toolchain installer that contains the
sysroot that matches your target root filesystem.
</para></listitem>
</itemizedlist>
</para> </para>
<para> <para>
Remember, before using any BitBake command, you You can build the toolchain
installer using <filename>bitbake meta-toolchain</filename>.
This method requires you to still install the target
sysroot by installing and extracting it separately.
For information on how to install the sysroot, see the
"<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>" section.
</para>
<para>
A final method of building the toolchain installer exists that has
significant advantages over the previous method.
This method results in a toolchain installer that contains the sysroot
that matches your target root filesystem.
To build this installer, use the
<filename>bitbake image -c populate_sdk</filename> command.
</para>
<para>
Remember, before using any <filename>bitbake</filename> command, you
must source the build environment setup script must source the build environment setup script
(i.e. (i.e.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink> <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
@@ -614,27 +567,12 @@
variable is correctly set if you are building a toolchain designed to variable is correctly set if you are building a toolchain designed to
run on an architecture that differs from your current development host run on an architecture that differs from your current development host
machine (i.e. the build machine). machine (i.e. the build machine).
</para> </para>
<para> <para>
When the BitBake command completes, the toolchain installer will be in When the BitBake command completes, the toolchain installer will be in
<filename>tmp/deploy/sdk</filename> in the Build Directory. <filename>tmp/deploy/sdk</filename> in the Build Directory.
<note> </para>
By default, this toolchain does not build static binaries.
If you want to use the toolchain to build these types of libraries,
you need to be sure your image has the appropriate static
development libraries.
Use the
<ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
variable inside your <filename>local.conf</filename> file to
install the appropriate library packages.
Following is an example using <filename>eglibc</filename> static
development libraries:
<literallayout class='monospaced'>
IMAGE_INSTALL_append = " eglibc-staticdev"
</literallayout>
</note>
</para>
</section> </section>
</chapter> </chapter>

View File

@@ -78,26 +78,6 @@
<date>October 2013</date> <date>October 2013</date>
<revremark>Released with the Yocto Project 1.5 Release.</revremark> <revremark>Released with the Yocto Project 1.5 Release.</revremark>
</revision> </revision>
<revision>
<revnumber>1.5.1</revnumber>
<date>January 2014</date>
<revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.2</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.5.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.3</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.5.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.4</revnumber>
<date>December 2014</date>
<revremark>Released with the Yocto Project 1.5.4 Release.</revremark>
</revision>
</revhistory> </revhistory>
<copyright> <copyright>
@@ -111,10 +91,11 @@
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons. the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para> </para>
<note> <note>
For the latest version of this manual associated with this Due to production processes, there could be differences between the Yocto Project
Yocto Project release, see the documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink> <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink> on
from the Yocto Project website. the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note> </note>
</legalnotice> </legalnotice>

View File

@@ -394,13 +394,12 @@
<para> <para>
To use an include file, you simply include them in the machine configuration file. To use an include file, you simply include them in the machine configuration file.
For example, the Crown Bay BSP <filename>crownbay.conf</filename> contains the For example, the Crown Bay BSP <filename>crownbay.conf</filename> has the
following statements: following statements:
<literallayout class='monospaced'> <literallayout class='monospaced'>
require conf/machine/include/tune-atom.inc require conf/machine/include/tune-atom.inc
require conf/machine/include/ia32-base.inc require conf/machine/include/ia32-base.inc
require conf/machine/include/meta-intel.inc require conf/machine/include/meta-intel.inc
require conf/machine/include/meta-intel-emgd.inc
</literallayout> </literallayout>
</para> </para>
</section> </section>
@@ -421,7 +420,7 @@
<filename>formfactor_0.0.bbappend</filename> file, which is an <filename>formfactor_0.0.bbappend</filename> file, which is an
append file used to augment the recipe that starts the build. append file used to augment the recipe that starts the build.
Furthermore, there are machine-specific settings used during the Furthermore, there are machine-specific settings used during the
build that are defined by the <filename>machconfig</filename> file. build that are defined by the <filename>machconfig</filename>.
In the Crown Bay example, two <filename>machconfig</filename> files In the Crown Bay example, two <filename>machconfig</filename> files
exist: one that supports the Intel® Embedded Media and Graphics exist: one that supports the Intel® Embedded Media and Graphics
Driver (Intel® EMGD) and one that does not: Driver (Intel® EMGD) and one that does not:
@@ -461,7 +460,7 @@
(VESA) graphics): (VESA) graphics):
<literallayout class='monospaced'> <literallayout class='monospaced'>
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay-noemgd/xorg.conf
</literallayout> </literallayout>
</para> </para>
</section> </section>
@@ -562,7 +561,7 @@
<para> <para>
For example, suppose you had some configuration options in a file called For example, suppose you had some configuration options in a file called
<filename>network_configs.cfg</filename>. <filename>network_configs.cfg</filename>.
You can place that file inside a directory named <filename>linux-yocto</filename> and then add You can place that file inside a directory named <filename>/linux-yocto</filename> and then add
a <filename>SRC_URI</filename> statement such as the following to the append file. a <filename>SRC_URI</filename> statement such as the following to the append file.
When the OpenEmbedded build system builds the kernel, the configuration options are When the OpenEmbedded build system builds the kernel, the configuration options are
picked up and applied. picked up and applied.
@@ -748,7 +747,7 @@
<listitem><para>Instructions on how to boot the BSP build from <listitem><para>Instructions on how to boot the BSP build from
the BSP layer.</para></listitem> the BSP layer.</para></listitem>
<listitem><para>Instructions on how to boot the binary images <listitem><para>Instructions on how to boot the binary images
contained in the <filename>binary</filename> directory, contained in the <filename>/binary</filename> directory,
if present.</para></listitem> if present.</para></listitem>
<listitem><para>Information on any known bugs or issues that users <listitem><para>Information on any known bugs or issues that users
should know about when either building or booting the BSP should know about when either building or booting the BSP
@@ -759,7 +758,7 @@
<filename>meta-&lt;bsp_name&gt;</filename> directory. <filename>meta-&lt;bsp_name&gt;</filename> directory.
This file specifies exactly where you can find the sources used to This file specifies exactly where you can find the sources used to
generate the binary images contained in the generate the binary images contained in the
<filename>binary</filename> directory, if present. <filename>/binary</filename> directory, if present.
See the See the
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/README.sources'><filename>README.sources</filename></ulink> <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/README.sources'><filename>README.sources</filename></ulink>
file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,8 @@
"<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>" "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
section in the Yocto Project Board Support Package (BSP) Developer's Guide. section in the Yocto Project Board Support Package (BSP) Developer's Guide.
For more complete information on how to work with the kernel, see the For more complete information on how to work with the kernel, see the
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>. <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel
Development Manual</ulink>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>User Application Development:</emphasis> <listitem><para><emphasis>User Application Development:</emphasis>
User Application Development covers development of applications that you intend User Application Development covers development of applications that you intend
@@ -154,11 +155,10 @@
For more information on BSP layers, see the For more information on BSP layers, see the
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" section in the "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" section in the
Yocto Project Board Support Package (BSP) Developer's Guide.</para> Yocto Project Board Support Package (BSP) Developer's Guide.</para>
<note>Five BSPs exist that are part of the <note>Four BSPs exist that are part of the
Yocto Project release: <filename>genericx86</filename>, <filename>genericx86-64</filename>, Yocto Project release: <filename>genericx86</filename>, <filename>beagleboard</filename>,
<filename>beagleboard</filename>,
<filename>mpc8315e</filename>, and <filename>routerstationpro</filename>. <filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
The recipes and configurations for these five BSPs are located and dispersed The recipes and configurations for these four BSPs are located and dispersed
within the <link linkend='source-directory'>Source Directory</link>. within the <link linkend='source-directory'>Source Directory</link>.
On the other hand, BSP layers for Chief River, Crown Bay, On the other hand, BSP layers for Chief River, Crown Bay,
Crystal Forest, Emenlow, Fish River Island 2, Jasper Forest, N450, NUC DC3217IYE, Crystal Forest, Emenlow, Fish River Island 2, Jasper Forest, N450, NUC DC3217IYE,
@@ -218,10 +218,10 @@
<para> <para>
You can view a video presentation on "Building Custom Embedded Images with Yocto" You can view a video presentation on "Building Custom Embedded Images with Yocto"
at <ulink url='http://free-electrons.com/blog/elc-2011-videos'>Free Electrons</ulink>. at <ulink url='http://free-electrons.com/blog/elc-2011-videos'>Free Electrons</ulink>.
You can also find supplemental information in the You can also find supplemental information in
<ulink url='&YOCTO_DOCS_BSP_URL;'> <ulink url='&YOCTO_DOCS_BSP_URL;'>
Yocto Project Board Support Package (BSP) Developer's Guide</ulink>. The Board Support Package (BSP) Development Guide</ulink>.
Finally, there is a wiki page write up of the example also located Finally, there is wiki page write up of the example also located
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'> <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
here</ulink> that you might find helpful. here</ulink> that you might find helpful.
</para> </para>
@@ -1424,6 +1424,9 @@
"<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>" "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>"
section in the Yocto Project Profiling and Tracing section in the Yocto Project Profiling and Tracing
Manual. Manual.
For information on LatencyTOP, see the
<ulink url='https://latencytop.org/'>LatencyTOP</ulink>
website.
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>
@@ -1467,14 +1470,7 @@
the "Clone from Yocto Git Repository" box, which the "Clone from Yocto Git Repository" box, which
would execute a <filename>git clone</filename> would execute a <filename>git clone</filename>
command to get the project's Metadata files. command to get the project's Metadata files.
<note> </para></listitem>
Do not specify your BitBake Commander project
location as your Eclipse workspace.
Doing so causes an error indicating that the
current project overlaps the location of
another project.
This error occurs even if no such project exits.
</note></para></listitem>
<listitem><para>Select <filename>Finish</filename> to <listitem><para>Select <filename>Finish</filename> to
create the project.</para></listitem> create the project.</para></listitem>
</orderedlist> </orderedlist>
@@ -1643,7 +1639,7 @@
<filename>meta/conf/bitbake.conf</filename> configuration file in the <filename>meta/conf/bitbake.conf</filename> configuration file in the
<link linkend='source-directory'>Source Directory</link>: <link linkend='source-directory'>Source Directory</link>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
S = "${WORKDIR}/${BP}" S = ${WORKDIR}/${BP}
</literallayout> </literallayout>
You should be aware that many recipes override the <filename>S</filename> variable. You should be aware that many recipes override the <filename>S</filename> variable.
For example, recipes that fetch their source from Git usually set For example, recipes that fetch their source from Git usually set
@@ -1653,7 +1649,7 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink> <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
represents the base recipe name, which consists of the name and version: represents the base recipe name, which consists of the name and version:
<literallayout class='monospaced'> <literallayout class='monospaced'>
BP = "${BPN}-${PV}" BP = ${BPN}-${PV}
</literallayout> </literallayout>
</note> </note>
</para> </para>
@@ -1674,7 +1670,7 @@
the following is the work directory for the <filename>acl</filename> recipe that the following is the work directory for the <filename>acl</filename> recipe that
creates the <filename>acl</filename> package: creates the <filename>acl</filename> package:
<literallayout class='monospaced'> <literallayout class='monospaced'>
poky/build/tmp/work/i586-poky-linux/acl/2.2.51-r3/ ~/poky/build/tmp/work/i586-poky-linux/acl/2.2.51-r3/
</literallayout> </literallayout>
</para> </para>
@@ -1690,8 +1686,8 @@
for the <filename>acl</filename> package that is being for the <filename>acl</filename> package that is being
built for a MIPS-based device: built for a MIPS-based device:
<literallayout class='monospaced'> <literallayout class='monospaced'>
poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2 ~/poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2
poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2/acl-2.2.51 ~/poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2/acl-2.2.51
</literallayout> </literallayout>
</para> </para>
@@ -1702,7 +1698,6 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>,

View File

@@ -429,17 +429,15 @@
<para> <para>
For any supported release of Yocto Project, you can go to the For any supported release of Yocto Project, you can go to the
<ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and
select the "Downloads" tab and get a released tarball of the select the "Downloads" tab and get a tarball of the release.
<filename>poky</filename> repository or any supported BSP tarballs. You can also go to this site to download any supported BSP tarballs.
Unpacking these tarballs gives you a snapshot of the released Unpacking the tarball gives you a hierarchical Source Directory that lets you develop
files. using the Yocto Project.
<note> </para>
The recommended method for setting up the Yocto Project
<link linkend='source-directory'>Source Directory</link> and the <para>
files for supported BSPs (e.g., <filename>meta-intel</filename>) is to Once you are set up through either tarball extraction or a checkout of Git repositories,
use <link linkend='git'>Git</link> to create a local copy of the you are ready to develop.
upstream repositories.
</note>
</para> </para>
<para> <para>
@@ -516,40 +514,27 @@
The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink> The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>
variable points to the Build Directory.</para> variable points to the Build Directory.</para>
<para> <para>You have a lot of flexibility when creating the Build Directory.
You have a lot of flexibility when creating the Build Following are some examples that show how to create the directory:
Directory.
Following are some examples that show how to create the
directory.
The examples assume your
<link linkend='source-directory'>Source Directory</link> is
named <filename>poky</filename>:
<itemizedlist> <itemizedlist>
<listitem><para>Create the Build Directory inside your <listitem><para>Create the Build Directory in your current working directory
Source Directory and let the name of the Build and name it <filename>build</filename>.
Directory default to <filename>build</filename>: This is the default behavior.
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd $HOME/poky $ source &OE_INIT_PATH;
$ source &OE_INIT_FILE;
</literallayout></para></listitem> </literallayout></para></listitem>
<listitem><para>Create the Build Directory inside your <listitem><para>Provide a directory path and specifically name the build
home directory and specifically name it directory.
<filename>test-builds</filename>: This next example creates a Build Directory named <filename>YP-&POKYVERSION;</filename>
in your home directory within the directory <filename>mybuilds</filename>.
If <filename>mybuilds</filename> does not exist, the directory is created for you:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd $HOME $ source &OE_INIT_PATH; $HOME/mybuilds/YP-&POKYVERSION;
$ source poky/&OE_INIT_FILE; test-builds
</literallayout></para></listitem> </literallayout></para></listitem>
<listitem><para>Provide a directory path and <listitem><para>Provide an existing directory to use as the Build Directory
specifically name the build directory. and use the default <filename>build</filename> name.
Any intermediate folders in the pathname must
exist.
This next example creates a Build Directory named
<filename>YP-&POKYVERSION;</filename>
in your home directory within the existing
directory <filename>mybuilds</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$cd $HOME $ source &OE_INIT_PATH; $HOME/mybuilds/
$ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
</literallayout></para></listitem> </literallayout></para></listitem>
</itemizedlist> </itemizedlist>
</para></listitem> </para></listitem>
@@ -662,17 +647,6 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and
<ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>). <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>).
</para></listitem> </para></listitem>
<listitem><para><emphasis>Package Groups:</emphasis>
Arbitrary groups of software Recipes.
You use package groups to hold recipes that, when built,
usually accomplish a single task.
For example, a package group could contain the recipes for a
companys proprietary or value-add software.
Or, the package group could contain the recipes that enable
graphics.
A package group is really just another recipe.
Because package group files are recipes, they end with the
<filename>.bb</filename> filename extension.</para></listitem>
<listitem><para id='poky'><emphasis>Poky:</emphasis> The term "poky" can mean several things. <listitem><para id='poky'><emphasis>Poky:</emphasis> The term "poky" can mean several things.
In its most general sense, it is an open-source project that was initially developed In its most general sense, it is an open-source project that was initially developed
by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded
@@ -742,12 +716,13 @@
see the see the
"<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>" "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>"
section.</para></listitem> section.</para></listitem>
<listitem><para><emphasis>Task:</emphasis> <listitem><para><emphasis>Tasks:</emphasis> Arbitrary groups of software Recipes.
A unit of execution for BitBake (e.g. You use tasks to hold recipes that, when built, usually accomplish a single task.
<filename>do_compile</filename>, For example, a task could contain the recipes for a companys proprietary or value-add software.
<filename>do_fetch</filename>, <filename>do_patch</filename>, Or, the task could contain the recipes that enable graphics.
and so forth). A task is really just another recipe.
</para></listitem> Because task files are recipes, they end with the <filename>.bb</filename> filename
extension.</para></listitem>
<listitem><para><emphasis>Upstream:</emphasis> A reference to source code or repositories <listitem><para><emphasis>Upstream:</emphasis> A reference to source code or repositories
that are not local to the development system but located in a master area that is controlled that are not local to the development system but located in a master area that is controlled
by the maintainer of the source code. by the maintainer of the source code.
@@ -832,8 +807,7 @@
<title>Git</title> <title>Git</title>
<para> <para>
The Yocto Project makes extensive use of Git, The Yocto Project uses Git, which is a free, open source distributed version control system.
which is a free, open source distributed version control system.
Git supports distributed development, non-linear development, and can handle large projects. Git supports distributed development, non-linear development, and can handle large projects.
It is best that you have some fundamental understanding of how Git tracks projects and It is best that you have some fundamental understanding of how Git tracks projects and
how to work with Git if you are going to use the Yocto Project for development. how to work with Git if you are going to use the Yocto Project for development.
@@ -937,7 +911,7 @@
local working branch based on a branch name, local working branch based on a branch name,
your local environment matches the "tip" of that development branch your local environment matches the "tip" of that development branch
at the time you created your local branch, which could be at the time you created your local branch, which could be
different from the files at the time of a similarly named release. different than the files at the time of a similarly named release.
In other words, creating and checking out a local branch based on the In other words, creating and checking out a local branch based on the
<filename>&DISTRO_NAME;</filename> branch name is not the same as <filename>&DISTRO_NAME;</filename> branch name is not the same as
cloning and checking out the <filename>master</filename> branch. cloning and checking out the <filename>master</filename> branch.
@@ -1030,7 +1004,7 @@
will allow the change, and for ultimately pushing the change from your local Git repository will allow the change, and for ultimately pushing the change from your local Git repository
into the projects upstream (or master) repository.</para></listitem> into the projects upstream (or master) repository.</para></listitem>
<listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that <listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that
possibly need to be staged and committed.</para></listitem> possibly need staged and committed.</para></listitem>
<listitem><para><emphasis><filename>git checkout &lt;branch-name&gt;</filename>:</emphasis> Changes <listitem><para><emphasis><filename>git checkout &lt;branch-name&gt;</filename>:</emphasis> Changes
your working branch. your working branch.
This command is analogous to "cd".</para></listitem> This command is analogous to "cd".</para></listitem>
@@ -1307,9 +1281,10 @@
<listitem><para><emphasis>Board Support Package (BSP) README Files:</emphasis> <listitem><para><emphasis>Board Support Package (BSP) README Files:</emphasis>
For BSP maintainers of supported BSPs, you can examine For BSP maintainers of supported BSPs, you can examine
individual BSP <filename>README</filename> files. individual BSP <filename>README</filename> files.
In addition, some layers (such as the <filename>meta-intel</filename> layer), Alternatively, you can examine the
include a <filename>MAINTAINERS</filename> file which contains <filename>MAINTAINERS</filename> file, which is found in the
a list of all supported BSP maintainers for that layer. <filename>meta-intel</filename>, for a list of all supported
BSP maintainers.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Search by File:</emphasis> <listitem><para><emphasis>Search by File:</emphasis>
Using <link linkend='git'>Git</link>, you can enter the Using <link linkend='git'>Git</link>, you can enter the
@@ -1484,8 +1459,8 @@
<para>For help on using these scripts, simply provide the <para>For help on using these scripts, simply provide the
<filename>-h</filename> argument as follows: <filename>-h</filename> argument as follows:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ poky/scripts/create-pull-request -h $ ~/poky/scripts/create-pull-request -h
$ poky/scripts/send-pull-request -h $ ~/poky/scripts/send-pull-request -h
</literallayout></para></listitem> </literallayout></para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>

View File

@@ -55,12 +55,12 @@
<title>Getting Set Up</title> <title>Getting Set Up</title>
<para> <para>
Here is what you need to use the Yocto Project: Here is what you need to get set up to use the Yocto Project:
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Host System:</emphasis> <listitem><para><emphasis>Host System:</emphasis> You should have a reasonably current
You should have a reasonably current Linux-based host system. Linux-based host system.
You will have the best results with a recent release of Fedora, You will have the best results with a recent release of Fedora,
openSUSE, Debian, Ubuntu, or CentOS as these releases are frequently tested against the Yocto Project OpenSUSE, Debian, Ubuntu, or CentOS as these releases are frequently tested against the Yocto Project
and officially supported. and officially supported.
For a list of the distributions under validation and their status, see the For a list of the distributions under validation and their status, see the
"<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section
@@ -69,35 +69,23 @@
<para> <para>
You should also have about 100 gigabytes of free disk space for building images. You should also have about 100 gigabytes of free disk space for building images.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Packages:</emphasis> <listitem><para><emphasis>Packages:</emphasis> The OpenEmbedded build system
The OpenEmbedded build system requires that certain packages requires certain packages exist on your development system (e.g. Python 2.6 or 2.7).
exist on your development system (e.g. Python 2.6 or 2.7).
See "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" See "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>"
section in the Yocto Project Quick Start and the section in the Yocto Project Quick Start and the
"<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>" "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
section in the Yocto Project Reference Manual for the exact section in the Yocto Project Reference Manual for the exact
package requirements and the installation commands to install package requirements and the installation commands to install
them for the supported distributions.</para></listitem> them for the supported distributions.
</para></listitem>
<listitem id='local-yp-release'><para><emphasis>Yocto Project Release:</emphasis> <listitem id='local-yp-release'><para><emphasis>Yocto Project Release:</emphasis>
You need a release of the Yocto Project installed locally on You need a release of the Yocto Project.
your development system. You set that up with a local <link linkend='source-directory'>Source Directory</link>
This local area is referred to as the one of two ways depending on whether you
<link linkend='source-directory'>Source Directory</link> are going to contribute back into the Yocto Project or not.
and is created when you use <note>
<link linkend='git'>Git</link> to clone a local copy Regardless of the method you use, this manual refers to the resulting local
of the upstream <filename>poky</filename> repository, hierarchical set of files as the "Source Directory."
or when you download an official release of the corresponding
tarball.</para>
<para>Working from a copy of the upstream repository allows you
to contribute back into the Yocto Project or simply work with
the latest software on a development branch.
Because Git maintains and creates an upstream repository with
a complete history of changes and you are working with a local
clone of that repository, you have access to all the Yocto
Project development branches and tag names used in the upstream
repository.
<note>You can view the Yocto Project Source Repositories at
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>
</note> </note>
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Tarball Extraction:</emphasis> <listitem><para><emphasis>Tarball Extraction:</emphasis>
@@ -109,40 +97,27 @@
directory of your choice.</para> directory of your choice.</para>
<para>For example, the following command extracts the <para>For example, the following command extracts the
Yocto Project &DISTRO; release tarball Yocto Project &DISTRO; release tarball
into the current working directory and sets up the local into the current working directory and sets up the local Source Directory
Source Directory with a top-level folder named <filename>&YOCTO_POKY;</filename>:
with a top-level folder named
<filename>&YOCTO_POKY;</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ tar xfj &YOCTO_POKY_TARBALL; $ tar xfj &YOCTO_POKY_TARBALL;
</literallayout></para> </literallayout></para>
<para>This method does not produce a local Git <para>This method does not produce a local Git repository.
repository. Instead, you simply end up with a snapshot of the release.</para></listitem>
Instead, you simply end up with a snapshot of the <listitem><para><emphasis>Git Repository Method:</emphasis> If you are going to be contributing
release.</para></listitem> back into the Yocto Project or you simply want to keep up
<listitem><para><emphasis>Git Repository Method:</emphasis> with the latest developments, you should use Git commands to set up a local
If you are going to be contributing back into the Yocto Git repository of the upstream <filename>poky</filename> source repository.
Project or you simply want to keep up with the latest Doing so creates a repository with a complete history of changes and allows
developments, you should use Git commands to set up a you to easily submit your changes upstream to the project.
local Git repository of the upstream Because you clone the repository, you have access to all the Yocto Project development
<filename>poky</filename> source repository. branches and tag names used in the upstream repository.</para>
Doing so creates a repository with a complete history <note>You can view the Yocto Project Source Repositories at
of changes and allows you to easily submit your changes <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink></note>
upstream to the project. <para>The following transcript shows how to clone the <filename>poky</filename>
Because you clone the repository, you have access to all Git repository into the current working directory.
the Yocto Project development branches and tag names The command creates the local repository in a directory named <filename>poky</filename>.
used in the upstream repository. For information on Git used within the Yocto Project, see the
<note>You can view the Yocto Project Source Repositories
at
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>
</note></para>
<para>The following transcript shows how to clone the
<filename>poky</filename> Git repository into the
current working directory.
The command creates the local repository in a directory
named <filename>poky</filename>.
For information on Git used within the Yocto Project,
see the
"<link linkend='git'>Git</link>" section. "<link linkend='git'>Git</link>" section.
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ git clone git://git.yoctoproject.org/poky $ git clone git://git.yoctoproject.org/poky
@@ -152,19 +127,16 @@
remote: Total 203728 (delta 147444), reused 202891 (delta 146614) remote: Total 203728 (delta 147444), reused 202891 (delta 146614)
Receiving objects: 100% (203728/203728), 95.54 MiB | 308 KiB/s, done. Receiving objects: 100% (203728/203728), 95.54 MiB | 308 KiB/s, done.
Resolving deltas: 100% (147444/147444), done. Resolving deltas: 100% (147444/147444), done.
</literallayout> </literallayout></para>
For another example of how to set up your own local <para>For another example of how to set up your own local Git repositories, see this
Git repositories, see this <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>wiki page</ulink>, wiki page</ulink>, which describes how to create both <filename>poky</filename>
which describes how to create both and <filename>meta-intel</filename> Git repositories.</para></listitem>
<filename>poky</filename> and
<filename>meta-intel</filename> Git repositories.
</para></listitem>
</itemizedlist></para></listitem> </itemizedlist></para></listitem>
<listitem id='local-kernel-files'><para><emphasis>Yocto Project Kernel:</emphasis> <listitem id='local-kernel-files'><para><emphasis>Yocto Project Kernel:</emphasis>
If you are going to be making modifications to a supported Yocto Project kernel, you If you are going to be making modifications to a supported Yocto Project kernel, you
need to establish local copies of the source. need to establish local copies of the source.
You can find Git repositories of supported Yocto Project kernels organized under You can find Git repositories of supported Yocto Project Kernels organized under
"Yocto Linux Kernel" in the Yocto Project Source Repositories at "Yocto Linux Kernel" in the Yocto Project Source Repositories at
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para> <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
<para>This setup can involve creating a bare clone of the Yocto Project kernel and then <para>This setup can involve creating a bare clone of the Yocto Project kernel and then
@@ -183,7 +155,7 @@
<filename>linux-yocto-3.10.git</filename>, while the <filename>linux-yocto-3.10.git</filename>, while the
copy is named <filename>my-linux-yocto-3.10-work</filename>: copy is named <filename>my-linux-yocto-3.10-work</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ git clone &dash;&dash;bare git://git.yoctoproject.org/linux-yocto-3.10 linux-yocto-3.10.git $ git clone --bare git://git.yoctoproject.org/linux-yocto-3.10 linux-yocto-3.10.git
Cloning into bare repository 'linux-yocto-3.10.git'... Cloning into bare repository 'linux-yocto-3.10.git'...
remote: Counting objects: 3364487, done. remote: Counting objects: 3364487, done.
remote: Compressing objects: 100% (507178/507178), done. remote: Compressing objects: 100% (507178/507178), done.
@@ -249,39 +221,29 @@
</literallayout> </literallayout>
See the See the
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
section in the Yocto Project Board Support Package (BSP) section in the Yocto Project Board Support Package (BSP) Developer's Guide for more
Developer's Guide for more information on BSP Layers. information on BSP Layers.
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Tarball Extraction:</emphasis> <listitem><para><emphasis>Tarball Extraction:</emphasis> You can download any released
You can download any released BSP tarball from the same BSP tarball from the same "Downloads" page of the
"Downloads" page of the Yocto Project <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
<ulink url='https://www.yoctoproject.org/downloads'>Website</ulink>
to get the Yocto Project release. to get the Yocto Project release.
Once on the "Download" page, look to the right of the Once on the "Download" page, look to the right of the
page and scroll down to find the BSP tarballs.</para> page and scroll down to find the BSP tarballs.</para>
<para>Once you have the tarball, just extract it into a <para>Once you have the tarball, just extract it into a directory of your choice.
directory of your choice. Again, this method just produces a snapshot of the BSP layer in the form
Again, this method just produces a snapshot of the BSP of a hierarchical directory structure.</para></listitem>
layer in the form of a hierarchical directory <listitem><para><emphasis>Git Repository Method:</emphasis> If you are working
structure.</para></listitem> with a local Git repository for your Source Directory, you should also use this method
<listitem><para><emphasis>Git Repository Method:</emphasis> to set up the <filename>meta-intel</filename> Git repository.
If you are working with a local Git repository for your You can locate the <filename>meta-intel</filename> Git repository in the
Source Directory, you should also use this method to "Yocto Metadata Layers" area of the Yocto Project Source Repositories at
set up the <filename>meta-intel</filename> Git
repository.
You can locate the <filename>meta-intel</filename> Git
repository in the "Yocto Metadata Layers" area of the
Yocto Project Source Repositories at
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para> <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
<para>Using <para>Typically, you set up the <filename>meta-intel</filename> Git repository inside
<link linkend='git'>Git</link> to create a local clone
of the upstream repository can be helpful if you are
working with BSPs.
Typically, you set up the
<filename>meta-intel</filename> Git repository inside
the Source Directory. the Source Directory.
For example, the following transcript shows the steps For example, the following transcript shows the steps to clone the
to clone <filename>meta-intel</filename>. <filename>meta-intel</filename>
Git repository inside the local <filename>poky</filename> Git repository.
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd ~/poky $ cd ~/poky
$ git clone git://git.yoctoproject.org/meta-intel.git $ git clone git://git.yoctoproject.org/meta-intel.git
@@ -291,12 +253,12 @@
remote: Total 7366 (delta 3997), reused 7299 (delta 3930) remote: Total 7366 (delta 3997), reused 7299 (delta 3930)
Receiving objects: 100% (7366/7366), 2.31 MiB | 95 KiB/s, done. Receiving objects: 100% (7366/7366), 2.31 MiB | 95 KiB/s, done.
Resolving deltas: 100% (3997/3997), done. Resolving deltas: 100% (3997/3997), done.
</literallayout> </literallayout></para>
The same <para>The same
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>wiki page</ulink> <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>wiki page</ulink>
referenced earlier covers how to referenced earlier covers how to
set up the <filename>meta-intel</filename> Git set up the <filename>meta-intel</filename> Git repository.
repository.</para></listitem> </para></listitem>
</itemizedlist></para></listitem> </itemizedlist></para></listitem>
<listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing <listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing
applications using the Eclipse Integrated Development Environment (IDE), applications using the Eclipse Integrated Development Environment (IDE),

View File

@@ -56,26 +56,6 @@
<date>October 2013</date> <date>October 2013</date>
<revremark>Released with the Yocto Project 1.5 Release.</revremark> <revremark>Released with the Yocto Project 1.5 Release.</revremark>
</revision> </revision>
<revision>
<revnumber>1.5.1</revnumber>
<date>January 2014</date>
<revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.2</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.5.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.3</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.5.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.4</revnumber>
<date>December 2014</date>
<revremark>Released with the Yocto Project 1.5.4 Release.</revremark>
</revision>
</revhistory> </revhistory>
<copyright> <copyright>
@@ -92,10 +72,11 @@
</para> </para>
<note> <note>
For the latest version of this manual associated with this Due to production processes, there could be differences between the Yocto Project
Yocto Project release, see the documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink> <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink> on
from the Yocto Project website. the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note> </note>
</legalnotice> </legalnotice>

View File

@@ -95,7 +95,7 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink> <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
variable as follows: variable as follows:
<literallayout class='monospaced'> <literallayout class='monospaced'>
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}"
</literallayout> </literallayout>
The path <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename> The path <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
expands to "linux-yocto" in the current directory for this expands to "linux-yocto" in the current directory for this

View File

@@ -45,7 +45,7 @@
Here is an example that assumes the local Git repository for the kernel is in Here is an example that assumes the local Git repository for the kernel is in
a top-level directory named <filename>linux-yocto-3.4</filename>: a top-level directory named <filename>linux-yocto-3.4</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd linux-yocto-3.4 $ cd ~/linux-yocto-3.4
$ git checkout -b meta origin/meta $ git checkout -b meta origin/meta
</literallayout> </literallayout>
Once you have checked out and switched to the <filename>meta</filename> branch, Once you have checked out and switched to the <filename>meta</filename> branch,

View File

@@ -41,26 +41,6 @@
<date>October 2013</date> <date>October 2013</date>
<revremark>Released with the Yocto Project 1.5 Release.</revremark> <revremark>Released with the Yocto Project 1.5 Release.</revremark>
</revision> </revision>
<revision>
<revnumber>1.5.1</revnumber>
<date>January 2014</date>
<revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.2</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.5.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.3</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.5.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.4</revnumber>
<date>December 2014</date>
<revremark>Released with the Yocto Project 1.5.4 Release.</revremark>
</revision>
</revhistory> </revhistory>
<copyright> <copyright>
@@ -74,10 +54,11 @@
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons. the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para> </para>
<note> <note>
For the latest version of this manual associated with this Due to production processes, there could be differences between the Yocto Project
Yocto Project release, see the documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink> <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink> on
from the Yocto Project website. the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note> </note>
</legalnotice> </legalnotice>

View File

@@ -1,11 +1,11 @@
<!ENTITY DISTRO "1.5.4"> <!ENTITY DISTRO "1.5">
<!ENTITY DISTRO_COMPRESSED "154"> <!ENTITY DISTRO_COMPRESSED "15">
<!ENTITY DISTRO_NAME "dora"> <!ENTITY DISTRO_NAME "dora">
<!ENTITY YOCTO_DOC_VERSION "1.5.4"> <!ENTITY YOCTO_DOC_VERSION "1.5">
<!ENTITY POKYVERSION "10.0.4"> <!ENTITY POKYVERSION "10.0.0">
<!ENTITY POKYVERSION_COMPRESSED "1004"> <!ENTITY POKYVERSION_COMPRESSED "1000">
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;"> <!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
<!ENTITY COPYRIGHT_YEAR "2010-2014"> <!ENTITY COPYRIGHT_YEAR "2010-2013">
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org"> <!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org"> <!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org"> <!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
@@ -14,9 +14,9 @@
<!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org"> <!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org">
<!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org"> <!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org">
<!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org"> <!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/downloads/core/&DISTRO_NAME;&DISTRO_COMPRESSED;"> <!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/download/yocto-project-&DISTRO_COMPRESSED;-poky-&POKYVERSION_COMPRESSED;">
<!ENTITY OE_HOME_URL "http://www.openembedded.org"> <!ENTITY OE_HOME_URL "http://www.openembedded.org">
<!ENTITY OE_LISTS_URL "http://lists.openembedded.org/mailman"> <!ENTITY OE_LISTS_URL "http://lists.linuxtogo.org/cgi-bin/mailman">
<!ENTITY OE_DOCS_URL "http://docs.openembedded.org"> <!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
<!ENTITY OH_HOME_URL "http://o-hand.com"> <!ENTITY OH_HOME_URL "http://o-hand.com">
<!ENTITY BITBAKE_HOME_URL "http://developer.berlios.de/projects/bitbake/"> <!ENTITY BITBAKE_HOME_URL "http://developer.berlios.de/projects/bitbake/">
@@ -54,7 +54,7 @@
<!ENTITY YOCTO_POKY_TARBALL "&YOCTO_POKY;.tar.bz2"> <!ENTITY YOCTO_POKY_TARBALL "&YOCTO_POKY;.tar.bz2">
<!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env"> <!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env">
<!ENTITY OE_INIT_FILE "oe-init-build-env"> <!ENTITY OE_INIT_FILE "oe-init-build-env">
<!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "gawk wget git-core diffstat unzip texinfo gcc-multilib \ <!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "gawk wget git-core diffstat unzip texinfo \
build-essential chrpath"> build-essential chrpath">
<!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \ <!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \ diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \

View File

@@ -4,7 +4,7 @@
<chapter id='profile-manual-intro'> <chapter id='profile-manual-intro'>
<title>Yocto Project Profiling and Tracing Manual</title> <title>Yocto Project Tracing and Profiling Manual</title>
<section id='intro'> <section id='intro'>
<title>Introduction</title> <title>Introduction</title>
@@ -78,7 +78,7 @@
</para> </para>
<para> <para>
If you've already built a stripped image, you can generate If you've already build a stripped image, you can generate
debug packages (xxx-dbg) which you can manually install as debug packages (xxx-dbg) which you can manually install as
needed. needed.
</para> </para>

View File

@@ -22,7 +22,7 @@
<para> <para>
Don't let the fact that it's part of the kernel fool you into thinking Don't let the fact that it's part of the kernel fool you into thinking
that it's only for tracing and profiling the kernel - you can indeed that it's only for tracing and profiling the kernel - you can indeed
use it to trace and profile just the kernel, but you can also use it use it to trace and profile just the kernel , but you can also use it
to profile specific applications separately (with or without kernel to profile specific applications separately (with or without kernel
context), and you can also use it to trace and profile the kernel context), and you can also use it to trace and profile the kernel
and all applications on the system simultaneously to gain a system-wide and all applications on the system simultaneously to gain a system-wide
@@ -30,10 +30,10 @@
</para> </para>
<para> <para>
In many ways, perf aims to be a superset of all the tracing and profiling In many ways, it aims to be a superset of all the tracing and profiling
tools available in Linux today, including all the other tools covered tools available in Linux today, including all the other tools covered
in this HOWTO. The past couple of years have seen perf subsume a lot in this HOWTO. The past couple of years have seen perf subsume a lot
of the functionality of those other tools and, at the same time, those of the functionality of those other tools, and at the same time those
other tools have removed large portions of their previous functionality other tools have removed large portions of their previous functionality
and replaced it with calls to the equivalent functionality now and replaced it with calls to the equivalent functionality now
implemented by the perf subsystem. Extrapolation suggests that at implemented by the perf subsystem. Extrapolation suggests that at
@@ -126,7 +126,7 @@
wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink> wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
</literallayout> </literallayout>
The quickest and easiest way to get some basic overall data about The quickest and easiest way to get some basic overall data about
what's going on for a particular workload is to profile it using what's going on for a particular workload it to profile it using
'perf stat'. 'perf stat' basically profiles using a few default 'perf stat'. 'perf stat' basically profiles using a few default
counters and displays the summed counts at the end of the run: counters and displays the summed counts at the end of the run:
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -201,7 +201,7 @@
As our first attempt at profiling this workload, we'll simply As our first attempt at profiling this workload, we'll simply
run 'perf record', handing it the workload we want to profile run 'perf record', handing it the workload we want to profile
(everything after 'perf record' and any perf options we hand (everything after 'perf record' and any perf options we hand
it - here none - will be executed in a new shell). perf collects it - here none - will be executedin a new shell). perf collects
samples until the process exits and records them in a file named samples until the process exits and records them in a file named
'perf.data' in the current working directory. 'perf.data' in the current working directory.
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -241,7 +241,7 @@
Notice also that the above report shows an entry for 'busybox', Notice also that the above report shows an entry for 'busybox',
which is the executable that implements 'wget' in Yocto, but that which is the executable that implements 'wget' in Yocto, but that
instead of a useful function name in that entry, it displays instead of a useful function name in that entry, it displays
a not-so-friendly hex value instead. The steps below will show an not-so-friendly hex value instead. The steps below will show
how to fix that problem. how to fix that problem.
</para> </para>
@@ -308,7 +308,7 @@
</para> </para>
<para> <para>
Notice also that here there's also a case where the hex value Notice also that here there's also a case where the a hex value
is displayed in the callstack, here in the expanded is displayed in the callstack, here in the expanded
sys_clock_gettime() function. Later we'll see it resolve to a sys_clock_gettime() function. Later we'll see it resolve to a
userspace function call in busybox. userspace function call in busybox.
@@ -367,7 +367,7 @@
<para> <para>
To generate the debug info for the packages in the image, we can To generate the debug info for the packages in the image, we can
add dbg-pkgs to EXTRA_IMAGE_FEATURES in local.conf. For example: to add dbg-pkgs to EXTRA_IMAGE_FEATURES in local.conf. For example:
<literallayout class='monospaced'> <literallayout class='monospaced'>
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs" EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
</literallayout> </literallayout>
@@ -462,7 +462,7 @@
The tracing and profiling infrastructure in Linux has become The tracing and profiling infrastructure in Linux has become
unified in a way that allows us to use the same tool with a unified in a way that allows us to use the same tool with a
completely different set of counters, not just the standard completely different set of counters, not just the standard
hardware counters that traditional tools have had to restrict hardware counters that traditionally tools have had to restrict
themselves to (of course the traditional tools can also make use themselves to (of course the traditional tools can also make use
of the expanded possibilities now available to them, and in some of the expanded possibilities now available to them, and in some
cases have, as mentioned previously). cases have, as mentioned previously).
@@ -828,7 +828,7 @@
</para> </para>
<para> <para>
Luckily, there is a general-purpose way to handle such needs, Luckily, there is general-purpose way to handle such needs,
called 'programming languages'. Making programming languages called 'programming languages'. Making programming languages
easily available to apply to such problems given the specific easily available to apply to such problems given the specific
format of data is called a 'programming language binding' for format of data is called a 'programming language binding' for
@@ -842,7 +842,7 @@
idea. One of the first projects to do this was IBM's DProbes idea. One of the first projects to do this was IBM's DProbes
dpcc compiler, an ANSI C compiler which targeted a low-level dpcc compiler, an ANSI C compiler which targeted a low-level
assembly language running on an in-kernel interpreter on the assembly language running on an in-kernel interpreter on the
target system. This is exactly analogous to what Sun's DTrace target system. This is exactly analagous to what Sun's DTrace
did, except that DTrace invented its own language for the purpose. did, except that DTrace invented its own language for the purpose.
Systemtap, heavily inspired by DTrace, also created its own Systemtap, heavily inspired by DTrace, also created its own
one-off language, but rather than running the product on an one-off language, but rather than running the product on an
@@ -925,9 +925,9 @@
</literallayout> </literallayout>
Each event handler function in the generated code is modified Each event handler function in the generated code is modified
to do this. For convenience, we define a common function called to do this. For convenience, we define a common function called
inc_counts() that each handler calls; inc_counts() simply tallies inc_counts() that each handler calls; inc_counts simply tallies
a count for each event using the 'counts' hash, which is a a count for each event using the 'counts' hash, which is a
specialized hash function that does Perl-like autovivification, a specialized has function that does Perl-like autovivification, a
capability that's extremely useful for kinds of multi-level capability that's extremely useful for kinds of multi-level
aggregation commonly used in processing traces (see perf's aggregation commonly used in processing traces (see perf's
documentation on the Python language binding for details): documentation on the Python language binding for details):
@@ -1275,7 +1275,7 @@
</para> </para>
<informalexample> <informalexample>
<emphasis>Tying it Together:</emphasis> The trace events subsystem accommodate static <emphasis>Tying it Together:</emphasis> The trace events subsystem accomodate static
and dynamic tracepoints in exactly the same way - there's no and dynamic tracepoints in exactly the same way - there's no
difference as far as the infrastructure is concerned. See the difference as far as the infrastructure is concerned. See the
ftrace section for more details on the trace event subsystem. ftrace section for more details on the trace event subsystem.
@@ -1377,7 +1377,7 @@
the /tracing directory of the mounted debugfs filesystem the /tracing directory of the mounted debugfs filesystem
(Yocto follows the standard convention and mounts it (Yocto follows the standard convention and mounts it
at /sys/kernel/debug). Here's a listing of all the files at /sys/kernel/debug). Here's a listing of all the files
found in /sys/kernel/debug/tracing on a Yocto system: found in /sys/kernel/debug/tracing on a Yocto system.:
<literallayout class='monospaced'> <literallayout class='monospaced'>
root@sugarbay:/sys/kernel/debug/tracing# ls root@sugarbay:/sys/kernel/debug/tracing# ls
README kprobe_events trace README kprobe_events trace
@@ -1634,7 +1634,7 @@
Also notice that there are various annotations on the left Also notice that there are various annotations on the left
hand side of the display. For example if the total time it hand side of the display. For example if the total time it
took for a given function to execute is above a certain took for a given function to execute is above a certain
threshold, an exclamation point or plus sign appears on the threshold, and exclamation point or plus sign appears on the
left hand side. Please see the ftrace documentation for left hand side. Please see the ftrace documentation for
details on all these fields. details on all these fields.
</para> </para>
@@ -1842,7 +1842,7 @@
</literallayout> </literallayout>
You can enable any number of events or complete subsystems You can enable any number of events or complete subsystems
(by using the 'enable' file in the subsystem directory) and (by using the 'enable' file in the subsystem directory) and
get an arbitrarily fine-grained idea of what's going on in the get am arbitrarily fine-grained idea of what's going on in the
system by enabling as many of the appropriate tracepoints system by enabling as many of the appropriate tracepoints
as applicable. as applicable.
</para> </para>
@@ -1878,14 +1878,14 @@
in /sys/kernel/debug/tracing, allowing users to specify in /sys/kernel/debug/tracing, allowing users to specify
specific particular events within the specific particular events within the
/sys/kernel/debug/tracing/events/ subdirectory and to collect /sys/kernel/debug/tracing/events/ subdirectory and to collect
traces and avoid having to deal with those details directly. traces and avoiding having to deal with those details directly.
</para> </para>
<para> <para>
As yet another layer on top of that, kernelshark provides a GUI As yet another layer on top of that, kernelshark provides a GUI
that allows users to start and stop traces and specify sets that allows users to start and stop traces and specify sets
of events using an intuitive interface, and view the of events using an intuitive interface, and view the
output as both trace events and as a per-CPU graphical output as both trace events and as a per-cpu graphical
display. It directly uses 'trace-cmd' as the plumbing display. It directly uses 'trace-cmd' as the plumbing
that accomplishes all that underneath the covers (and that accomplishes all that underneath the covers (and
actually displays the trace-cmd command it uses, as we'll see). actually displays the trace-cmd command it uses, as we'll see).
@@ -1896,13 +1896,13 @@
<literallayout class='monospaced'> <literallayout class='monospaced'>
root@sugarbay:~# kernelshark root@sugarbay:~# kernelshark
</literallayout> </literallayout>
Then bring up the 'Capture' dialog by choosing from the The bring up the 'Capture' dialog by choosing from the
kernelshark menu: kernelshark menu:
<literallayout class='monospaced'> <literallayout class='monospaced'>
Capture | Record Capture | Record
</literallayout> </literallayout>
That will display the following dialog, which allows you to That will display the following dialog, which allows you to
choose one or more events (or even one or more complete choose on or more events (or even one or more complete
subsystems) to trace: subsystems) to trace:
</para> </para>
@@ -1911,7 +1911,7 @@
</para> </para>
<para> <para>
Note that these are exactly the same sets of events described Note that these are exactly the same set of events described
in the previous trace events subsystem section, and in fact in the previous trace events subsystem section, and in fact
is where trace-cmd gets them for kernelshark. is where trace-cmd gets them for kernelshark.
</para> </para>
@@ -1980,15 +1980,13 @@
<literallayout class='monospaced'> <literallayout class='monospaced'>
Documentation/trace/events.txt Documentation/trace/events.txt
</literallayout> </literallayout>
There is a nice series of articles on using There are a nice series of articles on using
ftrace and trace-cmd at LWN: ftrace and trace-cmd at LWN:
<itemizedlist> <itemizedlist>
<listitem><para><ulink url='http://lwn.net/Articles/365835/'>Debugging the kernel using Ftrace - part 1</ulink> <listitem><para><ulink url='http://lwn.net/Articles/365835/'>Debugging the kernel using Ftrace - part 1</ulink>
</para></listitem> </para></listitem>
<listitem><para><ulink url='http://lwn.net/Articles/366796/'>Debugging the kernel using Ftrace - part 2</ulink> <listitem><para><ulink url='http://lwn.net/Articles/366796/'>Debugging the kernel using Ftrace - part 2</ulink>
</para></listitem> </para></listitem>
<listitem><para><ulink url='http://lwn.net/Articles/370423/'>Secrets of the Ftrace function tracer</ulink>
</para></listitem>
<listitem><para><ulink url='https://lwn.net/Articles/410200/'>trace-cmd: A front-end for Ftrace</ulink> <listitem><para><ulink url='https://lwn.net/Articles/410200/'>trace-cmd: A front-end for Ftrace</ulink>
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
@@ -2024,7 +2022,7 @@
<ulink url='http://sourceware.org/systemtap/tutorial/'>SystemTap tutorial</ulink> <ulink url='http://sourceware.org/systemtap/tutorial/'>SystemTap tutorial</ulink>
simply prints a line every time any process on the system open()s simply prints a line every time any process on the system open()s
a file. For each line, it prints the executable name of the a file. For each line, it prints the executable name of the
program that opened the file, along with its PID, and the name program that opened the file, along with its pid, and the name
of the file it opened (or tried to open), which it extracts of the file it opened (or tried to open), which it extracts
from the open syscall's argstr. from the open syscall's argstr.
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -2098,15 +2096,6 @@
booted. The 'crosstap' script provides details on how booted. The 'crosstap' script provides details on how
to do this if you run the script on the host without having to do this if you run the script on the host without having
done a build: done a build:
<note>
SystemTap, which uses 'crosstap', assumes you can establish an
ssh connection to the remote target.
Please refer to the crosstap wiki page for details on verifying
ssh connections at
<ulink url='https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#systemtap'></ulink>.
Also, the ability to ssh into the target system is not enabled
by default in *-minimal images.
</note>
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ crosstap root@192.168.1.88 trace_open.stp $ crosstap root@192.168.1.88 trace_open.stp
@@ -2133,6 +2122,9 @@
the EXTRA_IMAGE_FEATURES variable ] the EXTRA_IMAGE_FEATURES variable ]
$ bitbake core-image-sato $ bitbake core-image-sato
[ NOTE that 'crosstap' needs to be able to ssh into the target
system, which isn't enabled by default in -minimal images. ]
Once you've build the image on the host system, you're ready to Once you've build the image on the host system, you're ready to
boot it (or the equivalent pre-built image) and use 'crosstap' boot it (or the equivalent pre-built image) and use 'crosstap'
to probe it (you need to source the environment as usual first): to probe it (you need to source the environment as usual first):
@@ -2203,7 +2195,7 @@
<para> <para>
If everything worked as planned, you should see something If everything worked as planned, you should see something
like this (enter the password when prompted, or press enter like this (enter the password when prompted, or press enter
if it's set up to use no password): if its set up to use no password):
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ crosstap root@192.168.7.2 trace_open.stp $ crosstap root@192.168.7.2 trace_open.stp
root@192.168.7.2's password: root@192.168.7.2's password:
@@ -2248,7 +2240,7 @@
</para> </para>
<para> <para>
For the section that deals with running oprofile from the command-line, For the the section that deals with oprofile from the command-line,
we assume you've ssh'ed to the host and will be running we assume you've ssh'ed to the host and will be running
oprofile on the target. oprofile on the target.
</para> </para>
@@ -2268,7 +2260,7 @@
Oprofile as configured in Yocto is a system-wide profiler Oprofile as configured in Yocto is a system-wide profiler
(i.e. the version in Yocto doesn't yet make use of the (i.e. the version in Yocto doesn't yet make use of the
perf_events interface which would allow it to profile perf_events interface which would allow it to profile
specific processes and workloads). It relies on hardware specific processes and workloads). It's relies on hardware
counter support in the hardware (but can fall back to a counter support in the hardware (but can fall back to a
timer-based mode), which means that it doesn't take timer-based mode), which means that it doesn't take
advantage of tracepoints or other event sources for example. advantage of tracepoints or other event sources for example.
@@ -2289,8 +2281,8 @@
<para> <para>
The oprofile daemon should already be running, but before The oprofile daemon should already be running, but before
you start profiling, you may need to change some settings you start profiling, you may need to change some settings
and some of these settings may require the daemon to not and some of these settings may require the daemon not
be running. One of these settings is the path to the be running. One of these settings is the path the the
vmlinux file, which you'll want to set using the --vmlinux vmlinux file, which you'll want to set using the --vmlinux
option if you want the kernel profiled: option if you want the kernel profiled:
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -2321,7 +2313,7 @@
Using log file /var/lib/oprofile/samples/oprofiled.log Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started. Daemon started.
</literallayout> </literallayout>
If we check the status again we now see our updated settings: If we get the status again we now see our updated settings:
<literallayout class='monospaced'> <literallayout class='monospaced'>
root@crownbay:~# opcontrol --status root@crownbay:~# opcontrol --status
Daemon paused: pid 1649 Daemon paused: pid 1649
@@ -2330,7 +2322,7 @@
Image filter: none Image filter: none
Call-graph depth: 6 Call-graph depth: 6
</literallayout> </literallayout>
We're now in a position to run a profile. For that we use We're now in a position to run a profile. For that we used
'opcontrol --start': 'opcontrol --start':
<literallayout class='monospaced'> <literallayout class='monospaced'>
root@crownbay:~# opcontrol --start root@crownbay:~# opcontrol --start
@@ -2342,10 +2334,10 @@
Connecting to downloads.yoctoproject.org (140.211.169.59:80) Connecting to downloads.yoctoproject.org (140.211.169.59:80)
linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
</literallayout> </literallayout>
To stop the profile we use 'opcontrol --shutdown', which not To stop the profile we use 'opcontrol --shudown', which not
only stops the profile but shuts down the daemon as well: only stops the profile but shuts down the daemon as well:
<literallayout class='monospaced'> <literallayout class='monospaced'>
root@crownbay:~# opcontrol --shutdown root@crownbay:~# opcontrol --start
Stopping profiling. Stopping profiling.
Killing daemon. Killing daemon.
</literallayout> </literallayout>
@@ -2904,7 +2896,7 @@
<para> <para>
Once you've applied the above commits and built and booted your Once you've applied the above commits and built and booted your
image (you need to build the core-image-sato-sdk image or use one of the image (you need to build the core-image-sato-sdk image or the
other methods described in the General Setup section), you're other methods described in the General Setup section), you're
ready to start tracing. ready to start tracing.
</para> </para>
@@ -2913,7 +2905,7 @@
<title>Collecting and viewing a trace on the target (inside a shell)</title> <title>Collecting and viewing a trace on the target (inside a shell)</title>
<para> <para>
First, from the host, ssh to the target: First, from the target, ssh to the target:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ ssh -l root 192.168.1.47 $ ssh -l root 192.168.1.47
The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established. The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established.
@@ -3014,7 +3006,7 @@
<title>Collecting and viewing a userspace trace on the target (inside a shell)</title> <title>Collecting and viewing a userspace trace on the target (inside a shell)</title>
<para> <para>
For LTTng userspace tracing, you need to have a properly For lttng userspace tracing, you need to have a properly
instrumented userspace program. For this example, we'll use instrumented userspace program. For this example, we'll use
the 'hello' test program generated by the lttng-ust build. the 'hello' test program generated by the lttng-ust build.
</para> </para>
@@ -3036,7 +3028,7 @@
</para> </para>
<para> <para>
First, from the host, ssh to the target: First, from the target, ssh to the target:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ ssh -l root 192.168.1.47 $ ssh -l root 192.168.1.47
The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established. The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established.
@@ -3258,25 +3250,15 @@
<title>Documentation</title> <title>Documentation</title>
<para> <para>
You can find the primary LTTng Documentation on the There doesn't seem to be any current documentation covering
<ulink url='https://lttng.org/docs/'>LTTng Documentation</ulink> LTTng 2.0, but maybe that's because the project is in transition.
site. The LTTng 2.0 website, however, is here:
The documentation on this site is appropriate for intermediate to
advanced software developers who are working in a Linux environment
and are interested in efficient software tracing.
</para>
<para>
For information on LTTng in general, visit the
<ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink> <ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
site.
You can find a "Getting Started" link on this site that takes
you to an LTTng Quick Start.
</para> </para>
<para> <para>
Finally, you can access extensive help information on how to use You can access extensive help information on how to use the
the LTTng plug-in to search and analyze captured traces via the LTTng plug-in to search and analyze captured traces via the
Eclipse help system: Eclipse help system:
<literallayout class='monospaced'> <literallayout class='monospaced'>
Help | Help Contents | LTTng Plug-in User Guide Help | Help Contents | LTTng Plug-in User Guide
@@ -3612,7 +3594,7 @@
It's also possible to trace block I/O using only It's also possible to trace block I/O using only
<link linkend='the-trace-events-subsystem'>trace events subsystem</link>, <link linkend='the-trace-events-subsystem'>trace events subsystem</link>,
which can be useful for casual tracing which can be useful for casual tracing
if you don't want to bother dealing with the userspace tools. if you don't want bother dealing with the userspace tools.
</para> </para>
<para> <para>

View File

@@ -41,26 +41,6 @@
<date>October 2013</date> <date>October 2013</date>
<revremark>Released with the Yocto Project 1.5 Release.</revremark> <revremark>Released with the Yocto Project 1.5 Release.</revremark>
</revision> </revision>
<revision>
<revnumber>1.5.1</revnumber>
<date>January 2014</date>
<revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.2</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.5.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.3</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.5.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.4</revnumber>
<date>December 2014</date>
<revremark>Released with the Yocto Project 1.5.4 Release.</revremark>
</revision>
</revhistory> </revhistory>
<copyright> <copyright>
@@ -77,10 +57,11 @@
</para> </para>
<note> <note>
For the latest version of this manual associated with this Due to production processes, there could be differences between the Yocto Project
Yocto Project release, see the documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink> <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Tracing and Profiling Manual</ulink> on
from the Yocto Project website. the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note> </note>
</legalnotice> </legalnotice>

View File

@@ -267,7 +267,7 @@
<para> <para>
The previous section described the user configurations that The previous section described the user configurations that
define BitBake's global behavior. define the BitBake's global behavior.
This section takes a closer look at the layers the build system This section takes a closer look at the layers the build system
uses to further control the build. uses to further control the build.
These layers provide Metadata for the software, machine, and These layers provide Metadata for the software, machine, and
@@ -363,7 +363,7 @@
for what you typically find in the distribution layer: for what you typically find in the distribution layer:
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>classes:</emphasis> <listitem><para><emphasis>classes:</emphasis>
Class files (<filename>.bbclass</filename>) hold Class files (<filename>.bbclass</filename>) holds
common functionality that can be shared among common functionality that can be shared among
recipes in the distribution. recipes in the distribution.
When your recipes inherit a class, they take on the When your recipes inherit a class, they take on the
@@ -381,7 +381,7 @@
<listitem><para><emphasis>recipes-*:</emphasis> <listitem><para><emphasis>recipes-*:</emphasis>
Recipes and append files that affect common Recipes and append files that affect common
functionality across the distribution. functionality across the distribution.
This area could include recipes and append files This area could include recipes and append files to
to add distribution-specific configuration, to add distribution-specific configuration,
initialization scripts, custom image recipes, initialization scripts, custom image recipes,
and so forth.</para></listitem> and so forth.</para></listitem>
@@ -421,7 +421,7 @@
Metadata can exist for multiple formfactors, graphics Metadata can exist for multiple formfactors, graphics
support systems, and so forth. support systems, and so forth.
<note> <note>
While the figure shows several <filename>recipes-*</filename> While the figure shows several <filename>recipe-*</filename>
directories, not all these directories appear in all directories, not all these directories appear in all
BSP layers. BSP layers.
</note> </note>
@@ -487,7 +487,7 @@
<para> <para>
Another area that plays a significant role in where source files Another area that plays a significant role in where source files
come from is pointed to by the comes from is pointed to by the
<link linkend='var-DL_DIR'><filename>DL_DIR</filename></link> <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
variable. variable.
This area is a cache that can hold previously downloaded source. This area is a cache that can hold previously downloaded source.
@@ -546,7 +546,7 @@
The canonical method through which to include a local project The canonical method through which to include a local project
is to use the is to use the
<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link> <link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>
class to include that local project. class to include local project.
You use either the <filename>local.conf</filename> or a You use either the <filename>local.conf</filename> or a
recipe's append file to override or set the recipe's append file to override or set the
recipe to point to the local directory on your disk to pull recipe to point to the local directory on your disk to pull
@@ -693,7 +693,7 @@
<para> <para>
The <filename>do_fetch</filename> and The <filename>do_fetch</filename> and
<filename>do_unpack</filename> tasks fetch the source files <filename>do_unpack</filename> tasks fetch the source files
and unpack them into the work directory. and unpack them into a working directory.
By default, everything is accomplished in the By default, everything is accomplished in the
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>, <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
which has a defined structure. which has a defined structure.
@@ -704,11 +704,11 @@
</para> </para>
<para> <para>
Unpacked source files are pointed to by the Unpacked source source files are pointed to by the
<link linkend='var-S'><filename>S</filename></link> variable. <link linkend='var-S'><filename>S</filename></link> variable.
Each recipe has an area in the Build Directory where the Each recipe has an area in the Build Directory where the
unpacked source code resides. unpacked source code resides.
The name of that directory for any given recipe is defined from The name of directory for any given recipe is defined from
several different variables. several different variables.
You can see the variables that define these directories You can see the variables that define these directories
by looking at the figure: by looking at the figure:
@@ -809,7 +809,7 @@
variable. variable.
For information on how this variable works within For information on how this variable works within
that class, see the that class, see the
<filename>meta/classes/autotools.bbclass</filename> file. <filename>meta/classes/autotools.bbclass</filename>.
</para></listitem> </para></listitem>
<listitem><para><emphasis><filename>do_compile</filename>:</emphasis> <listitem><para><emphasis><filename>do_compile</filename>:</emphasis>
Once a configuration task has been satisfied, BitBake Once a configuration task has been satisfied, BitBake
@@ -818,8 +818,8 @@
Compilation occurs in the directory pointed to by the Compilation occurs in the directory pointed to by the
<link linkend='var-B'><filename>B</filename></link> <link linkend='var-B'><filename>B</filename></link>
variable. variable.
Realize that the <filename>B</filename> directory is, by Realize that the <filename>B</filename> directory, by
default, the same as the default, is the same as the
<link linkend='var-S'><filename>S</filename></link> <link linkend='var-S'><filename>S</filename></link>
directory.</para></listitem> directory.</para></listitem>
<listitem><para><emphasis><filename>do_install</filename>:</emphasis> <listitem><para><emphasis><filename>do_install</filename>:</emphasis>
@@ -948,7 +948,7 @@
<para> <para>
During image generation, the build system attempts to run During image generation, the build system attempts to run
all post-installation scripts. all post installation scripts.
Any that fail to run on the build host are run on the Any that fail to run on the build host are run on the
target when the target system is first booted. target when the target system is first booted.
If you are using a If you are using a
@@ -1052,7 +1052,7 @@
<para> <para>
The images produced by the OpenEmbedded build system The images produced by the OpenEmbedded build system
are compressed forms of the are compressed forms of the
root filesystem that are ready to boot on a target device. root filesystems that are ready to boot on a target device.
You can see from the You can see from the
<link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link> <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
that BitBake output in part consists of images. that BitBake output in part consists of images.
@@ -1062,14 +1062,14 @@
<para> <para>
For a list of example images that the Yocto Project provides, For a list of example images that the Yocto Project provides,
see the the
"<link linkend='ref-images'>Images</link>" chapter. "<link linkend='ref-images'>Images</link>" chapter.
</para> </para>
<para> <para>
Images are written out to the Images are written out to the
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
inside the <filename>tmp/deploy/images/&lt;machine&gt;/</filename> inside the <filename>deploy/images/&lt;machine&gt;/</filename>
folder as shown in the figure. folder as shown in the figure.
This folder contains any files expected to be loaded on the This folder contains any files expected to be loaded on the
target device. target device.

View File

@@ -31,19 +31,31 @@
<qandaentry> <qandaentry>
<question> <question>
<para> <para>
My development system does not have Python 2.7.3 or greater, I only have Python 2.4 or 2.5 but BitBake requires Python 2.6 or 2.7.
which the Yocto Project requires.
Can I still use the Yocto Project? Can I still use the Yocto Project?
</para> </para>
</question> </question>
<answer> <answer>
<para> <para>
You can get the required tools on your host development You can use a stand-alone tarball to provide Python 2.6.
system a couple different ways (i.e. building a tarball or You can find pre-built 32 and 64-bit versions of Python 2.6 at the following locations:
downloading a tarball). <itemizedlist>
See the <listitem><para><ulink url='&YOCTO_PYTHON-i686_DL_URL;'>32-bit tarball</ulink></para></listitem>
"<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>" <listitem><para><ulink url='&YOCTO_PYTHON-x86_64_DL_URL;'>64-bit tarball</ulink></para></listitem>
section for steps on how to update your build tools. </itemizedlist>
</para>
<para>
These tarballs are self-contained with all required libraries and should work
on most Linux systems.
To use the tarballs extract them into the root
directory and run the appropriate command:
<literallayout class='monospaced'>
$ export PATH=/opt/poky/sysroots/i586-pokysdk-linux/usr/bin/:$PATH
$ export PATH=/opt/poky/sysroots/x86_64-pokysdk-linux/usr/bin/:$PATH
</literallayout>
</para>
<para>
Once you run the command, BitBake uses Python 2.6.
</para> </para>
</answer> </answer>
</qandaentry> </qandaentry>
@@ -199,7 +211,7 @@
</answer> </answer>
</qandaentry> </qandaentry>
<!-- <qandaentry> <qandaentry>
<question> <question>
<para> <para>
How do I make the Yocto Project work in RHEL/CentOS? How do I make the Yocto Project work in RHEL/CentOS?
@@ -246,7 +258,7 @@
Wiki page.</para> Wiki page.</para>
</note> </note>
</answer> </answer>
</qandaentry> --> </qandaentry>
<qandaentry> <qandaentry>
<question> <question>

View File

@@ -121,6 +121,11 @@
</para> </para>
<para> <para>
Refer to
<ulink url='&OE_HOME_URL;/index.php?title=OEandYourDistro'>OE and Your Distro</ulink> and
<ulink url='&OE_HOME_URL;/index.php?title=Required_software'>Required Software</ulink>
for information for information about dependencies and
requirements.
If you encounter problems, please go to If you encounter problems, please go to
<ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink> <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
and submit a bug. and submit a bug.
@@ -246,11 +251,11 @@
</section> </section>
<section id='opensuse-packages'> <section id='opensuse-packages'>
<title>openSUSE Packages</title> <title>OpenSUSE Packages</title>
<para> <para>
The following list shows the required packages by function The following list shows the required packages by function
given a supported openSUSE Linux distribution: given a supported OpenSUSE Linux distribution:
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Essentials:</emphasis> <listitem><para><emphasis>Essentials:</emphasis>
Packages needed to build an image for a headless Packages needed to build an image for a headless
@@ -285,17 +290,11 @@
<para> <para>
The following list shows the required packages by function The following list shows the required packages by function
given a supported CentOS Linux distribution: given a supported CentOS Linux distribution:
<note> <note>Depending on the CentOS version you are using, other requirements
For CentOS 6.x, some of the versions of the components and dependencies might exist.
provided by the distribution are too old (e.g. Git, Python, For details, you should look at the CentOS sections on the
and tar). <ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
It is recommended that you install the buildtools in order wiki page.
to provide versions that will work with the OpenEmbedded
build system.
For information on how to install the buildtools tarball,
see the
"<link linkend='required-git-tar-and-python-versions'>Required Git, Tar, and Python Versions</link>"
section.
</note> </note>
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Essentials:</emphasis> <listitem><para><emphasis>Essentials:</emphasis>
@@ -347,8 +346,8 @@
you can resolve this by either downloading a pre-built tarball you can resolve this by either downloading a pre-built tarball
containing these tools, or building such a tarball on another containing these tools, or building such a tarball on another
system. system.
Regardless of the method, once you have the tarball, you simply Regardless of the method, once you have the tarball you simply
install it somewhere on your system, such as a directory in your install it somewhere on you system, such as a directory in your
home directory, and then source the environment script provided, home directory, and then source the environment script provided,
which adds the tools into <filename>PATH</filename> and sets which adds the tools into <filename>PATH</filename> and sets
any other environment variables required to run the tools. any other environment variables required to run the tools.
@@ -359,7 +358,7 @@
<para> <para>
If downloading a pre-built tarball, locate the If downloading a pre-built tarball, locate the
<filename>*.sh</filename> at <filename>*.sh</filename> at
<ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/buildtools/'></ulink>. <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-1.5/buildtools/'></ulink>.
</para> </para>
<para> <para>
@@ -372,7 +371,7 @@
variable determines whether you build tools for a 32-bit variable determines whether you build tools for a 32-bit
or 64-bit system. or 64-bit system.
</note> </note>
Once the build completes, you can find the file that installs Once the build completes, you can find the file that installs the
the tools in the <filename>tmp/deploy/sdk</filename> subdirectory the tools in the <filename>tmp/deploy/sdk</filename> subdirectory
of the of the
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.

View File

@@ -34,7 +34,7 @@
<para> <para>
The shared state cache (sstate-cache), as pointed to by The shared state cache (sstate-cache), as pointed to by
<link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>, by default <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>, by default
now has two-character subdirectories to prevent issues arising now has two-character subdirectories to prevent issues rising
from too many files in the same directory. from too many files in the same directory.
Also, native sstate-cache packages will go into a subdirectory named using Also, native sstate-cache packages will go into a subdirectory named using
the distro ID string. the distro ID string.
@@ -157,7 +157,7 @@
<link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>, <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>,
and so forth. and so forth.
See the See the
"<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>" "<link linkend='ref-classes-packagegroup'>Package Groups - packagegroup.bbclass</link>"
section for further details. section for further details.
</para> </para>
</section> </section>
@@ -755,7 +755,7 @@
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
rather than rather than
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>. <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>.
Doing so makes it easier to delete Doing so makes it a easier to delete
<filename>TMPDIR</filename> and preserve the build history. <filename>TMPDIR</filename> and preserve the build history.
Additionally, data for produced SDKs is now split by Additionally, data for produced SDKs is now split by
<link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>. <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>.
@@ -829,10 +829,10 @@
</section> </section>
<section id='migration-1.5-run'> <section id='migration-1.5-run'>
<title><filename>run</filename></title> <title><filename>/run</filename></title>
<para> <para>
The <filename>run</filename> directory from the Filesystem The <filename>/run</filename> directory from the Filesystem
Hierarchy Standard 3.0 has been introduced. Hierarchy Standard 3.0 has been introduced.
You can find some of the implications for this change You can find some of the implications for this change
<ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873'>here</ulink>. <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873'>here</ulink>.
@@ -886,7 +886,7 @@
<para> <para>
For more information, see the For more information, see the
"<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>" "<link linkend='ref-classes-packagegroup'>Package Groups - <filename>packagegroup.bbclass</filename></link>"
section. section.
</para> </para>
</section> </section>
@@ -1033,7 +1033,7 @@
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<filename>base-files</filename>: Remove the unnecessary <filename>base-files</filename>: Remove the unnecessary
<filename>media/xxx</filename> directories. <filename>/media/xxx</filename> directories.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<filename>alsa-state</filename>: Provide an empty <filename>alsa-state</filename>: Provide an empty

View File

@@ -222,7 +222,7 @@
<para> <para>
As each task completes, a timestamp is written to the directory specified by the As each task completes, a timestamp is written to the directory specified by the
<filename><link linkend='var-STAMP'>STAMP</link></filename> variable. <filename><link linkend='var-STAMP'>STAMP</link></filename> variable.
On subsequent runs, BitBake looks within the <filename>build/tmp/stamps</filename> On subsequent runs, BitBake looks within the <filename>/build/tmp/stamps</filename>
directory and does not rerun directory and does not rerun
tasks that are already completed unless a timestamp is found to be invalid. tasks that are already completed unless a timestamp is found to be invalid.
Currently, invalid timestamps are only considered on a per Currently, invalid timestamps are only considered on a per

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] > [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
<chapter id='ref-features'> <chapter id='ref-features'>
<title>Features</title> <title>Reference: Features</title>
<para> <para>
This chapter provides a reference of shipped machine and distro features This chapter provides a reference of shipped machine and distro features
@@ -38,34 +38,23 @@
Here is an example that discovers the recipes whose build is potentially Here is an example that discovers the recipes whose build is potentially
changed based on a given feature: changed based on a given feature:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd poky $ cd $HOME/poky
$ git grep 'contains.*MACHINE_FEATURES.*&lt;feature&gt;' $ git grep 'contains.*MACHINE_FEATURES.*&lt;feature&gt;'
</literallayout> </literallayout>
</para> </para>
<section id='ref-features-distro'> <section id='ref-features-distro'>
<title>Distro Features</title> <title>Distro</title>
<para> <para>
The items below are features you can use with The items below are features you can use with
<link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link> <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
to enable features across your distribution. Features do not have a one-to-one correspondence to packages, and they can
Features do not have a one-to-one correspondence to packages, go beyond simply controlling the installation of a package or packages.
and they can go beyond simply controlling the installation of a Sometimes a feature can influence how certain recipes are built.
package or packages. For example, a feature might determine whether a particular configure option
In most cases, the presence or absence of a feature translates to is specified within <filename>do_configure</filename> for a particular
the appropriate option supplied to the configure script during recipe.
<filename>do_configure</filename> for the recipes that optionally
support the feature.
</para>
<para>
Some distro features are also machine features.
These select features make sense to be controlled both at
the machine and distribution configuration level.
See the
<ulink url='&YOCTO_DOCS_REF_URL;#var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></ulink>
variable for more information.
</para> </para>
<para> <para>
@@ -78,9 +67,6 @@
bluetooth support (integrated BT only).</para></listitem> bluetooth support (integrated BT only).</para></listitem>
<listitem><para><emphasis>cramfs:</emphasis> Include CramFS <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
support.</para></listitem> support.</para></listitem>
<listitem><para><emphasis>directfb:</emphasis>
Include DirectFB support.
</para></listitem>
<listitem><para><emphasis>ext2:</emphasis> Include tools for <listitem><para><emphasis>ext2:</emphasis> Include tools for
supporting for devices with internal HDD/Microdrive for supporting for devices with internal HDD/Microdrive for
storing files (instead of Flash only devices). storing files (instead of Flash only devices).
@@ -89,7 +75,7 @@
support.</para></listitem> support.</para></listitem>
<listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support. <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
</para></listitem> </para></listitem>
<listitem><para><emphasis>irda:</emphasis> Include IrDA support. <listitem><para><emphasis>irda:</emphasis> Include Irda support.
</para></listitem> </para></listitem>
<listitem><para><emphasis>keyboard:</emphasis> Include keyboard <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
support (e.g. keymaps will be loaded during boot). support (e.g. keymaps will be loaded during boot).
@@ -134,7 +120,7 @@
</section> </section>
<section id='ref-features-machine'> <section id='ref-features-machine'>
<title>Machine Features</title> <title>Machine</title>
<para> <para>
The items below are features you can use with The items below are features you can use with
@@ -160,7 +146,7 @@
</para></listitem> </para></listitem>
<listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
</para></listitem> </para></listitem>
<listitem><para><emphasis>irda:</emphasis> Hardware has IrDA support <listitem><para><emphasis>irda:</emphasis> Hardware has Irda support
</para></listitem> </para></listitem>
<listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
</para></listitem> </para></listitem>
@@ -185,7 +171,7 @@
</section> </section>
<section id='ref-features-image'> <section id='ref-features-image'>
<title>Image Features</title> <title>Images</title>
<para> <para>
The contents of images generated by the OpenEmbedded build system can be controlled by the The contents of images generated by the OpenEmbedded build system can be controlled by the

View File

@@ -90,18 +90,14 @@
<listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis> <listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
An image with support for the Open GL-based toolkit Clutter, which enables development of An image with support for the Open GL-based toolkit Clutter, which enables development of
rich and animated graphical user interfaces.</para></listitem> rich and animated graphical user interfaces.</para></listitem>
<listitem><para><emphasis><filename>core-image-directfb</filename>:</emphasis> <listitem><para><emphasis><filename>core-image-gtk-directfb</filename>:</emphasis>
An image that uses <filename>directfb</filename> instead of X11. An image that uses <filename>gtk+</filename> over <filename>directfb</filename>
</para></listitem> instead of X11.
In order to build, this image requires specific distro configuration that enables
<filename>gtk</filename> over <filename>directfb</filename>.</para></listitem>
<listitem><para><emphasis><filename>core-image-x11</filename>:</emphasis> <listitem><para><emphasis><filename>core-image-x11</filename>:</emphasis>
A very basic X11 image with a terminal. A very basic X11 image with a terminal.
</para></listitem> </para></listitem>
<listitem><para><emphasis><filename>core-image-weston</filename>:</emphasis>
An image that provides the Wayland protocol libraries and the
reference Weston compositor.
For more information, see the
"<link linkend='wayland'>Wayland</link>" section.
</para></listitem>
<listitem><para><emphasis><filename>qt4e-demo-image</filename>:</emphasis> <listitem><para><emphasis><filename>qt4e-demo-image</filename>:</emphasis>
An image that launches into the demo application for the embedded An image that launches into the demo application for the embedded
(not based on X11) version of Qt.</para></listitem> (not based on X11) version of Qt.</para></listitem>

View File

@@ -72,26 +72,6 @@
<date>October 2013</date> <date>October 2013</date>
<revremark>Released with the Yocto Project 1.5 Release.</revremark> <revremark>Released with the Yocto Project 1.5 Release.</revremark>
</revision> </revision>
<revision>
<revnumber>1.5.1</revnumber>
<date>January 2014</date>
<revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.2</revnumber>
<date>May 2014</date>
<revremark>Released with the Yocto Project 1.5.2 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.3</revnumber>
<date>July 2014</date>
<revremark>Released with the Yocto Project 1.5.3 Release.</revremark>
</revision>
<revision>
<revnumber>1.5.4</revnumber>
<date>December 2014</date>
<revremark>Released with the Yocto Project 1.5.4 Release.</revremark>
</revision>
</revhistory> </revhistory>
<copyright> <copyright>
@@ -105,10 +85,11 @@
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons. the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para> </para>
<note> <note>
For the latest version of this manual associated with this Due to production processes, there could be differences between the Yocto Project
Yocto Project release, see the documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink> <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink> on
from the Yocto Project website. the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note> </note>
</legalnotice> </legalnotice>

View File

@@ -39,27 +39,23 @@
<para> <para>
This directory includes a copy of BitBake for ease of use. This directory includes a copy of BitBake for ease of use.
The copy usually matches the current stable BitBake release from The copy usually matches the current stable BitBake release from the BitBake project.
the BitBake project.
BitBake, a BitBake, a
<ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
interpreter, reads the Yocto Project Metadata and runs the tasks interpreter, reads the Yocto Project metadata and runs the tasks
defined by that data. defined by that data.
Failures are usually from the Metadata and not from BitBake itself. Failures are usually from the metadata and not from BitBake itself.
Consequently, most users do not need to worry about BitBake. Consequently, most users do not need to worry about BitBake.
</para> </para>
<para> <para>
When you run the <filename>bitbake</filename> command, the When you run the <filename>bitbake</filename> command, the wrapper script in
main BitBake executable, which resides in the <filename>scripts/</filename> is executed to run the main BitBake executable,
<filename>bitbake/bin/</filename> directory, starts. which resides in the <filename>bitbake/bin/</filename> directory.
Sourcing an environment setup script (e.g. Sourcing the <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
<link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link> script places the <filename>scripts</filename> and <filename>bitbake/bin</filename>
or directories (in that order) into the shell's <filename>PATH</filename> environment
<link linkend="structure-memres-core-script"><filename>oe-init-build-env-memres</filename></link>) variable.
places the <filename>scripts</filename> and
<filename>bitbake/bin</filename> directories (in that order) into
the shell's <filename>PATH</filename> environment variable.
</para> </para>
<para> <para>
@@ -101,7 +97,7 @@
</section> </section>
<section id='handbook'> <section id='handbook'>
<title><filename>documentation/</filename></title> <title><filename>documentation</filename></title>
<para> <para>
This directory holds the source for the Yocto Project documentation This directory holds the source for the Yocto Project documentation
@@ -109,7 +105,7 @@
versions of the manuals. versions of the manuals.
Each manual is contained in a sub-folder. Each manual is contained in a sub-folder.
For example, the files for this manual reside in For example, the files for this manual reside in
the <filename>ref-manual/</filename> directory. <filename>ref-manual</filename>.
</para> </para>
</section> </section>
@@ -179,9 +175,9 @@
</para> </para>
<para> <para>
The <filename>scripts</filename> directory has useful scripts that assist in contributing The <filename>scripts</filename> directory has useful scripts that assist contributing
back to the Yocto Project, such as <filename>create-pull-request</filename> and back to the Yocto Project, such as <filename>create_pull_request</filename> and
<filename>send-pull-request</filename>. <filename>send_pull_request</filename>.
</para> </para>
</section> </section>
@@ -209,8 +205,7 @@
<para> <para>
By default, running this script without a By default, running this script without a
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
argument creates the <filename>build</filename> directory argument creates the <filename>build</filename> directory.
in your current working directory.
If you provide a Build Directory argument when you If you provide a Build Directory argument when you
<filename>source</filename> the script, you direct the OpenEmbedded <filename>source</filename> the script, you direct the OpenEmbedded
build system to create a Build Directory of your choice. build system to create a Build Directory of your choice.
@@ -236,10 +231,10 @@
<title><filename>oe-init-build-env-memres</filename></title> <title><filename>oe-init-build-env-memres</filename></title>
<para> <para>
This script is one of two scripts that set up the OpenEmbedded This script is one of two scripts that set up the OpenEmbedded build
build environment. environment.
Aside from setting up the environment, this script starts a Setting up the environment with this script uses a
memory-resident BitBake server. memory-resident BitBake.
For information on the other setup script, see the For information on the other setup script, see the
"<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>" "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
section. section.
@@ -264,7 +259,7 @@
</para> </para>
<para> <para>
You need to run an environment setup script before using BitBake You need to run an environment setup script before running BitBake
commands. commands.
Following is the script syntax: Following is the script syntax:
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -275,20 +270,19 @@
</para> </para>
<para> <para>
If you do not provide a port number with the script, the If you do not provide a port number with the script, the default
BitBake server at port "12345" is started. port "12345" is used.
</para> </para>
<para> <para>
By default, running this script without a By default, running this script without a
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
argument creates a build directory named argument creates the <filename>build</filename> directory.
<filename>build</filename>.
If you provide a Build Directory argument when you If you provide a Build Directory argument when you
<filename>source</filename> the script, the Build Directory is <filename>source</filename> the script, you direct the OpenEmbedded
created using that name. build system to create a Build Directory of your choice.
For example, the following command starts the BitBake server using For example, the following command uses the default port number
the default port "12345" and creates a Build Directory named "12345" and creates a Build Directory named
<filename>mybuilds</filename> that is outside of the <filename>mybuilds</filename> that is outside of the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>: <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -327,6 +321,15 @@
By default, this directory is named <filename>build</filename>. By default, this directory is named <filename>build</filename>.
</para> </para>
<section id='structure-build-pseudodone'>
<title><filename>build/pseudodone</filename></title>
<para>
This tag file indicates that the initial pseudo binary was created.
The file is built the first time BitBake is invoked.
</para>
</section>
<section id='structure-build-conf-local.conf'> <section id='structure-build-conf-local.conf'>
<title><filename>build/conf/local.conf</filename></title> <title><filename>build/conf/local.conf</filename></title>
@@ -347,7 +350,7 @@
<filename><link linkend='var-MACHINE'>MACHINE</link></filename> <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
for which you want to build, which package types you wish to use for which you want to build, which package types you wish to use
(<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>), (<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
the location from which you want to access downloaded files the location from which you want to downloaded files
(<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>), (<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>),
and how you want your host machine to use resources and how you want your host machine to use resources
(<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link> (<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
@@ -369,9 +372,9 @@
<para> <para>
The source <filename>local.conf.sample</filename> file used The source <filename>local.conf.sample</filename> file used
depends on the <filename>$TEMPLATECONF</filename> script variable, depends on the <filename>$TEMPLATECONF</filename> script variable,
which defaults to <filename>meta-yocto/conf</filename> which defaults to <filename>/meta-yocto/conf</filename>
when you are building from the Yocto Project development when you are building from the Yocto Project development
environment and defaults to <filename>meta/conf</filename> when environment and defaults to <filename>/meta/conf</filename> when
you are building from the OpenEmbedded Core environment. you are building from the OpenEmbedded Core environment.
Because the script variable points to the source of the Because the script variable points to the source of the
<filename>local.conf.sample</filename> file, this implies that <filename>local.conf.sample</filename> file, this implies that
@@ -388,11 +391,11 @@
<note> <note>
You can see how the <filename>TEMPLATECONF</filename> variable You can see how the <filename>TEMPLATECONF</filename> variable
is used by looking at the is used by looking at the
<filename>scripts/oe-setup-builddir</filename> script in the <filename>/scripts/oe-setup-builddir</filename> script in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
You can find the Yocto Project version of the You can find the Yocto Project version of the
<filename>local.conf.sample</filename> file in the <filename>local.conf.sample</filename> file in the
<filename>meta-yocto/conf</filename> directory. <filename>/meta-yocto/conf</filename> directory.
</note> </note>
</para> </para>
</section> </section>
@@ -425,9 +428,9 @@
<para> <para>
The source <filename>bblayers.conf.sample</filename> file used The source <filename>bblayers.conf.sample</filename> file used
depends on the <filename>$TEMPLATECONF</filename> script variable, depends on the <filename>$TEMPLATECONF</filename> script variable,
which defaults to <filename>meta-yocto/conf</filename> which defaults to <filename>/meta-yocto/conf</filename>
when you are building from the Yocto Project development when you are building from the Yocto Project development
environment and defaults to <filename>meta/conf</filename> when environment and defaults to <filename>/meta/conf</filename> when
you are building from the OpenEmbedded Core environment. you are building from the OpenEmbedded Core environment.
Because the script variable points to the source of the Because the script variable points to the source of the
<filename>bblayers.conf.sample</filename> file, this implies that <filename>bblayers.conf.sample</filename> file, this implies that
@@ -442,11 +445,11 @@
values for all <filename>##OEROOT##</filename> values. values for all <filename>##OEROOT##</filename> values.
<note> <note>
You can see how the <filename>TEMPLATECONF</filename> variable You can see how the <filename>TEMPLATECONF</filename> variable
<filename>scripts/oe-setup-builddir</filename> script in the <filename>/scripts/oe-setup-builddir</filename> script in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
You can find the Yocto Project version of the You can find the Yocto Project version of the
<filename>bblayers.conf.sample</filename> file in the <filename>bblayers.conf.sample</filename> file in the
<filename>meta-yocto/conf</filename> directory. <filename>/meta-yocto/conf</filename> directory.
</note> </note>
</para> </para>
</section> </section>
@@ -488,7 +491,7 @@
<title><filename>build/tmp/</filename></title> <title><filename>build/tmp/</filename></title>
<para> <para>
This directory receives all of the OpenEmbedded build system's output. This directory receives all the OpenEmbedded build system's output.
BitBake creates this directory if it does not exist. BitBake creates this directory if it does not exist.
As a last resort, to clean up a build and start it from scratch (other than the downloads), As a last resort, to clean up a build and start it from scratch (other than the downloads),
you can remove everything in the <filename>tmp</filename> directory or get rid of the you can remove everything in the <filename>tmp</filename> directory or get rid of the
@@ -552,15 +555,6 @@
</para> </para>
</section> </section>
<section id='structure-build-tmp-deploy-ipk'>
<title><filename>build/tmp/deploy/ipk/</filename></title>
<para>
This directory receives <filename>.ipk</filename> packages produced by
the build process.
</para>
</section>
<section id='structure-build-tmp-deploy-licenses'> <section id='structure-build-tmp-deploy-licenses'>
<title><filename>build/tmp/deploy/licenses/</filename></title> <title><filename>build/tmp/deploy/licenses/</filename></title>
@@ -607,6 +601,14 @@
</para> </para>
</section> </section>
<section id='structure-build-tmp-deploy-ipk'>
<title><filename>build/tmp/deploy/ipk/</filename></title>
<para>
This directory receives <filename>.ipk</filename> packages produced by
the build process.</para>
</section>
<section id='structure-build-tmp-sysroots'> <section id='structure-build-tmp-sysroots'>
<title><filename>build/tmp/sysroots/</filename></title> <title><filename>build/tmp/sysroots/</filename></title>
@@ -648,6 +650,15 @@
</para> </para>
</section> </section>
<section id='structure-build-tmp-pkgdata'>
<title><filename>build/tmp/pkgdata/</filename></title>
<para>
This directory contains intermediate packaging data that is used later in the packaging process.
For more information, see the "<link linkend='ref-classes-package'>Packaging - package*.bbclass</link>" section.
</para>
</section>
<section id='structure-build-tmp-work'> <section id='structure-build-tmp-work'>
<title><filename>build/tmp/work/</filename></title> <title><filename>build/tmp/work/</filename></title>
@@ -779,7 +790,7 @@
This directory contains common license files and several text files This directory contains common license files and several text files
used by the build system. used by the build system.
The text files contain minimal device information and The text files contain minimal device information and
lists of files and directories with known permissions. lists of files and directories with knows permissions.
</para> </para>
</section> </section>

File diff suppressed because it is too large Load Diff

View File

@@ -60,10 +60,9 @@
and is responsible for parsing the and is responsible for parsing the
<ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>, <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
generating a list of tasks from it, and then executing those tasks. generating a list of tasks from it, and then executing those tasks.
To see a list of the options BitBake supports, use either of To see a list of the options BitBake supports, use the following
the following commands: help command:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ bitbake -h
$ bitbake --help $ bitbake --help
</literallayout> </literallayout>
</para> </para>
@@ -73,7 +72,7 @@
<filename>packagename</filename> is the name of the package you want to build <filename>packagename</filename> is the name of the package you want to build
(referred to as the "target" in this manual). (referred to as the "target" in this manual).
The target often equates to the first part of a <filename>.bb</filename> filename. The target often equates to the first part of a <filename>.bb</filename> filename.
So, to process the <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you So, to run the <filename>matchbox-desktop_1.2.3.bb</filename> file, you
might type the following: might type the following:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ bitbake matchbox-desktop $ bitbake matchbox-desktop
@@ -112,15 +111,14 @@
<para> <para>
The <filename>.bb</filename> files are usually referred to as "recipes." The <filename>.bb</filename> files are usually referred to as "recipes."
In general, a recipe contains information about a single piece of software. In general, a recipe contains information about a single piece of software.
This information includes the location from which to download the The information includes the location from which to download the source patches
unaltered source, any source patches to be applied to that source (if any are needed), which special configuration options to apply,
(if needed), which special configuration options to apply,
how to compile the source files, and how to package the compiled output. how to compile the source files, and how to package the compiled output.
</para> </para>
<para> <para>
The term "package" is sometimes used to refer to recipes. However, The term "package" can also be used to describe recipes.
since the word "package" is used for the packaged output from the OpenEmbedded However, since the same word is used for the packaged output from the OpenEmbedded
build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files), build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
this document avoids using the term "package" when referring to recipes. this document avoids using the term "package" when referring to recipes.
</para> </para>
@@ -164,7 +162,7 @@
<ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>cross-development toolchains</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
This section provides some technical background information on how This section provides some technical background information on how
cross-development toolchains are created and used. cross-development toolchains are created and used.
For more information on toolchains, you can also see the For more information on these toolchain, you can also see the
<ulink url='&YOCTO_DOCS_ADT_URL;'>the Yocto Project Application Developer's Guide</ulink>. <ulink url='&YOCTO_DOCS_ADT_URL;'>the Yocto Project Application Developer's Guide</ulink>.
</para> </para>
@@ -349,7 +347,7 @@
As mentioned in the previous paragraph, building from scratch ensures that As mentioned in the previous paragraph, building from scratch ensures that
everything is current and starts from a known state. everything is current and starts from a known state.
However, building from scratch also takes much longer as it generally means However, building from scratch also takes much longer as it generally means
rebuilding things that do not necessarily need to be rebuilt. rebuilding things that do not necessarily need rebuilt.
</para> </para>
<para> <para>
@@ -357,11 +355,10 @@
The implementation of the shared state code answers the following questions that The implementation of the shared state code answers the following questions that
were fundamental roadblocks within the OpenEmbedded incremental build support system: were fundamental roadblocks within the OpenEmbedded incremental build support system:
<itemizedlist> <itemizedlist>
<listitem><para>What pieces of the system have changed and what pieces have <listitem>What pieces of the system have changed and what pieces have not changed?</listitem>
not changed?</para></listitem> <listitem>How are changed pieces of software removed and replaced?</listitem>
<listitem><para>How are changed pieces of software removed and replaced?</para></listitem> <listitem>How are pre-built components that do not need to be rebuilt from scratch
<listitem><para>How are pre-built components that do not need to be rebuilt from scratch used when they are available?</listitem>
used when they are available?</para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>
@@ -400,16 +397,16 @@
<para> <para>
When determining what parts of the system need to be built, BitBake When determining what parts of the system need to be built, BitBake
works on a per-task basis rather than a per-recipe basis. uses a per-task basis and does not use a per-recipe basis.
You might wonder why using a per-task basis is preferred over a per-recipe basis. You might wonder why using a per-task basis is preferred over a per-recipe basis.
To help explain, consider having the IPK packaging backend enabled and then switching to DEB. To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
In this case, <filename>do_install</filename> and <filename>do_package</filename> In this case, <filename>do_install</filename> and <filename>do_package</filename>
outputs are still valid. output are still valid.
However, with a per-recipe approach, the build would not include the However, with a per-recipe approach, the build would not include the
<filename>.deb</filename> files. <filename>.deb</filename> files.
Consequently, you would have to invalidate the whole build and rerun it. Consequently, you would have to invalidate the whole build and rerun it.
Rerunning everything is not the best solution. Rerunning everything is not the best situation.
Also, in this case, the core must be "taught" much about specific tasks. Also in this case, the core must be "taught" much about specific tasks.
This methodology does not scale well and does not allow users to easily add new tasks This methodology does not scale well and does not allow users to easily add new tasks
in layers or as external recipes without touching the packaged-staging core. in layers or as external recipes without touching the packaged-staging core.
</para> </para>
@@ -434,11 +431,11 @@
the checksum. the checksum.
First, there is the actual specific build path of a given task - First, there is the actual specific build path of a given task -
the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>. the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
It does not matter if the work directory changes because it should not It does not matter if the working directory changes because it should not
affect the output for target packages. affect the output for target packages.
Also, the build process has the objective of making native or cross packages relocatable. Also, the build process has the objective of making native or cross packages relocatable.
The checksum therefore needs to exclude <filename>WORKDIR</filename>. The checksum therefore needs to exclude <filename>WORKDIR</filename>.
The simplistic approach for excluding the work directory is to set The simplistic approach for excluding the working directory is to set
<filename>WORKDIR</filename> to some fixed value and create the checksum <filename>WORKDIR</filename> to some fixed value and create the checksum
for the "run" script. for the "run" script.
</para> </para>
@@ -515,18 +512,17 @@
dependent task hashes can be influenced. dependent task hashes can be influenced.
Within the BitBake configuration file, we can give BitBake some extra information Within the BitBake configuration file, we can give BitBake some extra information
to help it construct the basehash. to help it construct the basehash.
The following statement effectively results in a list of global variable The following statements effectively result in a list of global variable
dependency excludes - variables never included in any checksum: dependency excludes - variables never included in any checksum:
<literallayout class='monospaced'> <literallayout class='monospaced'>
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH"
SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \ BB_HASHBASE_WHITELIST += "DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS"
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \ BB_HASHBASE_WHITELIST += "FILE_DIRNAME HOME LOGNAME SHELL TERM USER"
PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \ BB_HASHBASE_WHITELIST += "FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET"
CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
</literallayout> </literallayout>
The previous example excludes The previous example actually excludes
<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link> <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
since that variable is actually constructed as a path within since it is actually constructed as a path within
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
the whitelist. the whitelist.
</para> </para>
@@ -545,7 +541,7 @@
<filename>OE-Core</filename> uses the "OEBasicHash" signature handler by default <filename>OE-Core</filename> uses the "OEBasicHash" signature handler by default
through this setting in the <filename>bitbake.conf</filename> file: through this setting in the <filename>bitbake.conf</filename> file:
<literallayout class='monospaced'> <literallayout class='monospaced'>
BB_SIGNATURE_HANDLER ?= "OEBasicHash" BB_SIGNATURE_HANDLER ?= "OEBasicHash"
</literallayout> </literallayout>
The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
"OEBasic" version but adds the task hash to the stamp files. "OEBasic" version but adds the task hash to the stamp files.
@@ -554,7 +550,7 @@
change that changes the task hash, automatically change that changes the task hash, automatically
causing the task to be run again. causing the task to be run again.
This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link> This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
values, and changes to Metadata automatically ripple across the build. values and changes to Metadata automatically ripple across the build.
</para> </para>
<para> <para>
@@ -562,10 +558,10 @@
make some dependency and hash information available to the build. make some dependency and hash information available to the build.
This information includes: This information includes:
<literallayout class='monospaced'> <literallayout class='monospaced'>
BB_BASEHASH_task-&lt;taskname&gt; - the base hashes for each task in the recipe BB_BASEHASH_task-&lt;taskname&gt; - the base hashes for each task in the recipe
BB_BASEHASH_&lt;filename:taskname&gt; - the base hashes for each dependent task BB_BASEHASH_&lt;filename:taskname&gt; - the base hashes for each dependent task
BBHASHDEPS_&lt;filename:taskname&gt; - The task dependencies for each task BBHASHDEPS_&lt;filename:taskname&gt; - The task dependencies for each task
BB_TASKHASH - the hash of the currently running task BB_TASKHASH - the hash of the currently running task
</literallayout> </literallayout>
</para> </para>
</section> </section>
@@ -575,7 +571,7 @@
<para> <para>
Checksums and dependencies, as discussed in the previous section, solve half the Checksums and dependencies, as discussed in the previous section, solve half the
problem of supporting a shared state. problem.
The other part of the problem is being able to use checksum information during the build The other part of the problem is being able to use checksum information during the build
and being able to reuse or rebuild specific components. and being able to reuse or rebuild specific components.
</para> </para>
@@ -585,7 +581,7 @@
is a relatively generic implementation of how to "capture" a snapshot of a given task. is a relatively generic implementation of how to "capture" a snapshot of a given task.
The idea is that the build process does not care about the source of a task's output. The idea is that the build process does not care about the source of a task's output.
Output could be freshly built or it could be downloaded and unpacked from Output could be freshly built or it could be downloaded and unpacked from
somewhere - the build process does not need to worry about its origin. somewhere - the build process does not need to worry about its source.
</para> </para>
<para> <para>
@@ -602,7 +598,7 @@
<filename>sstate.bbclass</filename>. <filename>sstate.bbclass</filename>.
From a user's perspective, adding shared state wrapping to a task From a user's perspective, adding shared state wrapping to a task
is as simple as this <filename>do_deploy</filename> example taken from is as simple as this <filename>do_deploy</filename> example taken from
<filename>deploy.bbclass</filename>: <filename>do_deploy.bbclass</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
DEPLOYDIR = "${WORKDIR}/deploy-${PN}" DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
SSTATETASKS += "do_deploy" SSTATETASKS += "do_deploy"
@@ -614,9 +610,8 @@
sstate_setscene(d) sstate_setscene(d)
} }
addtask do_deploy_setscene addtask do_deploy_setscene
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
</literallayout> </literallayout>
In this example, we add some extra flags to the task, a name field ("deploy"), an In the example, we add some extra flags to the task, a name field ("deploy"), an
input directory where the task sends data, and the output input directory where the task sends data, and the output
directory where the data from the task should eventually be copied. directory where the data from the task should eventually be copied.
We also add a <filename>_setscene</filename> variant of the task and add the task We also add a <filename>_setscene</filename> variant of the task and add the task
@@ -735,61 +730,43 @@
<title>Invalidating Shared State</title> <title>Invalidating Shared State</title>
<para> <para>
The OpenEmbedded build system uses checksums and shared state The shared state code uses checksums and shared state
cache to avoid unnecessarily rebuilding tasks. cache to avoid unnecessarily rebuilding tasks.
Collectively, this scheme is known as "shared state code."
</para>
<para>
As with all schemes, this one has some drawbacks. As with all schemes, this one has some drawbacks.
It is possible that you could make implicit changes to your It is possible that you could make implicit changes that are not factored
code that the checksum calculations do not take into into the checksum calculation, but do affect a task's output.
account (i.e. implicit changes). A good example is perhaps when a tool changes its output.
These implicit changes affect a task's output but do not trigger Assume that the output of <filename>rpmdeps</filename> needed to change.
the shared state code into rebuilding a recipe.
Consider an example during which a tool changes its output.
Assume that the output of <filename>rpmdeps</filename> changes.
The result of the change should be that all the The result of the change should be that all the
<filename>package</filename> and <filename>package</filename>, <filename>package_write_rpm</filename>,
<filename>package_write_rpm</filename> shared state cache and <filename>package_deploy-rpm</filename> shared state cache
items become invalid. items would become invalid.
However, because the change to the output is But, because this is a change that is external to the code and therefore implicit,
external to the code and therefore implicit, the associated shared state cache items do not become invalidated.
the associated shared state cache items do not become In this case, the build process uses the cached items rather than running the
invalidated. task again.
In this case, the build process uses the cached items rather
than running the task again.
Obviously, these types of implicit changes can cause problems. Obviously, these types of implicit changes can cause problems.
</para> </para>
<para> <para>
To avoid these problems during the build, you need to To avoid these problems during the build, you need to understand the effects of any
understand the effects of any changes you make. change you make.
Realize that changes you make directly to a function Note that any changes you make directly to a function automatically are factored into
are automatically factored into the checksum calculation. the checksum calculation and thus, will invalidate the associated area of sstate cache.
Thus, these explicit changes invalidate the associated area of You need to be aware of any implicit changes that are not obvious changes to the
sstate cache. code and could affect the output of a given task.
However, you need to be aware of any implicit changes that Once you are aware of such changes, you can take steps to invalidate the cache
are not obvious changes to the code and could affect the output and force the tasks to run.
of a given task. The steps to take are as simple as changing function's comments in the source code.
</para> For example, to invalidate package shared state files, change the comment statements
of <filename>do_package</filename> or the comments of one of the functions it calls.
<para> The change is purely cosmetic, but it causes the checksum to be recalculated and
When you identify an implicit change, you can easily take steps forces the task to be run again.
to invalidate the cache and force the tasks to run.
The steps you can take are as simple as changing a function's
comments in the source code.
For example, to invalidate package shared state files, change
the comment statements of <filename>do_package</filename> or
the comments of one of the functions it calls.
Even though the change is purely cosmetic, it causes the
checksum to be recalculated and forces the OpenEmbedded build
system to run the task again.
</para> </para>
<note> <note>
For an example of a commit that makes a cosmetic change to For an example of a commit that makes a cosmetic change to invalidate
invalidate shared state, see this a shared state, see this
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>. <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
</note> </note>
</section> </section>
@@ -891,7 +868,7 @@
<para> <para>
<ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Wayland</ulink> <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Wayland</ulink>
is a computer display server protocol that is a computer display server protocol that when implemented
provides a method for compositing window managers to communicate provides a method for compositing window managers to communicate
directly with applications and video hardware and expects them to directly with applications and video hardware and expects them to
communicate with input hardware using other libraries. communicate with input hardware using other libraries.
@@ -902,7 +879,7 @@
<para> <para>
The Yocto Project provides the Wayland protocol libraries and the The Yocto Project provides the Wayland protocol libraries and the
reference Weston compositor as part of its release. reference Weston compositor as part of it release.
This section describes what you need to do to implement Wayland and This section describes what you need to do to implement Wayland and
use the compositor when building an image for a supporting target. use the compositor when building an image for a supporting target.
</para> </para>
@@ -997,7 +974,7 @@
<para> <para>
Alternatively, you can run Weston through the command-line Alternatively, you can run Weston through the command-line
interpretor (CLI), which is better suited for development work. interpretor (CLI), which is better suited for development work.
To run Weston under the CLI, you need to do the following after To run Weston under the CLI you need to do the following after
your image is built: your image is built:
<orderedlist> <orderedlist>
<listitem><para>Run these commands to export <listitem><para>Run these commands to export
@@ -1005,7 +982,7 @@
<literallayout class='monospaced'> <literallayout class='monospaced'>
mkdir -p /tmp/$USER-weston mkdir -p /tmp/$USER-weston
chmod 0700 /tmp/$USER-weston chmod 0700 /tmp/$USER-weston
export XDG_RUNTIME_DIR=/tmp/$USER-weston export XDG_RUNTIME_DIR=/tmp/$USER=weston
</literallayout></para></listitem> </literallayout></para></listitem>
<listitem><para>Launch Weston in the shell: <listitem><para>Launch Weston in the shell:
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -1149,7 +1126,7 @@
recipe-by-recipe basis through the <filename>LICENSE_FLAGS</filename> variable recipe-by-recipe basis through the <filename>LICENSE_FLAGS</filename> variable
definition in the affected recipe. definition in the affected recipe.
For instance, the For instance, the
<filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename> <filename>$HOME/poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
recipe contains the following statement: recipe contains the following statement:
<literallayout class='monospaced'> <literallayout class='monospaced'>
LICENSE_FLAGS = "commercial" LICENSE_FLAGS = "commercial"
@@ -1165,7 +1142,7 @@
<filename>LICENSE_FLAGS_WHITELIST</filename> variable, which is a variable <filename>LICENSE_FLAGS_WHITELIST</filename> variable, which is a variable
typically defined in your <filename>local.conf</filename> file. typically defined in your <filename>local.conf</filename> file.
For example, to enable For example, to enable
the <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename> the <filename>$HOME/poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
package, you could add either the string package, you could add either the string
"commercial_gst-plugins-ugly" or the more general string "commercial_gst-plugins-ugly" or the more general string
"commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>. "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
@@ -1186,7 +1163,7 @@
</literallayout> </literallayout>
As a convenience, you do not need to specify the complete license string As a convenience, you do not need to specify the complete license string
in the whitelist for every package. in the whitelist for every package.
You can use an abbreviated form, which consists you can use an abbreviated form, which consists
of just the first portion or portions of the license string before of just the first portion or portions of the license string before
the initial underscore character or characters. the initial underscore character or characters.
A partial string will match A partial string will match
@@ -1208,10 +1185,10 @@
License flag matching allows you to control what recipes the License flag matching allows you to control what recipes the
OpenEmbedded build system includes in the build. OpenEmbedded build system includes in the build.
Fundamentally, the build system attempts to match Fundamentally, the build system attempts to match
<filename>LICENSE_FLAGS</filename> strings found in <filename>LICENSE_FLAG</filename> strings found in
recipes against <filename>LICENSE_FLAGS_WHITELIST</filename> recipes against <filename>LICENSE_FLAGS_WHITELIST</filename>
strings found in the whitelist. strings found in the whitelist.
A match causes the build system to include a recipe in the A match, causes the build system to include a recipe in the
build, while failure to find a match causes the build system to build, while failure to find a match causes the build system to
exclude a recipe. exclude a recipe.
</para> </para>
@@ -1272,7 +1249,7 @@
<para> <para>
This scheme works even if the This scheme works even if the
<filename>LICENSE_FLAGS</filename> string already <filename>LICENSE_FLAG</filename> string already
has <filename>_${PN}</filename> appended. has <filename>_${PN}</filename> appended.
For example, the build system turns the license flag For example, the build system turns the license flag
"commercial_1.2_foo" into "commercial_1.2_foo_foo" and would "commercial_1.2_foo" into "commercial_1.2_foo_foo" and would
@@ -1312,7 +1289,7 @@
<para> <para>
Other helpful variables related to commercial Other helpful variables related to commercial
license handling exist and are defined in the license handling exist and are defined in the
<filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file: <filename>$HOME/poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
<literallayout class='monospaced'> <literallayout class='monospaced'>
COMMERCIAL_AUDIO_PLUGINS ?= "" COMMERCIAL_AUDIO_PLUGINS ?= ""
COMMERCIAL_VIDEO_PLUGINS ?= "" COMMERCIAL_VIDEO_PLUGINS ?= ""

View File

@@ -40,7 +40,7 @@
</para> </para>
<para> <para>
The <filename>build_dir</filename> argument is optional and specifies the directory the The <filename>build_dir</filename> is optional and specifies the directory the
OpenEmbedded build system uses for the build - OpenEmbedded build system uses for the build -
the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>. the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
If you do not specify a Build Directory, it defaults to a directory If you do not specify a Build Directory, it defaults to a directory
@@ -62,7 +62,7 @@
<para> <para>
The <filename>target</filename> is the name of the recipe you want to build. The <filename>target</filename> is the name of the recipe you want to build.
Common targets are the images in <filename>meta/recipes-core/images</filename>, Common targets are the images in <filename>meta/recipes-core/images</filename>,
<filename>meta/recipes-sato/images</filename>, etc. all found in the <filename>/meta/recipes-sato/images</filename>, etc. all found in the
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
Or, the target can be the name of a recipe for a specific piece of software such as Or, the target can be the name of a recipe for a specific piece of software such as
BusyBox. BusyBox.
@@ -72,7 +72,7 @@
<note> <note>
Building an image without GNU General Public License Version 3 (GPLv3) components Building an image without GNU General Public License Version 3 (GPLv3) components
is supported for only minimal and base images. is only supported for minimal and base images.
See the "<link linkend='ref-images'>Images</link>" chapter for more information. See the "<link linkend='ref-images'>Images</link>" chapter for more information.
</note> </note>
</section> </section>
@@ -158,7 +158,7 @@
<filename>package_write</filename>, and <filename>build</filename>. <filename>package_write</filename>, and <filename>build</filename>.
The default task is <filename>build</filename> and any tasks on which it depends The default task is <filename>build</filename> and any tasks on which it depends
build first. build first.
Some tasks, such as <filename>devshell</filename>, are not part of the Some tasks exist, such as <filename>devshell</filename>, that are not part of the
default build chain. default build chain.
If you wish to run a task that is not part of the default build chain, you can use the If you wish to run a task that is not part of the default build chain, you can use the
<filename>-c</filename> option in BitBake. <filename>-c</filename> option in BitBake.
@@ -169,15 +169,14 @@
</para> </para>
<para> <para>
If you wish to rerun a task, use the <filename>-f</filename> force If you wish to rerun a task, use the <filename>-f</filename> force option.
option. For example, the following sequence forces recompilation after changing files in the
For example, the following sequence forces recompilation after working directory.
changing files in the work directory.
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ bitbake matchbox-desktop $ bitbake matchbox-desktop
. .
. .
[make some changes to the source code in the work directory] [make some changes to the source code in the working directory]
. .
. .
$ bitbake matchbox-desktop -c compile -f $ bitbake matchbox-desktop -c compile -f
@@ -207,19 +206,14 @@
<title>Dependency Graphs</title> <title>Dependency Graphs</title>
<para> <para>
Sometimes it can be hard to see why BitBake wants to build Sometimes it can be hard to see why BitBake wants to build some other packages before a given
other packages before building a given package you have specified. package you have specified.
The <filename>bitbake -g &lt;targetname&gt;</filename> command The <filename>bitbake -g targetname</filename> command creates the
creates the <filename>pn-buildlist</filename>, <filename>depends.dot</filename>, <filename>package-depends.dot</filename>,
<filename>pn-depends.dot</filename>, and <filename>task-depends.dot</filename> files in the current directory.
<filename>package-depends.dot</filename>, and These files show the package and task dependencies and are useful for debugging problems.
<filename>task-depends.dot</filename> files in the current You can use the <filename>bitbake -g -u depexp targetname</filename> command to
directory. display the results in a more human-readable form.
These files show what will be built and the package and task
dependencies, which are useful for debugging problems.
You can use the
<filename>bitbake -g -u depexp &lt;targetname&gt;</filename>
command to display the results in a more human-readable form.
</para> </para>
</section> </section>
@@ -277,18 +271,12 @@
<section id='usingpoky-debugging-buildfile'> <section id='usingpoky-debugging-buildfile'>
<title>Building with No Dependencies</title> <title>Building with No Dependencies</title>
<para> <para>
To build a specific recipe (<filename>.bb</filename> file), If you really want to build a specific <filename>.bb</filename> file, you can use
you can use the following command form: the command form <filename>bitbake -b &lt;somepath/somefile.bb&gt;</filename>.
<literallayout class='monospaced'> This command form does not check for dependencies so you should use it
$ bitbake -b &lt;somepath/somerecipe.bb&gt; only when you know its dependencies already exist.
</literallayout> You can also specify fragments of the filename.
This command form does not check for dependencies. In this case, BitBake checks for a unique match.
Consequently, you should use it
only when you know dependencies already exist.
<note>
You can also specify fragments of the filename.
In this case, BitBake checks for a unique match.
</note>
</para> </para>
</section> </section>
@@ -296,16 +284,11 @@
<title>Variables</title> <title>Variables</title>
<para> <para>
You can use the <filename>-e</filename> BitBake option to You can use the <filename>-e</filename> BitBake option to
display the parsing environment for a configuration. display the resulting environment for a configuration
The following displays the general parsing environment: when you do not specify a package or for a specific package when
<literallayout class='monospaced'> you do specify the package.
$ bitbake -e If you want to show the environment resulting from parsing a single
</literallayout> recipe, use the <filename>-b recipename</filename> form.
This next example shows the parsing environment for a specific
recipe:
<literallayout class='monospaced'>
$ bitbake -e &lt;recipename&gt;
</literallayout>
</para> </para>
</section> </section>
@@ -496,11 +479,11 @@
from your <filename>conf/local.conf</filename> file. from your <filename>conf/local.conf</filename> file.
However, you should realize that enabling and disabling However, you should realize that enabling and disabling
build history in this manner can change the build history in this manner can change the
<filename>do_package</filename> task checksums which, if you <filename>do_package</filename> task checksums, which if you
are using the OEBasicHash signature generator (the default are using the OEBasicHash signature generator (the default
for many current distro configurations including for many current distro configurations including
<filename>DISTRO = "poky"</filename> and <filename>DISTRO = "poky"</filename> and
<filename>DISTRO = ""</filename>) will result in the packaging <filename>DISTRO = ""</filename>) and will result in the packaging
tasks being re-run during the subsequent build. tasks being re-run during the subsequent build.
</para> </para>

View File

@@ -1,14 +1,13 @@
# Processes ref-manual and yocto-project-qs manual (<word>-<word>-<word> style) # Processes ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
# Processes all other manuals (<word>-<word> style) # Processes all other manuals (<word>-<word> style)
s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
# Process cases where just an external manual is referenced without an id anchor # Process cases where just an external manual is referenced without an id anchor
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.4\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g

View File

@@ -17,10 +17,11 @@
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons. the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
</para> </para>
<note> <note>
For the latest version of this manual associated with this Due to production processes, there could be differences between the Yocto Project
Yocto Project release, see the documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink> <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink> on
from the Yocto Project website. the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note> </note>
</legalnotice> </legalnotice>
@@ -231,6 +232,11 @@
distributions listed in the distributions listed in the
"<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
section of the Yocto Project Reference Manual. section of the Yocto Project Reference Manual.
Refer to
<ulink url='&OE_HOME_URL;/index.php?title=OEandYourDistro'>OE and Your Distro</ulink> and
<ulink url='&OE_HOME_URL;/index.php?title=Required_software'>Required Software</ulink>
for information for information about dependencies and
requirements.
If you encounter problems, please go to If you encounter problems, please go to
<ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink> <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
and submit a bug. and submit a bug.
@@ -585,7 +591,7 @@
</para> </para>
<literallayout class='monospaced'> <literallayout class='monospaced'>
poky-eglibc-&lt;<emphasis>host_system</emphasis>&gt;-&lt;<emphasis>image_type</emphasis>&gt;-&lt;<emphasis>arch</emphasis>&gt;-toolchain-&lt;<emphasis>release_version</emphasis>&gt;.sh poky-eglibc-&lt;<emphasis>host_system</emphasis>&gt;-&lt;<emphasis>image_type</emphasis>&gt;-&lt;<emphasis>arch</emphasis>&gt;-&lt;<emphasis>release_version</emphasis>&gt;.sh
Where: Where:
&lt;<emphasis>host_system</emphasis>&gt; is a string representing your development system: &lt;<emphasis>host_system</emphasis>&gt; is a string representing your development system:
@@ -614,7 +620,7 @@
development host system and a i586-tuned target architecture development host system and a i586-tuned target architecture
based off the SDK for <filename>core-image-sato</filename>: based off the SDK for <filename>core-image-sato</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh poky-eglibc-x86_64-core-image-sato-i586-&DISTRO;.sh
</literallayout> </literallayout>
</para> </para>
@@ -643,7 +649,7 @@
<para> <para>
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ ~/Downloads/poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh $ ~/Downloads/poky-eglibc-x86_64-core-image-sato-i586-&DISTRO;.sh
</literallayout> </literallayout>
</para> </para>
@@ -716,6 +722,11 @@
&lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture: &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
x86, x86-64, ppc, mips, or arm. x86, x86-64, ppc, mips, or arm.
</literallayout> </literallayout>
<note>
For the <filename>qemu</filename> architecture,
<filename>ext3</filename> and <filename>tar</filename>
files start with the "lib32" string.
</note>
</para> </para>
</section> </section>

View File

@@ -7,11 +7,11 @@ KBRANCH_beagleboard = "standard/beagleboard"
KMACHINE_genericx86 ?= "common-pc" KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64" KMACHINE_genericx86-64 ?= "common-pc-64"
SRCREV_machine_genericx86 ?= "c03195ed6e3066494e3fb4be69154a57066e845b" SRCREV_machine_genericx86 ?= "702040ac7c7ec66a29b4d147665ccdd0ff015577"
SRCREV_machine_genericx86-64 ?= "c03195ed6e3066494e3fb4be69154a57066e845b" SRCREV_machine_genericx86-64 ?= "702040ac7c7ec66a29b4d147665ccdd0ff015577"
SRCREV_machine_routerstationpro ?= "2d91e201018c15e24fb83336dcb4029b8569eb9d" SRCREV_machine_routerstationpro ?= "d4e6adefaf92a1e7b6539d371ba49b78bd194a84"
SRCREV_machine_mpc8315e-rdb ?= "ac071526ffac37c907532933b628e4f64070f155" SRCREV_machine_mpc8315e-rdb ?= "12dc46ba4efb80e135fec4dce913eeb87ee671b3"
SRCREV_machine_beagleboard ?= "3d9b0d130a00dd32e6061ac708eaaaed69e35c3d" SRCREV_machine_beagleboard ?= "702040ac7c7ec66a29b4d147665ccdd0ff015577"
COMPATIBLE_MACHINE_genericx86 = "genericx86" COMPATIBLE_MACHINE_genericx86 = "genericx86"
COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"

View File

@@ -216,7 +216,7 @@ REGEX_URI_pn-psmisc = "http://sourceforge.net/projects/psmisc/files/psmisc/"
REGEX_pn-psmisc = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/psmisc/files/psmisc/psmisc\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz/download\"" REGEX_pn-psmisc = "[hH][rR][eE][fF]=\"http://sourceforge.net/projects/psmisc/files/psmisc/psmisc\-(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz/download\""
REGEX_URI_pn-python-argparse = "https://code.google.com/p/argparse/downloads/list" REGEX_URI_pn-python-argparse = "https://code.google.com/p/argparse/downloads/list"
REGEX_URI_pn-python-docutils = "http://sourceforge.net/projects/docutils/files/docutils/" REGEX_URI_pn-python-docutils = "http://sourceforge.net/projects/docutils/files/docutils/"
REGEX_pn-python-docutils = "[hH][rR][eE][fF]=\"/projects/docutils/files/docutils/(?P<pver>((\d+[\.\-_]*)+)).*/\"" REGEX_pn-python-docutils = "[hH][rR][eE][fF]=\"/projects/docutils/files/docutils/docutils\-(?P<pver>((\d+[\.\-_]*)+)).*/\""
REGEX_URI_pn-python-pycurl = "http://pycurl.sourceforge.net/download/" REGEX_URI_pn-python-pycurl = "http://pycurl.sourceforge.net/download/"
REGEX_pn-python-pycurl = "[hH][rR][eE][fF]=\"pycurl-(?P<pver>((\d+[\.\-_]*)+)).tar.gz\"" REGEX_pn-python-pycurl = "[hH][rR][eE][fF]=\"pycurl-(?P<pver>((\d+[\.\-_]*)+)).tar.gz\""
REGEX_URI_pn-python-scons = "http://sourceforge.net/projects/scons/files/scons/" REGEX_URI_pn-python-scons = "http://sourceforge.net/projects/scons/files/scons/"

View File

@@ -1,7 +1,7 @@
DISTRO = "poky" DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)" DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "1.5.4" DISTRO_VERSION = "1.5"
DISTRO_CODENAME = "dora" DISTRO_CODENAME = "next"
SDK_VENDOR = "-pokysdk" SDK_VENDOR = "-pokysdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
@@ -77,16 +77,12 @@ SANITY_TESTED_DISTROS ?= " \
Ubuntu-12.04 \n \ Ubuntu-12.04 \n \
Ubuntu-12.10 \n \ Ubuntu-12.10 \n \
Ubuntu-13.04 \n \ Ubuntu-13.04 \n \
Ubuntu-13.10 \n \
Fedora-18 \n \ Fedora-18 \n \
Fedora-19 \n \ Fedora-19 \n \
Fedora-20 \n \
CentOS-6.4 \n \ CentOS-6.4 \n \
Debian-6.0.7 \n \ Debian-6.0.7 \n \
Debian-7.0 \n \ Debian-7.0 \n \
Debian-7.1 \n \ Debian-7.1 \n \
Debian-7.2 \n \
Debian-7.3 \n \
SUSE-LINUX-12.2 \n \ SUSE-LINUX-12.2 \n \
openSUSE-project-12.3 \n \ openSUSE-project-12.3 \n \
" "

View File

@@ -1,2 +1,2 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" FILESEXTRAPATHS_prepend_poky := "${THISDIR}/${P}:"

View File

@@ -210,7 +210,7 @@ def preferred_ml_updates(d):
virt = "virtual/" virt = "virtual/"
for p in prefixes: for p in prefixes:
if pkg != "kernel": if pkg != "kernel":
newval = p + "-" + val val = p + "-" + val
# implement variable keys # implement variable keys
localdata = bb.data.createCopy(d) localdata = bb.data.createCopy(d)
@@ -219,12 +219,12 @@ def preferred_ml_updates(d):
bb.data.update_data(localdata) bb.data.update_data(localdata)
newname = localdata.expand(prov) newname = localdata.expand(prov)
if newname != prov and not d.getVar(newname, False): if newname != prov and not d.getVar(newname, False):
d.setVar(newname, localdata.expand(newval)) d.setVar(newname, localdata.expand(val))
# implement alternative multilib name # implement alternative multilib name
newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg) newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
if not d.getVar(newname, False): if not d.getVar(newname, False):
d.setVar(newname, newval) d.setVar(newname, val)
# Avoid future variable key expansion # Avoid future variable key expansion
provexp = d.expand(prov) provexp = d.expand(prov)
if prov != provexp and d.getVar(prov, False): if prov != provexp and d.getVar(prov, False):
@@ -433,7 +433,7 @@ python () {
extradeps = [] extradeps = []
extrardeps = [] extrardeps = []
extraconf = [] extraconf = []
for flag, flagval in sorted(pkgconfigflags.items()): for flag, flagval in pkgconfigflags.items():
if flag == "defaultval": if flag == "defaultval":
continue continue
items = flagval.split(",") items = flagval.split(",")
@@ -485,15 +485,14 @@ python () {
# If we're building a target package we need to use fakeroot (pseudo) # If we're building a target package we need to use fakeroot (pseudo)
# in order to capture permissions, owners, groups and special files # in order to capture permissions, owners, groups and special files
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', 022)
d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', 022)
d.setVarFlag('do_compile', 'umask', '022')
d.appendVarFlag('do_install', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') d.appendVarFlag('do_install', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
d.setVarFlag('do_install', 'fakeroot', 1) d.setVarFlag('do_install', 'fakeroot', 1)
d.setVarFlag('do_install', 'umask', '022') d.setVarFlag('do_install', 'umask', 022)
d.appendVarFlag('do_package', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') d.appendVarFlag('do_package', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
d.setVarFlag('do_package', 'fakeroot', 1) d.setVarFlag('do_package', 'fakeroot', 1)
d.setVarFlag('do_package', 'umask', '022') d.setVarFlag('do_package', 'umask', 022)
d.setVarFlag('do_package_setscene', 'fakeroot', 1) d.setVarFlag('do_package_setscene', 'fakeroot', 1)
d.appendVarFlag('do_package_setscene', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') d.appendVarFlag('do_package_setscene', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
d.setVarFlag('do_devshell', 'fakeroot', 1) d.setVarFlag('do_devshell', 'fakeroot', 1)
@@ -582,10 +581,6 @@ python () {
if ".zip" in srcuri: if ".zip" in srcuri:
d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot') d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
# file is needed by rpm2cpio.sh
if ".src.rpm" in srcuri:
d.appendVarFlag('do_unpack', 'depends', ' file-native:do_populate_sysroot')
set_packagetriplet(d) set_packagetriplet(d)
# 'multimachine' handling # 'multimachine' handling

View File

@@ -5,7 +5,6 @@ def get_binconfig_mangle(d):
s = "-e ''" s = "-e ''"
if not bb.data.inherits_class('native', d): if not bb.data.inherits_class('native', d):
optional_quote = r"\(\"\?\)" optional_quote = r"\(\"\?\)"
s += " -e 's:=%s${base_libdir}:=\\1OEBASELIBDIR:;'" % optional_quote
s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote
s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote
s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote
@@ -13,7 +12,6 @@ def get_binconfig_mangle(d):
s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
s += " -e 's:-L${libdir}:-LOELIBDIR:;'" s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'" s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
s += " -e 's:OEBASELIBDIR:${STAGING_BASELIBDIR}:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
@@ -33,7 +31,6 @@ PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess"
binconfig_package_preprocess () { binconfig_package_preprocess () {
for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do
sed -i \ sed -i \
-e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \ -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
-e 's:${STAGING_INCDIR}:${includedir}:g;' \ -e 's:${STAGING_INCDIR}:${includedir}:g;' \
-e 's:${STAGING_DATADIR}:${datadir}:' \ -e 's:${STAGING_DATADIR}:${datadir}:' \
@@ -42,7 +39,6 @@ binconfig_package_preprocess () {
done done
for lafile in `find ${PKGD} -name "*.la"` ; do for lafile in `find ${PKGD} -name "*.la"` ; do
sed -i \ sed -i \
-e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \ -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
-e 's:${STAGING_INCDIR}:${includedir}:g;' \ -e 's:${STAGING_INCDIR}:${includedir}:g;' \
-e 's:${STAGING_DATADIR}:${datadir}:' \ -e 's:${STAGING_DATADIR}:${datadir}:' \

View File

@@ -10,9 +10,6 @@ RDEPENDS_${PN} += "${@["perl", ""][(bb.data.inherits_class('native', d))]}"
PERL_OWN_DIR = "${@["", "/perl-native"][(bb.data.inherits_class('native', d))]}" PERL_OWN_DIR = "${@["", "/perl-native"][(bb.data.inherits_class('native', d))]}"
# Determine the staged version of perl from the perl configuration file # Determine the staged version of perl from the perl configuration file
# Assign vardepvalue, because otherwise signature is changed before and after
# perl is built (from None to real version in config.sh).
get_perl_version[vardepvalue] = "${PERL_OWN_DIR}"
def get_perl_version(d): def get_perl_version(d):
import re import re
cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh') cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh')

View File

@@ -15,30 +15,12 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
# #
PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
CANADIANEXTRAOS = ""
python () { python () {
archs = d.getVar('PACKAGE_ARCHS', True).split() archs = d.getVar('PACKAGE_ARCHS', True).split()
sdkarchs = [] sdkarchs = []
for arch in archs: for arch in archs:
sdkarchs.append(arch + '-${SDKPKGSUFFIX}') sdkarchs.append(arch + '-${SDKPKGSUFFIX}')
d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
# PowerPC can build "linux" and "linux-gnuspe"
tarch = d.getVar("TARGET_ARCH", True)
if tarch == "powerpc":
tos = d.getVar("TARGET_OS", True)
if (tos != "linux" and tos != "linux-gnuspe"):
bb.fatal("Building cross-candian powerpc for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS", True))
# Have to expand DEPENDS before we change the extensions
d.setVar("DEPENDS", d.getVar("DEPENDS", True))
d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN", True))
for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]:
n = prefix + "_FOR_TARGET"
d.setVar(n, d.getVar(n, True))
d.setVar("LIBCEXTENSION", "")
d.setVar("ABIEXTENSION", "")
d.setVar("CANADIANEXTRAOS", "linux-gnuspe")
} }
MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
@@ -113,21 +95,3 @@ USE_NLS = "${SDKUSE_NLS}"
# We have to us TARGET_ARCH but we care about the absolute value # We have to us TARGET_ARCH but we care about the absolute value
# and not any particular tune that is enabled. # and not any particular tune that is enabled.
TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
# If MLPREFIX is set by multilib code, shlibs
# points to the wrong place so force it
SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs"
SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs"
cross_canadian_bindirlinks () {
for i in ${CANADIANEXTRAOS}
do
d=${D}${bindir}/../${TARGET_ARCH}${TARGET_VENDOR}-$i
install -d $d
for j in `ls ${D}${bindir}`
do
p=${TARGET_ARCH}${TARGET_VENDOR}-$i-`echo $j | sed -e s,${TARGET_PREFIX},,`
ln -s ../${TARGET_SYS}/$j $d/$p
done
done
}

View File

@@ -54,10 +54,6 @@ set_user_group () {
bbfatal "Invalid command in EXTRA_USERS_PARAMS: $cmd" bbfatal "Invalid command in EXTRA_USERS_PARAMS: $cmd"
;; ;;
esac esac
# Avoid infinite loop if the last parameter doesn't end with ';'
if [ "$setting" = "$remaining" ]; then
break
fi
# iterate to the next setting # iterate to the next setting
setting=`echo $remaining | cut -d ';' -f1` setting=`echo $remaining | cut -d ';' -f1`
remaining=`echo $remaining | cut -d ';' -f2-` remaining=`echo $remaining | cut -d ';' -f2-`

View File

@@ -16,7 +16,6 @@
# ${GRUB_TIMEOUT} - timeout before executing the deault label (optional) # ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
do_bootimg[depends] += "grub-efi-${TRANSLATED_TARGET_ARCH}-native:do_deploy" do_bootimg[depends] += "grub-efi-${TRANSLATED_TARGET_ARCH}-native:do_deploy"
do_bootdirectdisk[depends] += "grub-efi-${TRANSLATED_TARGET_ARCH}-native:do_deploy"
GRUB_SERIAL ?= "console=ttyS0,115200" GRUB_SERIAL ?= "console=ttyS0,115200"
GRUBCFG = "${S}/grub.cfg" GRUBCFG = "${S}/grub.cfg"
@@ -49,7 +48,7 @@ grubefi_iso_populate() {
mkdir -p ${EFIIMGDIR}/${EFIDIR} mkdir -p ${EFIIMGDIR}/${EFIDIR}
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
cp $iso_dir/vmlinuz ${EFIIMGDIR} cp $iso_dir/vmlinuz ${EFIIMGDIR}
echo "${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh echo "EFI\\BOOT\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then if [ -f "$iso_dir/initrd" ] ; then
cp $iso_dir/initrd ${EFIIMGDIR} cp $iso_dir/initrd ${EFIIMGDIR}
fi fi

View File

@@ -9,7 +9,7 @@ mklibs_optimize_image_doit() {
du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt
for i in `find .`; do file $i; done \ for i in `find .`; do file $i; done \
| grep ELF \ | grep ELF \
| grep "LSB *executable" \ | grep "LSB executable" \
| grep "dynamically linked" \ | grep "dynamically linked" \
| sed "s/:.*//" \ | sed "s/:.*//" \
| sed "s+^\./++" \ | sed "s+^\./++" \
@@ -40,7 +40,6 @@ mklibs_optimize_image_doit() {
--ldlib ${dynamic_loader} \ --ldlib ${dynamic_loader} \
--libdir ${baselib} \ --libdir ${baselib} \
--sysroot ${PKG_CONFIG_SYSROOT_DIR} \ --sysroot ${PKG_CONFIG_SYSROOT_DIR} \
--gcc-options "--sysroot=${PKG_CONFIG_SYSROOT_DIR}" \
--root ${IMAGE_ROOTFS} \ --root ${IMAGE_ROOTFS} \
--target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \ --target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \
-d ${WORKDIR}/mklibs/dest \ -d ${WORKDIR}/mklibs/dest \

Some files were not shown because too many files have changed in this diff Show More