summaryrefslogtreecommitdiff
path: root/tools/buildman
Commit message (Collapse)AuthorAgeLines
* buildman: allow multiple toolchains in a single pathAlbert ARIBAUD2015-02-15-4/+5
| | | | | | | | | | | When buildman scans a toolchain path, it stops at the first toolchain found. However, a single path can contains several toolchains, each with its own prefix. This patch lets buildman scan all toolchains in the path. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to write the full build outputSimon Glass2015-01-14-3/+9
| | | | | | | | 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 the option to download toolchains from kernel.orgSimon Glass2015-01-14-13/+303
| | | | | | | | | | | | | The site at https://www.kernel.org/pub/tools/crosstool/ is a convenient repository of toolchains which can be used for U-Boot. Add a feature to download and install a toolchain for a selected architecture automatically. It isn't clear how long this site will stay in the current place and format, but we should be able to rely on bug reports if it changes. Suggested-by: Marek VaĊĦut <marex@denx.de> Suggested-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow architecture to alias to multiple toolchainsSimon Glass2015-01-14-5/+23
| | | | | | | Some archs have need than one alias, so support a list of alises in the ..buildman file. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't use the local settings when running testsSimon Glass2015-01-14-1/+14
| | | | | | | We should create a test setting file when running testes, not use whatever happens to be on the local machine. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't complain about missing sections in ~/.buildmanSimon Glass2015-01-14-1/+0
| | | | | | Silently ignore this since it is valid to have missing sections. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add documentation about the .buildman fileSimon Glass2015-01-14-20/+53
| | | | | | | This file is only partially documented. Add some more details. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
* buildman: Add a note about Python pre-requisitesSimon Glass2015-01-14-1/+10
| | | | | | | | Since we need a few modules which might not be available in a bare-bones distribution, add a note about that to the README. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
* buildman: Add an option to use the full tool chain pathSimon Glass2015-01-14-10/+25
| | | | | | | | | | | | | | 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: Put the toolchain path first instead of last in PATHSimon Glass2015-01-14-1/+1
| | | | | | | | | | | | | | | | If: 1. Toolchains A and B have the same filename 2. Toolchain A is in the PATH 3. Toolchain B is given in ~/.buildman and buildman uses it to build then buildman will add toolchain B to the end of its path but will not necessarily use it since U-Boot will find toolchain A first in the PATH. Try to fix this by putting the toolchain first in the path instead of last. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Try to avoid hard-coded string parsingSimon Glass2015-01-14-1/+8
| | | | | | | The assumption that the compiler name will always end in gcc is incorrect for clang and apparently on BSD. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow specifying a range of commits to buildSimon Glass2015-01-14-4/+26
| | | | | | | | Adjust the -b flag to permit a range expression as well as a branch. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* buildman: Don't remove entire output directory when testingSimon Glass2015-01-14-1/+2
| | | | | | | | When running tests the output directory is often wiped. This is only safe if a branch is being built. The output directory may contain other things besides the buildman test output. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to flatten output directory treesSimon Glass2015-01-14-6/+24
| | | | | | | | | | 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: Try to guess the upstream commitSimon Glass2015-01-14-7/+8
| | | | | | | | | | | | | | | Buildman normally obtains the upstream commit by asking git. Provided that the branch was created with 'git checkout -b <branch> <some_upstream>' then this normally works. When there is no upstream, we can try to guess one, by looking up through the commits until we find a branch. Add a function to try this and print a warning if buildman ends up relying on it. Also update the documentation to match. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
* 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: Put build in 'current', not 'current/current'Simon Glass2015-01-14-4/+3
| | | | | | | | Buildman currently puts current-source builds in a current/current subdirectory, but there is no need for the extra depth. Suggested-by: Albert Aribaud <albert.u.boot@aribaud.net> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add tests that check the correct output directory is usedSimon Glass2015-01-14-0/+31
| | | | | | Add a few tests of the output directory logic. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'buildman' of git://git.denx.de/u-boot-x86Tom Rini2015-01-14-0/+2
|\ | | | | | | | | | | | | Conflicts: tools/buildman/control.py Signed-off-by: Tom Rini <trini@ti.com>
| * patman: Use the full commit hash for 'git checkout'Simon Glass2014-11-03-1/+1
| | | | | | | | | | | | | | Even with the initial 8 characeters of the hash we will sometimes get a collision. Use the full hash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Don't default to -e when using -sSimon Glass2014-11-03-1/+2
| | | | | | | | | | | | | | | | | | | | | | When using summary mode (-s) we don't always want to display errors. Allow this option to be omitted. Series-to: u-boot Series-cc: albert Change-Id: I6b37754d55eb920ecae114fceba55834b43ea3b9 Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
| * buildman: Fix repeating board list with -lSimon Glass2014-11-03-1/+2
| | | | | | | | | | | | | | | | Ensure that we don't print duplicate board names when -l is used. Change-Id: I56adb138fc18f772ba61eba0fa194cdd7bc7efc6 Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
* | buildman: Fix some typos in READMEDirk Behme2014-12-29-7/+7
| | | | | | | | | | Signed-off-by: Dirk Behme <dirk.behme@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | buildman: Don't default to -e when building current sourceSimon Glass2014-11-26-14/+12
| | | | | | | | | | | | | | | | | | We probably don't need to enable this option by default. It is useful to display only failure boards (not errors) and it is easy to add -e if it is required. Also update the docs. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
* | 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>
* | patman: Use the full commit hash for 'git checkout'Simon Glass2014-11-26-1/+1
| | | | | | | | | | | | | | Even with the initial 8 characeters of the hash we will sometimes get a collision. Use the full hash. Signed-off-by: Simon Glass <sjg@chromium.org>
* | buildman: Save *.img files tooTom Rini2014-11-26-1/+1
|/ | | | | | | | When saving binary files we likely want to keep any .img files that have been generated as well. Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Fix the logic for the bloat commandSimon Glass2014-09-21-3/+3
| | | | | | | This check should now be done whatever mode buildman is running in, since we may be displaying information while building. Signed-off-by: Simon Glass <sjg@chromium.org>
* kconfiglib: change SPDX-License-Identifier to ISCMasahiro Yamada2014-09-17-1/+1
| | | | | | | | | Commit f219e01311b2 (tools: Import Kconfiglib) added SPDX GPL-2.0+ to this library by mistake. It should be ISC. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Ulf Magnusson <ulfalizer@gmail.com>
* tools: Import KconfiglibMasahiro Yamada2014-09-16-0/+3799
| | | | | | | | | | | | | | | Kconfiglib is the flexible Python Kconfig parser and library created by Ulf Magnusson. (https://github.com/ulfalizer/Kconfiglib) This commit imports kconfiglib.py from commit ce84c22e58fa59cb93679d4ead03c3cd1387965e, with ISC SPDX-License-Identifier. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Cc: Ulf Magnusson <ulfalizer@gmail.com> Cc: Wolfgang Denk <wd@denx.de>
* buildman: fix typos of --dry-run help messageMasahiro Yamada2014-09-09-1/+1
| | | | | | | | | | | | try run => dry run no nothing => do nothing "..." => '...' The last one is for consistency with the other option helps. Change-Id: I1d69047d1fae6ef095a18f69f44ee13c448db9b7 Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* buildman: Create parent directories as necessaryThierry Reding2014-09-09-3/+6
| | | | | | | | | 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: Ignore conflicting tagsSimon Glass2014-09-09-8/+10
| | | | | | | | | | | Tags like Series-version are normally expected to appear once, and with a unique value. But buildman doesn't actually look at these tags. So ignore conflicts. This allows bulidman to build a branch containing multiple patman series. Reported-by: Steve Rae <srae@broadcom.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Permit branch names with an embedded '/'Simon Glass2014-09-09-5/+14
| | | | | | | | | | At present buildman naively uses the branch name as part of its directory path, which causes problems if the name has an embedded '/'. Replace these with '_' to fix the problem. Reported-by: Steve Rae <srae@broadcom.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Expand output test to cover directory prefixesSimon Glass2014-09-09-8/+46
| | | | | | | | Now that buildman supports removing the build directory prefix from output, add a test for it. Also ensure that output directories are removed when the test completes. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add additional functional testsSimon Glass2014-09-09-18/+306
| | | | | | | This adds coverage of core features of the builder, including the command-line options which affect building. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Provide an internal option to clean the outpur dirSimon Glass2014-09-09-1/+10
| | | | | | | | | | For testing it is useful to clean the output directory before running a test. This avoids a test interfering with the results of a subsequent test by leaving data around. Add this feature as an optional parameter to the control logic. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Correct counting of build failures on retrySimon Glass2014-09-09-7/+8
| | | | | | | | | | | | When a build is to be performed, buildman checks to see if it has already been done. In most cases it will not bother trying again. However, it was not reading the return code from the 'done' file, so if the result was a failure, it would not be counted. This depresses the 'failure' count stats that buildman prints in this case. Fix this bug by always reading the return code. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow tests to have their own boardsSimon Glass2014-09-09-10/+31
| | | | | | | Rather than reading boards.cfg, which may take time to generate and is not necessarily suitable for running tests, create our own list of boards. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Avoid looking at config file or toolchains in testsSimon Glass2014-09-09-5/+29
| | | | | | | | These files may not exist in the environment, or may not be suitable for testing. Provide our own config file and our own toolchains when running tests. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Set up bsettings outside the control moduleSimon Glass2014-09-09-1/+2
| | | | | | | Move the bsettings code back to the main buildman.py file, so we can do something different when testing. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add a functional testSimon Glass2014-09-09-18/+206
| | | | | | | | | | | | | Buildman currently lacks testing in many areas, including its use of git, make and many command-line flags. Add a functional test which covers some of these areas. So far it does a fake 'build' of all boards for the current source tree. This version reads the real ~/.buildman and boards.cfg files. Future work will improve this. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Move full help code into the control moduleSimon Glass2014-09-09-6/+8
| | | | | | | There is no good reason to keep this code separate. Move it into control.py so it is easier to test. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Move the command line code into its own fileSimon Glass2014-09-09-71/+87
| | | | | | | | We want to be able to issue parser commands from within buildman for test purposes. Move the parser code into its own file so we don't end up needing the buildman and test modules to reference each other. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Enhance basic test to check summary outputSimon Glass2014-09-09-5/+96
| | | | | | | | Adjust the basic test so that it checks all console output. This will help to ensure that the builder is behaving correctly with printing summary information. Signed-off-by: Simon Glass <sjg@chromium.org>
* 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/+91
| | | | | | | | | | | 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-13/+50
| | | | | | | | | | | | | | | | | 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: Remove the directory prefix from each error lineSimon Glass2014-09-05-1/+3
| | | | | | | | | | | | | | | | | | | | The full path is long and also includes buildman private directories. Clean this up, so that only a relative U-Boot path is shown. This will change warnings like these: /home/sjg/c/src/third_party/u-boot/buildman5/.bm-work/00/arch/sandbox/cpu/cpu.c: In function 'timer_get_us': /home/sjg/c/src/third_party/u-boot/buildman5/.bm-work/00/arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] /home/sjg/c/src/third_party/u-boot/files/arch/sandbox/cpu/cpu.c: In function 'timer_get_us': /home/sjg/c/src/third_party/u-boot/files/arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] to: arch/sandbox/cpu/cpu.c: In function 'timer_get_us': arch/sandbox/cpu/cpu.c:40:9: warning: unused variable 'i' [-Wunused-variable] Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Implement an option to exclude boards from the buildSimon Glass2014-09-05-8/+41
| | | | | | | | | | | | Some boards are known to be broken and it is convenient to be able to exclude them from the build. Add an --exclude option to specific boards to exclude. This uses the same matching rules as the normal 'include' arguments, and is a comma- separated list of regular expressions. Suggested-by: York Sun <yorksun@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org>