summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/buildman/builder.py24
-rwxr-xr-xtools/buildman/buildman.py6
-rw-r--r--tools/buildman/control.py2
-rw-r--r--tools/patman/gitutil.py11
4 files changed, 37 insertions, 6 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 39a6e8a..0a3900c 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -213,7 +213,10 @@ class BuilderThread(threading.Thread):
# self.Make() below, in the event that we do a build.
result = command.CommandResult()
result.return_code = 0
- out_dir = os.path.join(work_dir, 'build')
+ if self.builder.in_tree:
+ out_dir = work_dir
+ else:
+ out_dir = os.path.join(work_dir, 'build')
# Check if the job was already completed last time
done_file = self.builder.GetDoneFile(commit_upto, brd.target)
@@ -257,7 +260,10 @@ class BuilderThread(threading.Thread):
# Set up the environment and command line
env = self.toolchain.MakeEnvironment()
Mkdir(out_dir)
- args = ['O=build', '-s']
+ args = []
+ if not self.builder.in_tree:
+ args.append('O=build')
+ args.append('-s')
if self.builder.num_jobs is not None:
args.extend(['-j', str(self.builder.num_jobs)])
config_args = ['%s_config' % brd.target]
@@ -431,7 +437,8 @@ class BuilderThread(threading.Thread):
result, request_config = self.RunCommit(commit_upto,
brd, work_dir, True, True, False)
did_config = True
- do_config = request_config
+ if not self.builder.force_reconfig:
+ do_config = request_config
# If we built that commit, then config is done. But if we got
# an warning, reconfig next time to force it to build the same
@@ -524,6 +531,15 @@ class Builder:
toolchains: Toolchains object to use for building
upto: Current commit number we are building (0.count-1)
warned: Number of builds that produced at least one warning
+ force_reconfig: Reconfigure U-Boot on each comiit. This disables
+ incremental building, where buildman reconfigures on the first
+ commit for a baord, and then just does an incremental build for
+ the following commits. In fact buildman will reconfigure and
+ retry for any failing commits, so generally the only effect of
+ this option is to slow things down.
+ in_tree: Build U-Boot in-tree instead of specifying an output
+ directory separate from the source code. This option is really
+ only useful for testing in-tree builds.
Private members:
_base_board_dict: Last-summarised Dict of boards
@@ -593,7 +609,9 @@ class Builder:
self._next_delay_update = datetime.now()
self.force_config_on_failure = True
self.force_build_failures = False
+ self.force_reconfig = False
self._step = step
+ self.in_tree = False
self.col = terminal.Color()
diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py
index 0da6797..42847ac 100755
--- a/tools/buildman/buildman.py
+++ b/tools/buildman/buildman.py
@@ -67,6 +67,9 @@ parser.add_option('-B', '--bloat', dest='show_bloat',
help='Show changes in function code size for each board')
parser.add_option('-c', '--count', dest='count', type='int',
default=-1, help='Run build on the top n commits')
+parser.add_option('-C', '--force-reconfig', dest='force_reconfig',
+ action='store_true', default=False,
+ help='Reconfigure for every commit (disable incremental build)')
parser.add_option('-e', '--show_errors', action='store_true',
default=False, help='Show errors and warnings')
parser.add_option('-f', '--force-build', dest='force_build',
@@ -82,6 +85,9 @@ parser.add_option('-g', '--git', type='string',
help='Git repo containing branch to build', default='.')
parser.add_option('-H', '--full-help', action='store_true', dest='full_help',
default=False, help='Display the README file')
+parser.add_option('-i', '--in-tree', dest='in_tree',
+ action='store_true', default=False,
+ help='Build in the source tree instead of a separate directory')
parser.add_option('-j', '--jobs', dest='jobs', type='int',
default=None, help='Number of jobs to run at once (passed to make)')
parser.add_option('-k', '--keep-outputs', action='store_true',
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index cfad535..2dd8043 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -157,6 +157,8 @@ def DoBuildman(options, args):
else:
builder.force_build = options.force_build
builder.force_build_failures = options.force_build_failures
+ builder.force_reconfig = options.force_reconfig
+ builder.in_tree = options.in_tree
# Work out which boards to build
board_selected = boards.GetSelectedDict()
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 7b75c83..65754f5 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -377,9 +377,14 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname,
"""
to = BuildEmailList(series.get('to'), '--to', alias, raise_on_error)
if not to:
- print ("No recipient, please add something like this to a commit\n"
- "Series-to: Fred Bloggs <f.blogs@napier.co.nz>")
- return
+ git_config_to = command.Output('git', 'config', 'sendemail.to')
+ if not git_config_to:
+ print ("No recipient.\n"
+ "Please add something like this to a commit\n"
+ "Series-to: Fred Bloggs <f.blogs@napier.co.nz>\n"
+ "Or do something like this\n"
+ "git config sendemail.to u-boot@lists.denx.de")
+ return
cc = BuildEmailList(series.get('cc'), '--cc', alias, raise_on_error)
if self_only:
to = BuildEmailList([os.getenv('USER')], '--to', alias, raise_on_error)