Commits (3329)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -21,3 +21,6 @@ documentation/user-manual/user-manual.html
\ No newline at end of file
......@@ -105,9 +105,7 @@ Intel Atom platforms:
and is likely to work on many unlisted Atom/Core/Xeon based devices. The MACHINE
type supports ethernet, wifi, sound, and Intel/vesa graphics by default in
addition to common PC input devices, busses, and so on. Note that it does not
included the binary-only graphic drivers used on some Atom platforms, for
accelerated graphics on these machines please refer to meta-intel.
addition to common PC input devices, busses, and so on.
Depending on the device, it can boot from a traditional hard-disk, a USB device,
or over the network. Writing generated images to physical media is
......@@ -352,19 +350,22 @@ Setup instructions
You will need the following:
* NFS root setup on your workstation
* TFTP server installed on your workstation
* RJ45 -> serial ("rollover") cable connected from your PC to the CONSOLE
port on the board
port on the device
* Ethernet connected to the first ethernet port on the board
If using NFS as part of the setup process, you will also need:
* NFS root setup on your workstation
* TFTP server installed on your workstation (if fetching the kernel from
TFTP, see below).
--- Preparation ---
Build an image (e.g. core-image-minimal) using "edgerouter" as the MACHINE.
In the following instruction it is based on core-image-minimal. Another target
may be similiar with it.
--- Booting from NFS root ---
--- Booting from NFS root / kernel via TFTP ---
Load the kernel, and boot the system as follows:
......@@ -33,17 +33,21 @@ except RuntimeError as exc:
from bb import cookerdata
from bb.main import bitbake_main, BitBakeConfigParameters
from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
__version__ = "1.28.0"
if __name__ == "__main__":
if __version__ != bb.__version__:
sys.exit("Bitbake core version and program version mismatch!")
ret = bitbake_main(BitBakeConfigParameters(sys.argv),
except BBMainException as err:
except bb.BBHandledException:
ret = 1
except Exception:
ret = 1
import traceback
......@@ -46,6 +46,12 @@ logger = logger_create('bitbake-diffsigs')
def find_compare_task(bbhandler, pn, taskname):
""" Find the most recent signature files for the specified PN/task and compare them """
def get_hashval(siginfo):
if siginfo.endswith('.siginfo'):
return siginfo.rpartition(':')[2].partition('_')[0]
return siginfo.rpartition('.')[2]
if not hasattr(bb.siggen, 'find_siginfo'):
logger.error('Metadata does not support finding signature data files')
......@@ -54,7 +60,7 @@ def find_compare_task(bbhandler, pn, taskname):
taskname = 'do_%s' % taskname
filedates = bb.siggen.find_siginfo(pn, taskname, None, bbhandler.config_data)
latestfiles = sorted(filedates.keys(), key=lambda f: filedates[f])[-2:]
latestfiles = sorted(filedates.keys(), key=lambda f: filedates[f])[-3:]
if not latestfiles:
logger.error('No sigdata files found matching %s %s' % (pn, taskname))
......@@ -62,6 +68,16 @@ def find_compare_task(bbhandler, pn, taskname):
logger.error('Only one matching sigdata file found for the specified task (%s %s)' % (pn, taskname))
# It's possible that latestfiles contain 3 elements and the first two have the same hash value.
# In this case, we delete the second element.
# The above case is actually the most common one. Because we may have sigdata file and siginfo
# file having the same hash value. Comparing such two files makes no sense.
if len(latestfiles) == 3:
hash0 = get_hashval(latestfiles[0])
hash1 = get_hashval(latestfiles[1])
if hash0 == hash1:
# Define recursion callback
def recursecb(key, hash1, hash2):
hashes = [hash1, hash2]
This diff is collapsed.
......@@ -26,24 +26,30 @@ except RuntimeError as exc:
def usage():
print('usage: %s [testname1 [testname2]...]' % os.path.basename(sys.argv[0]))
print('usage: [BB_SKIP_NETTESTS=yes] %s [-v] [testname1 [testname2]...]' % os.path.basename(sys.argv[0]))
if len(sys.argv) > 1:
verbosity = 1
tests = sys.argv[1:]
if '-v' in sys.argv:
verbosity = 2
if tests:
if '--help' in sys.argv[1:]:
tests = sys.argv[1:]
tests = ["bb.tests.codeparser",
for t in tests:
t = '.'.join(t.split('.')[:3])
unittest.main(argv=["bitbake-selftest"] + tests)
unittest.main(argv=["bitbake-selftest"] + tests, verbosity=verbosity)
......@@ -10,6 +10,7 @@ import bb
import select
import errno
import signal
from multiprocessing import Lock
# Users shouldn't be running this code directly
if len(sys.argv) != 2 or not sys.argv[1].startswith("decafbad"):
......@@ -24,6 +25,15 @@ if sys.argv[1] == "decafbadbad":
import profile
# Unbuffer stdout to avoid log truncation in the event
# of an unorderly exit as well as to provide timely
# updates to log files for use with tail
if sys.stdout.name == '<stdout>':
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
logger = logging.getLogger("BitBake")
......@@ -35,6 +45,9 @@ except ImportError:
worker_pipe = sys.stdout.fileno()
# Need to guard against multiprocessing being used in child processes
# and multiple processes trying to write to the parent at the same time
worker_pipe_lock = None
handler = bb.event.LogHandler()
......@@ -71,14 +84,21 @@ def worker_flush():
written = os.write(worker_pipe, worker_queue)
worker_queue = worker_queue[written:]
except (IOError, OSError) as e:
if e.errno != errno.EAGAIN:
if e.errno != errno.EAGAIN and e.errno != errno.EPIPE:
def worker_child_fire(event, d):
global worker_pipe
global worker_pipe_lock
data = "<event>" + pickle.dumps(event) + "</event>"
except IOError:
sigterm_handler(None, None)
bb.event.worker_fire = worker_fire
......@@ -144,17 +164,20 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdat
if pid == 0:
def child():
global worker_pipe
global worker_pipe_lock
signal.signal(signal.SIGTERM, sigterm_handler)
# Let SIGHUP exit as SIGTERM
signal.signal(signal.SIGHUP, sigterm_handler)
# Save out the PID so that the event can include it the
# events
bb.event.worker_pid = os.getpid()
bb.event.worker_fire = worker_child_fire
worker_pipe = pipeout
worker_pipe_lock = Lock()
# Make the child the process group leader and ensure no
# child process will be controlled by the current terminal
......@@ -286,13 +309,16 @@ class BitbakeWorker(object):
def serve(self):
while True:
(ready, _, _) = select.select([self.input] + [i.input for i in self.build_pipes.values()], [] , [], 1)
if self.input in ready or len(self.queue):
start = len(self.queue)
if self.input in ready:
self.queue = self.queue + self.input.read()
r = self.input.read()
if len(r) == 0:
# EOF on pipe, server must have terminated
self.sigterm_exception(signal.SIGTERM, None)
self.queue = self.queue + r
except (OSError, IOError):
end = len(self.queue)
if len(self.queue):
self.handle_item("cookerconfig", self.handle_cookercfg)
self.handle_item("workerdata", self.handle_workerdata)
self.handle_item("runtask", self.handle_runtask)
......@@ -34,7 +34,7 @@ from bb.ui.crumbs.hig.deployimagedialog import DeployImageDialog
from bb.ui.crumbs.hig.imageselectiondialog import ImageSelectionDialog
# I put all the fs bitbake supported here. Need more test.
DEPLOYABLE_IMAGE_TYPES = ["jffs2", "cramfs", "ext2", "ext3", "btrfs", "squashfs", "ubi", "vmdk"]
DEPLOYABLE_IMAGE_TYPES = ["jffs2", "cramfs", "ext2", "ext3", "ext4", "btrfs", "squashfs", "ubi", "vmdk"]
Title = "USB Image Writer"
class DeployWindow(gtk.Window):
This diff is collapsed.
......@@ -26,6 +26,7 @@
# as a build eventlog, and the ToasterUI is used to process events in the file
# and log data in the database
from __future__ import print_function
import os
import sys, logging
......@@ -39,12 +40,6 @@ from bb.ui import toasterui
import sys
import logging
logger = logging.getLogger(__name__)
console = logging.StreamHandler(sys.stdout)
format_str = "%(levelname)s: %(message)s"
import json, pickle
......@@ -168,12 +163,12 @@ class MockConfigParameters():
# run toaster ui on our mock bitbake class
if __name__ == "__main__":
if len(sys.argv) < 2:
logger.error("Usage: %s event.log " % sys.argv[0])
print("Usage: %s event.log " % sys.argv[0])
file_name = sys.argv[-1]
mock_connection = FileReadEventsServerConnection(file_name)
configParams = MockConfigParameters()
# run the main program
toasterui.main(mock_connection.connection, mock_connection.events, configParams)
# run the main program and set exit code to the returned value
sys.exit(toasterui.main(mock_connection.connection, mock_connection.events, configParams))
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
<xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
<xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
<xsl:include href="../template/permalinks.xsl"/>
<xsl:include href="../template/section.title.xsl"/>
......@@ -21,7 +21,7 @@
The execution process is launched using the following command
<literallayout class='monospaced'>
$ bitbake &lt;target&gt;
$ bitbake <replaceable>target</replaceable>
For information on the BitBake command and its options,
......@@ -37,14 +37,16 @@
A common way to determine this value for your build host is to run:
A common method to determine this value for your build host is to run
the following:
<literallayout class='monospaced'>
$ grep processor /proc/cpuinfo
and count the number of processors displayed. Note that the number of
processors will take into account hyper-threading, so that a quad-core
build host with hyper-threading will most likely show eight processors,
which is the value you would then assign to that variable.
This command returns the number of processors, which takes into
account hyper-threading.
Thus, a quad-core build host with hyper-threading most likely
shows eight processors, which is the value you would then assign to
......@@ -285,8 +287,8 @@
<link linkend='var-PN'><filename>PN</filename></link> and
<link linkend='var-PV'><filename>PV</filename></link>:
<literallayout class='monospaced'>
PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}"
PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}"
PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
In this example, a recipe called "something_1.2.3.bb" would set
<filename>PN</filename> to "something" and
......@@ -782,13 +784,13 @@
make some dependency and hash information available to the build.
This information includes:
The base hashes for each task in the recipe.
The base hashes for each dependent task.
The task dependencies for each task.
......@@ -157,8 +157,8 @@
<filename>SRC_URI</filename> variable with the appropriate
varflags as follows:
<literallayout class='monospaced'>
SRC_URI[md5sum] = "value"
SRC_URI[sha256sum] = "value"
SRC_URI[md5sum] = "<replaceable>value</replaceable>"
SRC_URI[sha256sum] = "<replaceable>value</replaceable>"
You can also specify the checksums as parameters on the
<filename>SRC_URI</filename> as shown below:
......@@ -325,6 +325,25 @@
SRC_URI = "ftp://you@oe.handhelds.org/home/you/secret.plan"
Because URL parameters are delimited by semi-colons, this can
introduce ambiguity when parsing URLs that also contain semi-colons,
for example:
<literallayout class='monospaced'>
SRC_URI = "http://abc123.org/git/?p=gcc/gcc.git;a=snapshot;h=a5dd47"
Such URLs should should be modified by replacing semi-colons with '&amp;' characters:
<literallayout class='monospaced'>
SRC_URI = "http://abc123.org/git/?p=gcc/gcc.git&amp;a=snapshot&amp;h=a5dd47"
In most cases this should work. Treating semi-colons and '&amp;' in queries