summaryrefslogtreecommitdiffstats
path: root/tools/buildman
Commit message (Collapse)AuthorAgeFilesLines
* buildman: Rename do_build to config_onlySimon Glass2016-12-021-5/+5
| | | | | | | This variable name is needlessly confusion. Adjust it to use a 'positive' name instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Clean up odd characters on the terminalSimon Glass2016-12-021-1/+1
| | | | | | | At present buildman leaves behind a few characters during its progress updates, which looks odd. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Squash useless output from -KSimon Glass2016-12-024-13/+38
| | | | | | | | | | When using #define CONFIG_SOME_OPTION, the value it set to '1'. When using defconfig (i.e. CONFIG_SOME_OPTION=y) the value is set to 'y'. This results in differences showing up with -K. These differences are seldom useful. Adjust buildman to suppress these differences by default. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add documentation for CONFIG checkingSimon Glass2016-12-021-0/+37
| | | | | | | The -K option is not mentioned in the README at present. Add some notes to describe how this is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to just create the configSimon Glass2016-12-024-7/+17
| | | | | | | | | | | | | | Normally buildman does a full build of a board. This includes creating the u-boot.cfg file which contains all the configuration options. Buildman uses this file with the -K option, to show differences in effective configuration for each commit. Doing a full build of U-Boot just to create the u-boot.cfg file is wasteful. Add a -D option which causes buildman to only create the configuration. This is enough to support use of -K and can be done much more quickly (typically 5-10 times faster). Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Fix building based on 'options' fieldTom Rini2016-11-061-2/+2
| | | | | | | | | | The README for buildman says that we can use any field in boards.cfg to decide what to build. However, we were not saving the options field correctly. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools: buildman: Add compiler wrapperYork Sun2016-10-092-2/+25
| | | | | | | | Now we can use compiler wrapper such as ccache or distcc for buildman. Signed-off-by: York Sun <york.sun@nxp.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* tools: buildman: Remove duplicated codeYork Sun2016-10-091-4/+0
| | | | | | | | Signed-off-by: York Sun <york.sun@nxp.com> CC: Simon Glass <sjg@chromium.org> Fixed commit subject: Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Drop the 'alive' flag in BuilderThreadSimon Glass2016-10-091-3/+1
| | | | | | This is not used, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't show a stacktrace on Ctrl-CSimon Glass2016-10-091-0/+7
| | | | | | | | When Ctrl-C is pressed, just exited quietly. There is no sense in displaying a stack trace since buildman will always be in the same place: waiting for threads to complete building all the jobs on the queue. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Drop the 'active' flag in the builderSimon Glass2016-10-092-16/+1
| | | | | | This serves no real purpose, since when we are not active, we exit. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow builds to terminate cleanlySimon Glass2016-10-091-2/+6
| | | | | | | | | It is annoying that buildman does not respond cleanly to Ctrl-C or SIGINT, particularly on machines with lots of CPUS. Unfortunately queue.join() blocks the main thread and does not allow it to see the signal. Use a separate thread instead, Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Put our local libraries first in the pathSimon Glass2016-10-091-1/+1
| | | | | | | | | If patman is installed on the machine (e.g. in the standard dist-packages directory), it will find libraries from there in preference to our local libraries. Adjust the order of the path to ensure that local libraries are found first. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Print a message indicating the build is startingSimon Glass2016-10-092-2/+3
| | | | | | | Make it clear when buildman actually starts building. This happens when it has prepared the threads, working directory and output directories. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Print a message when removing old directoriesSimon Glass2016-10-091-0/+6
| | | | | | | | | | | | When buildman starts, it prepares its output directory by removing any old build directories which will not be used this time. This can happen if a previous build left directories around for commit hashes which are no-longer part of the branch. This can take quite a while, so print a message to indicate what is going on. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Tidy up the 'cloning' messageSimon Glass2016-10-091-1/+3
| | | | | | | | | | | | | | | On a machine with a lot of CPUs this prints a lot of useless lines of the form: Cloning repo for thread <n> Adjust the output so that these all appear on one line, and disappear when the cloning is complete. Note: This cloning is actually unnecessary and very wasteful on disk space (about 3.5GB each time). It would be better to create symlinks. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Adjust command.Output() to raise an error by defaultSimon Glass2016-09-181-1/+1
| | | | | | | | It is more useful to have this method raise an error when something goes wrong. Make this the default and adjust the few callers that don't want to use it this way. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add a quick-start noteSimon Glass2016-07-311-0/+14
| | | | | | | | For those who just want to build a board, it is useful to see a quick hint right at the start of the documentation. Add a few commands showing how to download toolchains and build a board. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Avoid overwriting existing toolchain entriesSimon Glass2016-07-311-2/+1
| | | | | | | | | | | | | | | | | | | The current code for setting up the toolchain config always writes the new paths to an item called 'toolchain'. This means that it will overwrite any existing toolchain item with the same name. In practice, this means that: buildman --fetch-arch all will fetch all toolchains, but only the path of the final one will be added to the config. This normally works out OK, since most toolchains are the same version (e.g. gcc 4.9) and will be found on the same path. But it is not correct and toolchains for archs which don't use the same version will not function as expected. Adjust the code to use a complete glob of the toolchain path. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* buildman: Drop the toolchain error when downloading toolchainsSimon Glass2016-07-311-7/+10
| | | | | | | | | | | It doesn't make sense to complain about missing toolchains when the --fetch-arch option is being used. The user is presumably aware that there is a toolchain problem and is actively correcting it by running with this option. Refactor the code to avoid printing this confusing message. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Fix a typo in TestSettingsHasPath()Simon Glass2016-07-311-1/+1
| | | | | | | The function comment should say 'buildman'. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* buildman: Improve the toolchain progress/error outputSimon Glass2016-07-312-12/+21
| | | | | | | | | | Use colour to make it easier to see what is going on. Also print a message before downloading a new toolchain. Mention --fetch-arch in the message that is shown when there are no available toolchains, since this is the quickest way to resolve the problem. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* buildman: Allow the toolchain error to be suppressedSimon Glass2016-07-311-6/+14
| | | | | | | | | When there are no toolchains a warning is printed. But in some cases this is confusing, such as when the user is fetching new toolchains. Adjust the function to supress the warning in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Fix the 'help' test to use the correct pathSimon Glass2016-07-311-1/+1
| | | | | | | When buildman is run via a symlink, this test fails. Fix it to work the same way as buildman itself. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Automatically create a config file if neededSimon Glass2016-07-311-0/+44
| | | | | | | | | | If there is no ~/.buildman file, buildman currently complains and exists. To make things a little more friendly, create an empty one automatically. This will not allow things to be built, but --fetch-arch can be used to handle that. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* buildman: Tidy up the README a littleSimon Glass2016-07-311-23/+30
| | | | | | | Tidy up some problems found by a recent review. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* buildman: allow more incremental buildingStephen Warren2016-05-175-11/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One use-case for buildman is to continually run it interactively after each small step in a large refactoring operation. This gives more immediate feedback than making a number of commits and then going back and testing them. For this to work well, buildman needs to be extremely fast. At present, a couple issues prevent it being as fast as it could be: 1) Each time buildman runs "make %_defconfig", it runs "make mrproper" first. This throws away all previous build results, requiring a from-scratch build. Optionally avoiding this would speed up the build, at the cost of potentially causing or missing some build issues. 2) A build tree is created per thread rather than per board. When a thread switches between building different boards, this often causes many files to be rebuilt due to changing config options. Using a separate build tree for each board would avoid this. This does put more strain on the system's disk cache, but it is worth it on my system at least. This commit adds two command-line options to implement the changes described above; -I ("--incremental") turns of "make mrproper" and -P ("--per-board-out-dir") creats a build directory per board rather than per thread. Tested: ./tools/buildman/buildman.py tegra ./tools/buildman/buildman.py -I -P tegra ./tools/buildman/buildman.py -b tegra_dev tegra ./tools/buildman/buildman.py -b tegra_dev -I -P tegra ... each once after deleting the buildman result/work directory, and once "incrementally" after a previous identical invocation. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org> # v1 Tested-by: Simon Glass <sjg@chromium.org> # v1 Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Clarify the use of -VSimon Glass2016-03-172-2/+3
| | | | | | | | | This option outputs to the log file, not to the terminal. Clarify that in the help, and add a mention of it in the README. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* buildman: Add a way to specific a full toolchain prefixSimon Glass2016-03-172-110/+226
| | | | | | | | | | | | | | | | At present buildman allows you to specify the directory containing the toolchain, but not the actual toolchain prefix. If there are multiple toolchains in a single directory, this can be inconvenient. Add a new 'toolchain-prefix' setting to the settings file, which allows the full prefix (or path to the C compiler) to be specified. Update the documentation to match. Suggested-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
* buildman: Allow branch names which conflict with directoriesSimon Glass2016-03-171-0/+2
| | | | | | | | | | At present if you try to use buildman with the branch 'test' it will complain that it is unsure whether you mean the branch or the directory. This is a feature of the 'git log' command that buildman uses. Fix it by resolving the ambiguity. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* buildman: Allow the toolchain architecture to be specifiedSimon Glass2016-03-141-5/+12
| | | | | | | | At present the architecture is deduced from the toolchain filename. Allow it to be specified by the caller. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com
* buildman: Allow the toolchain priority to be specifiedSimon Glass2016-03-141-8/+22
| | | | | | | | | | At present the priority of a toolchain is calculated from its filename based on hard-coded rules. Allow it to be specified by the caller. We will use this in a later patch. Also display the priority and provide a message when it is overriden by another toolchain of higher priority. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* buildman: Fix up a few code inconsistencies in toolchain.pySimon Glass2016-03-141-5/+6
| | | | | | | | | Normally we use a single quote for strings unless there is a reason not to (such as an embedded single quote). Fix a few counter-examples in this file. Also add a missing function-argument comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* buildman: patman: Fix -H when installed as a symlinkSimon Glass2016-03-141-1/+2
| | | | | | | | | | It is convenient to install symlinks to buildman and patman in the search patch, such as /usr/local/bin. But when this is done, the -H option fails to work because it looks in the directory containing the symlink instead of its target. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* tools: Update openrisc toolchain informationBin Meng2016-02-241-1/+5
| | | | | | | | | Since commit 87da2690ab81b5f29f83dc85c55f933e6ef414bc "openrisc: updating build tools naming convention", openrisc kernel.org toolchain is out of date and cannot build U-Boot. Update buildman and moveconfig tools to refer to the new one. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* buildman: README: add links for toolchains not available on kernel.orgThomas Chou2015-12-101-1/+22
| | | | | | | | | | | Add links for toolchains not available on kernel.org. The sh4 toolchains from kernel.org dose not work for some boards, so use the sh from Sourcery. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* buildman: Improve the config comparison featureSimon Glass2015-09-091-44/+142
| | | | | | | | | | | | | | | | At present buildman can compare configurations between commits but the feature is less useful than it could be. There is no summary by architecture and changes are not reported on a per-board basis. Correct these deficiencies so that it is possible to see exactly what is changing for any number of boards. Note that 'buildman -b <branch> -C' is recommended for any build where you will be comparing configuration. Without -C the correct configuration will not be reported since changes will often not be picked up. Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* kconfiglib: update to the latest versionUlf Magnusson2015-08-281-2252/+1906
| | | | | | | | | | | | | | | Corresponds to ba71a0e (Fix _parse_block() 'parent' documentation re. ifs.) from upstream, just adding the SPDX tag. Has performance improvements, code cleanup, Python 3 support, and various small fixes, including the following: - Unset user values when loading a zero-byte .config. (5e54e2c) - Ignore indented .config assignments. (f8a7510) - Do not require $srctree to be set for non-kernel projects. (d56e9c1) - Report correct locations in the presence of continuation lines. (0cebc87) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
* buildman: Correct '--fetch-arch' command documentationBin Meng2015-07-281-2/+2
| | | | | | | The doc wrongly put sandbox in the '--fetch-arch' command. Remove it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* builderthread.py: Keep 'SPL'Tom Rini2015-07-141-1/+1
| | | | | | | | | On i.MX platforms the SPL binary is called "SPL" so make sure we keep that. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* kconfiglib: sync with the latest in Kconfiglib projectMasahiro Yamada2015-06-121-7/+35
| | | | | | | | | | | | | | | | | | This commit imports some updates of kconfiglib.py from https://github.com/ulfalizer/Kconfiglib - Warn about and ignore the "allnoconfig_y" Kconfig option - Statements in choices inherit menu/if deps - Add Symbol.is_allnoconfig_y() - Hint that modules are still supported despite warnings. - Add warning related to get_defconfig_filename(). - Fix typo in docs. - Allow digits in $-references to symbols. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Philip Craig <philipjcraig@gmail.com> Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* buildman: Add gcc 4.9.0 with Microblaze toolchainMichal Simek2015-04-233-3/+3
| | | | | | | | | | | Also read gcc 4.9.0 at kernel.org which also have Microblaze toolchain. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Fixed unit test failure by updating the test: Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Make -V (verbose_build) really be verboseTom Rini2015-04-181-1/+3
| | | | | | | | | | The help text for -V says we will pass V=1 but all it really did was not pass in -s. Change the logic to pass make V=1 with given to buildman -V or -s to make otherwise. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Keep more outputs with the --keep-outputs flagTom Rini2015-04-181-4/+3
| | | | | | | | | | | | | When told to keep outputs, be much more liberal in what files we keep. In addition to adding 'MLO', keep anything that matches u-boot-spl.* (so that we keep the map file as well) and anything we generate about 'u-boot itself. A large number of bootable formats now match this and thus it's easier to build many targets and then boot them afterwards using buildman. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Allow comparison of build configurationSimon Glass2015-04-183-15/+174
| | | | | | | | | | | | | It is useful to be able to see CONFIG changes made by commits. Add this feature to buildman using the -K flag so that all CONFIG changes are reported. The CONFIG options exist in a number of files. Each is reported individually as well as a summary that covers all files. The output shows three parts: green for additions, red for removals and yellow for changes. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Store build config filesSimon Glass2015-04-181-7/+29
| | | | | | Store all config file output so that we can compare changes if requested. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Adjust the 'aborted' heuristic for writing outputSimon Glass2015-04-181-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | At present buildman tries to detect an aborted build and doesn't record a result in that case. This is to make sure that an abort (e.g. with Ctrl-C) does not mark the build as done. Without this option, buildman would never retry the build unless -f/-F are provided. The effect is that aborting the build creates 'fake errors' on whatever builds buildman happens to be working on at the time. Unfortunately the current test is not reliable and this detection can trigger if a required toolchain tool is missing. In this case the toolchain problem is never reported. Adjust the logic to continue processing the build result, mark the build as done (and failed), but with a return code which indicates that it should be retried. The correct fix is to fully and correctly detect an aborted build, quit buildman immediately and not write any partial build results in this case. Unfortunately this is currently beyond my powers and is left as an exercise for the reader (and patches are welcome). Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Show 'make' command line when -V is usedSimon Glass2015-04-182-1/+7
| | | | | | | When a verbose build it selected, show the make command before the output of that command. Signed-off-by: Simon Glass <sjg@chromium.org>
* ARM: tegra: rename colibri_t20 board/configuration/device-treeMarcel Ziswiler2015-03-301-1/+1
| | | | | | | | | | | In accordance with our other modules supported by U-Boot and as agreed upon for Apalis/Colibri T30 get rid of the carrier board in the board/ configuration/device-tree naming. While at it also bring the prompt more in line with our other products. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
* buildman: Add a space before the list of boardsSimon Glass2015-03-052-2/+2
| | | | | | | | | | 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>