summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/devtool/build.py33
1 files changed, 30 insertions, 3 deletions
diff --git a/scripts/lib/devtool/build.py b/scripts/lib/devtool/build.py
index 0f848e20e9..335aff5491 100644
--- a/scripts/lib/devtool/build.py
+++ b/scripts/lib/devtool/build.py
@@ -16,9 +16,12 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Devtool build plugin"""
+import os
+import bb
import logging
import argparse
-from devtool import exec_build_env_command
+import tempfile
+from devtool import exec_build_env_command, DevtoolError
logger = logging.getLogger('devtool')
@@ -26,18 +29,41 @@ def plugin_init(pluginlist):
"""Plugin initialization"""
pass
+def _create_conf_file(values, conf_file=None):
+ if not conf_file:
+ fd, conf_file = tempfile.mkstemp(suffix='.conf')
+ elif not os.path.exists(os.path.dirname(conf_file)):
+ logger.debug("Creating folder %s" % os.path.dirname(conf_file))
+ bb.utils.mkdirhier(os.path.dirname(conf_file))
+ with open(conf_file, 'w') as f:
+ for key, value in values.iteritems():
+ f.write('%s = "%s"\n' % (key, value))
+ return conf_file
+
def build(args, config, basepath, workspace):
"""Entry point for the devtool 'build' subcommand"""
- import bb
if not args.recipename in workspace:
raise DevtoolError("no recipe named %s in your workspace" %
args.recipename)
+
build_task = config.get('Build', 'build_task', 'populate_sysroot')
+
+ postfile_param = ""
+ postfile = ""
+ if args.disable_parallel_make:
+ logger.info("Disabling 'make' parallelism")
+ postfile = os.path.join(basepath, 'conf', 'disable_parallelism.conf')
+ _create_conf_file({'PARALLEL_MAKE':''}, postfile)
+ postfile_param = "-R %s" % postfile
try:
- exec_build_env_command(config.init_path, basepath, 'bitbake -c %s %s' % (build_task, args.recipename), watch=True)
+ exec_build_env_command(config.init_path, basepath, 'bitbake -c %s %s %s' % (build_task, postfile_param, args.recipename), watch=True)
except bb.process.ExecutionError as e:
# We've already seen the output since watch=True, so just ensure we return something to the user
return e.exitcode
+ finally:
+ if postfile:
+ logger.debug('Removing postfile')
+ os.remove(postfile)
return 0
@@ -47,4 +73,5 @@ def register_commands(subparsers, context):
description='Builds the specified recipe using bitbake',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_build.add_argument('recipename', help='Recipe to build')
+ parser_build.add_argument('-s', '--disable-parallel-make', action="store_true", help='Disable make parallelism')
parser_build.set_defaults(func=build)
mbedded-core.git/diff/bitbake/contrib/bbdev.sh?id2=d64c7ae88ca29def7dd2869acaa0e2ec047bd153'>bitbake/contrib/bbdev.sh31
-rw-r--r--bitbake/contrib/vim/ftdetect/bitbake.vim4
-rw-r--r--bitbake/contrib/vim/syntax/bitbake.vim127
-rw-r--r--bitbake/doc/bitbake.1121
-rw-r--r--bitbake/doc/manual/Makefile56
-rw-r--r--bitbake/doc/manual/html.css281
-rw-r--r--bitbake/doc/manual/usermanual.xml534
-rw-r--r--bitbake/lib/bb/COW.py323
-rw-r--r--bitbake/lib/bb/__init__.py100
-rw-r--r--bitbake/lib/bb/build.py446
-rw-r--r--bitbake/lib/bb/cache.py559
-rw-r--r--bitbake/lib/bb/codeparser.py329
-rw-r--r--bitbake/lib/bb/command.py280
-rw-r--r--bitbake/lib/bb/cooker.py1034
-rw-r--r--bitbake/lib/bb/daemonize.py190
-rw-r--r--bitbake/lib/bb/data.py330
-rw-r--r--bitbake/lib/bb/data_smart.py371
-rw-r--r--bitbake/lib/bb/event.py300
-rw-r--r--bitbake/lib/bb/fetch/__init__.py789
-rw-r--r--bitbake/lib/bb/fetch/bzr.py147
-rw-r--r--bitbake/lib/bb/fetch/cvs.py177
-rw-r--r--bitbake/lib/bb/fetch/git.py254
-rw-r--r--bitbake/lib/bb/fetch/hg.py172
-rw-r--r--bitbake/lib/bb/fetch/local.py73
-rw-r--r--bitbake/lib/bb/fetch/osc.py150
-rw-r--r--bitbake/lib/bb/fetch/perforce.py208
-rw-r--r--bitbake/lib/bb/fetch/repo.py105
-rw-r--r--bitbake/lib/bb/fetch/ssh.py118
-rw-r--r--bitbake/lib/bb/fetch/svk.py106
-rw-r--r--bitbake/lib/bb/fetch/svn.py201
-rw-r--r--bitbake/lib/bb/fetch/wget.py95
-rw-r--r--bitbake/lib/bb/methodpool.py84
-rw-r--r--bitbake/lib/bb/msg.py144
-rw-r--r--bitbake/lib/bb/parse/__init__.py118
-rw-r--r--bitbake/lib/bb/parse/ast.py445
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py242
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py138
-rw-r--r--bitbake/lib/bb/parse/parse_py/__init__.py33
-rw-r--r--bitbake/lib/bb/persist_data.py133
-rw-r--r--bitbake/lib/bb/providers.py323
-rw-r--r--bitbake/lib/bb/runqueue.py1591
-rw-r--r--bitbake/lib/bb/server/none.py191
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py199
-rw-r--r--bitbake/lib/bb/shell.py824
-rw-r--r--bitbake/lib/bb/siggen.py265
-rw-r--r--bitbake/lib/bb/taskdata.py587
-rw-r--r--bitbake/lib/bb/ui/__init__.py17
-rw-r--r--bitbake/lib/bb/ui/crumbs/__init__.py17
-rw-r--r--bitbake/lib/bb/ui/crumbs/buildmanager.py455
-rw-r--r--bitbake/lib/bb/ui/crumbs/puccho.glade606
-rw-r--r--bitbake/lib/bb/ui/crumbs/runningbuild.py178
-rw-r--r--bitbake/lib/bb/ui/depexp.py271
-rw-r--r--bitbake/lib/bb/ui/goggle.py76
-rw-r--r--bitbake/lib/bb/ui/knotty.py192
-rw-r--r--bitbake/lib/bb/ui/ncurses.py336
-rw-r--r--bitbake/lib/bb/ui/puccho.py425
-rw-r--r--bitbake/lib/bb/ui/uievent.py124
-rw-r--r--bitbake/lib/bb/ui/uihelper.py50
-rw-r--r--bitbake/lib/bb/utils.py762
-rw-r--r--bitbake/lib/codegen.py570
-rw-r--r--bitbake/lib/ply/__init__.py4
-rw-r--r--bitbake/lib/ply/lex.py1058
-rw-r--r--bitbake/lib/ply/yacc.py3276
-rw-r--r--bitbake/lib/pysh/builtin.py710
-rw-r--r--bitbake/lib/pysh/interp.py1367
-rw-r--r--bitbake/lib/pysh/lsprof.py116
-rw-r--r--bitbake/lib/pysh/pysh.py167
-rw-r--r--bitbake/lib/pysh/pyshlex.py888
-rw-r--r--bitbake/lib/pysh/pyshyacc.py772
-rw-r--r--bitbake/lib/pysh/sherrors.py41
-rw-r--r--bitbake/lib/pysh/subprocess_fix.py77
-rw-r--r--documentation/bsp-guide/Makefile35
-rw-r--r--documentation/bsp-guide/bsp-guide.xml62
-rw-r--r--documentation/bsp-guide/bsp.xml459
-rw-r--r--documentation/bsp-guide/figures/poky-ref-manual.pngbin17829 -> 0 bytes-rw-r--r--documentation/bsp-guide/style.css952
-rw-r--r--documentation/poky-ref-manual/Makefile36
-rw-r--r--documentation/poky-ref-manual/TODO11
-rw-r--r--documentation/poky-ref-manual/bsp.xml459
-rw-r--r--documentation/poky-ref-manual/development.xml1004
-rw-r--r--documentation/poky-ref-manual/examples/hello-autotools/hello_2.3.bb7
-rw-r--r--documentation/poky-ref-manual/examples/hello-single/files/helloworld.c8
-rw-r--r--documentation/poky-ref-manual/examples/hello-single/hello.bb16
-rw-r--r--documentation/poky-ref-manual/examples/libxpm/libxpm_3.5.6.bb13
-rw-r--r--documentation/poky-ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb13
-rw-r--r--documentation/poky-ref-manual/extendpoky.xml1004
-rw-r--r--documentation/poky-ref-manual/faq.xml314
-rwxr-xr-xdocumentation/poky-ref-manual/figures/cropped-yocto-project-bw.pngbin5453 -> 0 bytes-rw-r--r--documentation/poky-ref-manual/figures/poky-ref-manual.pngbin17829 -> 0 bytes-rwxr-xr-xdocumentation/poky-ref-manual/figures/yocto-project-transp.pngbin8626 -> 0 bytes-rw-r--r--documentation/poky-ref-manual/introduction.xml169
-rw-r--r--documentation/poky-ref-manual/poky-beaver.pngbin26252 -> 0 bytes-rw-r--r--documentation/poky-ref-manual/poky-logo.svg117
-rw-r--r--documentation/poky-ref-manual/poky-ref-manual.xml102
-rw-r--r--documentation/poky-ref-manual/ref-bitbake.xml348
-rw-r--r--documentation/poky-ref-manual/ref-classes.xml455
-rw-r--r--documentation/poky-ref-manual/ref-features.xml302
-rw-r--r--documentation/poky-ref-manual/ref-images.xml72
-rw-r--r--documentation/poky-ref-manual/ref-structure.xml505
-rw-r--r--documentation/poky-ref-manual/ref-variables.xml879
-rw-r--r--documentation/poky-ref-manual/ref-varlocality.xml211
-rw-r--r--documentation/poky-ref-manual/resources.xml142
-rw-r--r--documentation/poky-ref-manual/screenshots/ss-anjuta-poky-1.pngbin96531 -> 0 bytes-rw-r--r--documentation/poky-ref-manual/screenshots/ss-anjuta-poky-2.pngbin76419 -> 0 bytes-rw-r--r--documentation/poky-ref-manual/screenshots/ss-oprofile-viewer.pngbin51240 -> 0 bytes-rw-r--r--documentation/poky-ref-manual/screenshots/ss-sato.pngbin38689 -> 0 bytes-rw-r--r--documentation/poky-ref-manual/style.css952
-rw-r--r--documentation/poky-ref-manual/usingpoky.xml334
-rwxr-xr-xdocumentation/poky-ref-manual/white-on-black-yp.pngbin9584 -> 0 bytes-rw-r--r--documentation/template/Vera.ttfbin65932 -> 0 bytes-rw-r--r--documentation/template/Vera.xml1
-rw-r--r--documentation/template/VeraMoBd.ttfbin49052 -> 0 bytes-rw-r--r--documentation/template/VeraMoBd.xml1
-rw-r--r--documentation/template/VeraMono.ttfbin49224 -> 0 bytes-rw-r--r--documentation/template/VeraMono.xml1
-rw-r--r--documentation/template/draft.pngbin24847 -> 0 bytes-rw-r--r--documentation/template/fop-config.xml58
-rw-r--r--documentation/template/ohand-color.svg150
-rw-r--r--documentation/template/poky-db-pdf.xsl64
-rw-r--r--documentation/template/poky-ref-manual.pngbin32145 -> 0 bytes-rw-r--r--documentation/template/poky.svg163
-rw-r--r--documentation/template/titlepage.templates.xml1240
-rw-r--r--documentation/template/yocto-project-qs.pngbin17829 -> 0 bytes-rwxr-xr-xdocumentation/tools/poky-docbook-to-pdf51
-rw-r--r--documentation/yocto-project-qs/Makefile32
-rwxr-xr-xdocumentation/yocto-project-qs/figures/building-an-image.pngbin14891 -> 0 bytes-rwxr-xr-xdocumentation/yocto-project-qs/figures/cropped-yocto-project-bw.pngbin5453 -> 0 bytes-rwxr-xr-xdocumentation/yocto-project-qs/figures/using-a-pre-built-image.pngbin13228 -> 0 bytes-rwxr-xr-xdocumentation/yocto-project-qs/figures/white-on-black.pngbin18296 -> 0 bytes-rwxr-xr-xdocumentation/yocto-project-qs/figures/yocto-environment.pngbin63