summaryrefslogtreecommitdiff
path: root/tools/buildman/builder.py
Commit message (Collapse)AuthorAgeLines
* buildman: Add a space before the list of boardsSimon Glass2015-03-05-1/+1
| | | | | | | | | | Tweak the output slightly so we don't get things like: - board1 board2+ board3 board4 There should be a space before the '+'. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to write the full build outputSimon Glass2015-01-14-1/+3
| | | | | | | | Normally buildman runs with 'make -s' meaning that only errors and warnings appear in the log file. Add a -V option to run make in verbose mode, and with V=1, causing a full build log to be created. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to use the full tool chain pathSimon Glass2015-01-14-1/+6
| | | | | | | | | | | | | | In some cases there may be multiple toolchains with the same name in the path. Provide an option to use the full path in the CROSS_COMPILE environment variable. Note: Wolfgang mentioned that this is dangerous since in some cases there may be other tools on the path that are needed. So this is set up as an option, not the default. I will need test confirmation (i.e. that this commit fixes a real problem) before merging it. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Steve Rae <srae@broadcom.com>
* buildman: Add an option to flatten output directory treesSimon Glass2015-01-14-4/+8
| | | | | | | | | | When building current source for a single board, buildman puts the output in <output_dir>/current/current/<board>. Add an option to make it use <output_dir>/<board> instead. This removes the unnecessary directories in that case, controlled by the --no-subdirs/-N option. Suggested-by: Tom Rini <trini@ti.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't prune output space for 'current source' buildSimon Glass2015-01-14-0/+2
| | | | | | | | | | This is not needed since we always do a full (non-incremental) build. Also it might be dangerous since it will try to delete everything below the base directory. Fix this potentially nasty bug. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Fix repeating board list with -lSimon Glass2014-11-26-1/+2
| | | | | | | Ensure that we don't print duplicate board names when -l is used. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
* buildman: Create parent directories as necessaryThierry Reding2014-09-09-1/+1
| | | | | | | | | When creating build directories also create parents as necessary. This fixes a failure when building a hierarchical branch (i.e. foo/bar). Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@ti.com>
* buildman: Send builder output through a function for testingSimon Glass2014-09-09-28/+30
| | | | | | | To allow us to verify the builder's console output, send it through a function which can collect it when running in test mode. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Separate out display of warnings and errorsSimon Glass2014-09-05-23/+88
| | | | | | | | | | | Some boards unfortunately build with warnings and it is useful to be able to easily distinguish the warnings from the errors. Use a simple pattern match to categorise gcc output into warnings and errors, and display each separately. New warnings are shown in magenta (with a w+ prefix) and fixed warnings are shown in yellow with a w- prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to show which boards caused which errorsSimon Glass2014-09-05-9/+42
| | | | | | | | | | | | | | | | | Add a -l option to display a list of offending boards against each error/warning line. The information will be shown in brackets as below: 02: wip sandbox: + sandbox arm: + seaboard +(sandbox) arch/sandbox/cpu/cpu.c: In function 'timer_get_us': +(sandbox) arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] +(seaboard) board/nvidia/seaboard/seaboard.c: In function 'pin_mux_mmc': +(seaboard) board/nvidia/seaboard/seaboard.c:36:9: warning: unused variable 'fred' [-Wunused-variable] +(seaboard) int fred; +(seaboard) ^ Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Set the return code to indicate build resultSimon Glass2014-09-05-0/+5
| | | | | | | | When buildman finds errors/warnings when building, set the return code to indicate this. Suggested-by: York Sun <yorksun@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* Makefile: remove generated boards.cfg within make distcleanRoger Meier2014-08-22-1/+1
| | | | | | | | | Signed-off-by: Roger Meier <roger@bufferoverflow.ch> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org>
* buildman: Add a message indicating there are no errorsSimon Glass2014-08-13-0/+7
| | | | | | | If buildman finds no problems it prints nothing. This can be a bit confusing, so add a message that all is well. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Remove unused non-incremental build method codeSimon Glass2014-08-13-34/+0
| | | | | | The non-incremental build method is no longer used, so remove it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add verbose option to display errors as they happenSimon Glass2014-08-13-3/+13
| | | | | | | | | | | Normally buildman operates in two passes - one to do the build and another to summarise the errors. Add a verbose option (-v) to display build problems as they happen. With -e also given, this will display errors too. When building the current source tree (rather than a list of commits in a branch), both -v and -e are enabled automatically. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Refactor output optionsSimon Glass2014-08-13-19/+27
| | | | | | | | | We need the output options to be available in several places. It's a pain to pass them into each function. Make them properties of the builder and add a single function to set them up. At the same time, add a function which produces summary output using these options. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Move BuilderThread code to its own fileSimon Glass2014-08-13-431/+8
| | | | | | The builder.py file is getting too long, so split out some code. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow building of current source treeSimon Glass2014-08-13-21/+50
| | | | | | | | | | | | Originally buildman had some support for building the current source tree. However this was dropped before it was submitted, as part of the effort to make it faster when building entire branches. Reinstate this support. If no -b option is given, buildman will build the current source tree. Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: adjust for KconfigMasahiro Yamada2014-07-30-3/+3
| | | | | | | | | Use "make <board>_defconfig" instead of "make <board>_config". Invoke tools/genboardscfg.py to generate boards.cfg when it is missing. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: make sure to invoke GNU MakeMasahiro Yamada2014-07-29-2/+4
| | | | | | | | | | Since the command name 'make' may not be GNU Make on some platforms such as FreeBSD, buildman should call scripts/show-gnu-make to get the command name for GNU MAKE (and error out if it is not found). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* buildman: Support in-tree buildsSimon Glass2014-07-28-2/+12
| | | | | | | | | | | | At present buildman always builds out-of-tree, that is it uses a separate output directory from the source directory. Normally this is what you want, but it is important that in-tree builds work also. Some Makefile changes may break this. Add a -i option to tell buildman to use in-tree builds, so that it is easy to test this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add -C option to force a reconfigure for each commitSimon Glass2014-07-28-1/+9
| | | | | | | | | | | | | | Normally buildman wil try to configure U-Boot for a particular board on the first commit that it builds in a series. Subsequent commits are built without reconfiguring which normally works. Where it doesn't, buildman automatically reconfigures and retries. To fully emulate the way MAKEALL works, we should have an option to disable this optimisation. Add a -C option to cause buildman to always reconfigure on each commit. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Avoid retrying a build if it definitely failedSimon Glass2014-07-23-1/+3
| | | | | | | | | | | | After a build fails buildman will reconfigure and try again, if it did not reconfigure before the build. However it doesn't actually keep track of whether it did reconfigure on the previous attempt. Fix that logic to avoid a pointless rebuild. This speeds things up quite a bit for failing builds. Previously they would always be built twice. Change-Id: Ib37f21320baa7c60bed98f4042c0b7ed7c0dc85e Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add -F flag to retry failed buildsSimon Glass2014-07-23-5/+18
| | | | | | | | | | | | | | | | | | | | Generally a build failure with a particular commit cannot be fixed except by changing that commit. Changing the commit will automatically cause buildman to retry when you run it again: buildman sees that the commit hash is different and that it has no previous build result for the new commit hash. However sometimes the build failure is due to a toolchain issue or some other environment problem. In that case, retrying failed builds may yield a different result. Add a flag to retry failed builds. This differs from the force rebuild flag (-f) in that it will not rebuild commits which are already marked as succeeded. Series-to: u-boot Change-Id: Iac4306df499d65ff0888b1c60f06fc162a6faad8
* buildman: Allow make flags to be specified for each boardSimon Glass2013-10-01-0/+1
| | | | | | | | | | | There are a few make options such as BUILD_TAG which can be provided when building U-Boot. Provide a way for buildman to pass these flags to make also. The flags should be in a [make-flags] section and arranged by target name (the 'target' column in boards.cfg. See the README for more details. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* buildman - U-Boot multi-threaded builder and summary toolSimon Glass2013-04-04-0/+1445
This tool handles building U-Boot to check that you have not broken it with your patch series. It can build each individual commit and report which boards fail on which commits, and which errors come up. It also shows differences in image sizes due to particular commits. Buildman aims to make full use of multi-processor machines. Documentation and caveats are in tools/buildman/README. Signed-off-by: Simon Glass <sjg@chromium.org>