summaryrefslogtreecommitdiffstats
path: root/tools/buildman
Commit message (Collapse)AuthorAgeFilesLines
* buildman: Fix tabs in GetWrapper()Simon Glass2019-01-141-2/+2
| | | | | | This function has tabs instead of spaces. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add support for building with clangSimon Glass2019-01-145-5/+48
| | | | | | Add a -O option which allows building with clang. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Deal nicely with invalid build-status fileSimon Glass2019-01-141-1/+6
| | | | | | | | | | | The 'done' files created by buildman may end up being empty if buildman runs out of disk space while writing them. This error is then persistent, since even if disk space is reclaimed and the build retries, the empty file causes an exception in the builder thread. Deal with this silently by doing a rebuild. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Drop comment about Ctrl-C problemSimon Glass2019-01-141-2/+0
| | | | | | This bug is now fixed, so drop this comment. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman/toolchain.py: handle inconsistent tarball namesTrevor Woerner2018-12-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, for some releases the kernel.org toolchain tarball names adhere to the following pattern: <hostarch>-gcc-<ver>-nolib-<targetarch>-<type>.tar.xz e.g.: x86_64-gcc-8.1.0-nolibc-aarch64-linux.tar.xz while others use the following pattern: <hostarch>-gcc-<ver>-nolib_<targetarch>-<type>.tar.xz e.g.: x86_64-gcc-7.3.0-nolibc_aarch64-linux.tar.xz Notice that the first pattern has dashes throughout, while the second has dashes throughout except just before the target architecture which has an underscore. The "dash throughout" versions from kernel.org are: 8.1.0, 6.4.0, 5.5.0, 4.9.4, 4.8.5, 4.6.1 while the "dash and underscore" versions from kernel.org are: 7.3.0, 4.9.0, 4.8.0, 4.7.3, 4.6.3, 4.6.2, 4.5.1, 4.2.4 This tweak allows the code to handle both versions. Note that this tweak also causes the architecture parsing to get confused and find the following two bogus architectures, "2.0" and "64", which are explicitly checked for, and removed. Signed-off-by: Trevor Woerner <trevor@toganlabs.com> Reviewed-by: Simon Glass <sjg@chromium.org> Change single quotes to double quotes: Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman/toolchain.py: fix toolchain directoryTrevor Woerner2018-12-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The hexagon toolchain (4.6.1) from kernel.org, for example, was packaged in a way that is different from most toolchains. The first entry when unpacking most toolchain tarballs is: gcc-<version>-nolib/<targetarch>-<system> e.g.: gcc-8.1.0-nolibc/aarch64-linux/ The first entry of the hexagon toolchain, however, is: gcc-4.6.1-nolibc/ This causes the buildman logic in toolchain.py::ScanPath() to not be able to find the "*gcc" executable since it looks in gcc-4.6.1-nolib/{.|bin|usr/bin} instead of gcc-4.6.1/hexagon-linux/{.|bin|usr/bin}. Therefore when buildman tries to download a set of toolchains that includes hexagon, the script fails. This update takes the second line of the tarball unpacking (which works for all the toolchains I've tested from kernel.org) and parses it to take the first two elements, separated by '/'. It makes this logic a bit more robust. Signed-off-by: Trevor Woerner <trevor@toganlabs.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* buildman: Show boards with warning with w+Simon Glass2018-11-202-19/+54
| | | | | | | | At present we should boards with warnings in the same way as those with errors. This is not ideal. Add a new 'warn' state and show these listed in yellow to match the actual warning lines printing with -e. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Rename the good, better, worse variablesSimon Glass2018-11-201-14/+14
| | | | | | | | | | At present we don't distinguish between errors and warnings when printing the architecture summary. Rename the variables to better describe their purpose. 'Worse' at present means we got an error, so use that as the name. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Detect dtc warningsSimon Glass2018-11-202-3/+6
| | | | | | | | | | | | | At present messages from the device-tree compiler like this: arch/arm/dts/socfpga_arria10_socdk_sdmmc.dtb: Warning (avoid_unnecessary_addr_size): /clocks: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property are detected as errors since they don't match the gcc warning regex. Add a new one for dtc to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Only print toolchain probing with -vSimon Glass2018-11-202-2/+2
| | | | | | | | | At present --list-tool-chains prints a lot of information about the toolchain-probing process. This is generally not very interesting. Update buildman to print this only if --list-tool-chains is given with -v. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add a --boards option to specify particular boards to buildSimon Glass2018-11-145-23/+72
| | | | | | | | | | | At present 'buildman sandbox' will build all 5 boards for the sandbox architecture rather than the single board 'sandbox'. The only current way to exclude sandbox_spl, sandbox_noblk, etc. is to use -x which is a bit clumbsy. Add a --boards option to allow individual build targets to be specified. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: dtoc: Suppress unwanted output from testSimon Glass2018-10-081-1/+3
| | | | | | | There are a few test cases which print output. Suppress this so that tests can run silently in the normal case. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Make the toolchain test more forgivingSimon Glass2018-10-081-2/+4
| | | | | | | | The filenames of the toolchains on kernel.org changes every now and then. Fix it for the current change, and make the test use a regex so that it has a better chance of passing with future changes too. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Avoid hanging when the config changesSimon Glass2018-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Something has changed in the last several month such that when buildman builds U-Boot incrementally and a new CONFIG option has been added to the Kconfig, the build hanges waiting for input: Test new config (NEW_CONFIG) [N/y/?] (NEW) Since binamn does not connect the build's stdin to anything this waits on stdin to the build thread, which never comes. Eventually I suspect all the threads end up in this state and the build does not progress. Fix this by passing /dev/null as input to the build. That way, if there is a new CONFIG, the build will stop (and fail): Test new config (NEW_CONFIG) [N/y/?] (NEW) Error in reading or end of file. Signed-off-by: Simon Glass <sjg@chromium.org>
* Remove CONFIG_USE_STDINTMasahiro Yamada2018-09-101-1/+1
| | | | | | | | | | You do not need to use the typedefs provided by compiler. Our compilers are either IPL32 or LP64. Hence, U-Boot can/should always use int-ll64.h typedefs like Linux kernel, whatever the typedefs the compiler internally uses. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* buildman: Add support for environment delta in summaryAlex Kiernan2018-06-074-16/+145
| | | | | | | | When summarising the builds, add the -U option to emit delta lines for the default environment built into U-Boot at each commit. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* buildman: Extract environment as part of each buildAlex Kiernan2018-06-072-0/+15
| | | | | | | | As we're building the boards, extract the default U-Boot environment to uboot.env so we can interrogate it later. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* buildman: support newer gcc versions from kernel.orgDaniel Schwierzeck2018-05-221-3/+3
| | | | | | | | | | | | | Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4. Also use a regex for matching the tarball names. Some gcc versions use '-ARCH-' instead of '_ARCH-'. As part of this, we switch TravisCI to also using these toolchains for all platforms. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* tools: buildman: Don't use the working dir as build dirLothar Waßmann2018-05-163-3/+38
| | | | | | | | | | | | | | | | | | | When the U-Boot base directory happens to have the same name as the branch that buildman is directed to use via the '-b' option and no output directory is specified with '-o', buildman happily starts removing the whole U-Boot sources eventually only stopped with the error message: OSError: [Errno 20] Not a directory: '../<branch-name>/boards.cfg Add a check to avoid this and also deal with the case where '-o' points to the source directory, or any subdirectory of it. Finally, tidy up the confusing logic for removing the old tree when using -b. This is only done when building a branch. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-0712-30/+12
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* buildman: add option -E for treating compiler warnings as errorsDaniel Schwierzeck2018-02-044-2/+10
| | | | | | | Add a new option '-E' for treating all compiler warnings as errors. Eventually this will pass 'KCFLAGS=-Werror' to Kbuild. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* host-tools: use python2 explicitly for shebangMasahiro Yamada2018-01-281-1/+1
| | | | | | | | | | | All of these host tools are apparently written for Python2, not Python3. Use 'python2' in the shebang line according to PEP 394 (https://www.python.org/dev/peps/pep-0394/). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* tools: Update python "help" tests to cope with "more" odditiesTom Rini2018-01-161-1/+4
| | | | | | | | | | | | | | | | In some cases when "more" is told to page a given file it will prepend the output with: :::::::::::::: /PATH/TO/THE/FILE :::::::::::::: And when this happens the output will not match the expected length. Further, if we use a different pager we will instead fail the coverage tests as we will not have 100% coverage. Update the help test to remove the string in question. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* buildman: Fix up testsSimon Glass2017-11-221-10/+21
| | | | | | | | | | | The tests were broken by two separate commits which adjusted the output when boards are listed. Fix this by adding back a PowerPC board and putting the name of each board in the test. Fixes: b9f7d881 (powerpc, 5xx: remove some "5xx" remains) Fixes: 8d7523c5 (buildman: Allow showing the list of boards with -n) Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow skipping of tests which use the networkSimon Glass2017-11-223-4/+11
| | | | | | | Accessing the network slows down the test and limits the environment in which it can be run. Add an option to disable network tests. Signed-off-by: Simon Glass <sjg@chromium.org>
* kconfiglib: update with 'imply' supportUlf Magnusson2017-09-291-140/+193
| | | | | | | | | | | | | | | | | | | | | | | Corresponds to 375506d (File writing nit) from upstream (https://github.com/ulfalizer/Kconfiglib). Adds proper 'imply' support and fixes a few minor issues, one of which previously triggered the following weird warning: configs/taurus_defconfig: /tmp/tmpisI45S:6: warning: assignment to SPL_LDSCRIPT changes mode of containing choice from "arch/$(ARCH)/cpu/u-boot-spl.lds" to "y" The change in 8639f69 (genconfig.py: Print defconfig next to warnings) was reapplied. tools/moveconfig.py previously depended on a hack that merged 'select's with 'imply's. It was modified to look at the union of Symbol.get_selected_symbols() and Symbol.get_implied_symbols(), which should give the same behavior. tools/genboardscfg.py was verified to produce identical board.cfg's before and after the change. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
* genconfig.py: Print defconfig next to warningsSimon Glass2017-09-111-6/+16
| | | | | | | | | | | | At present we sometimes see warnings of the form: /tmp/tmpMA89kB:36: warning: overriding the value of CMD_SPL. Old value: "y", new value: "y". This is not very useful as it does not show whch defconfig file it relates to. Update the tool to show this. Signed-off-by: Simon Glass <sjg@chromium.org>
* avr32: Retire AVR32 for goodAndy Shevchenko2017-07-061-9/+2
| | | | | | | | | | | | | | AVR32 is gone. It's already more than two years for no support in Buildroot, even longer there is no support in GCC (last version is heavily patched 4.2.4). Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully). There is no good point to keep this support in U-Boot either. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* powerpc, 5xx: remove some "5xx" remainsHeiko Schocher2017-06-162-2/+0
| | | | | | we removed 5xx support. So delete some forgotten remains. Signed-off-by: Heiko Schocher <hs@denx.de>
* buildman: properly translate strings for log and err files to ASCIIDaniel Schwierzeck2017-06-091-2/+4
| | | | | | | | | | | The build output can still produce unicode encoded output. But in the buildman's log and err files we only want plain ASCII characters. To handle all situations with unicode and non-unicode output, encode the stdout and stderr strings to UTF-8 and afterwards to ASCII with replacing all special characters. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* buildman: disable localized and unicode output of all build toolsDaniel Schwierzeck2017-06-091-1/+5
| | | | | | | | | | Build tools like Make, gcc or binutils support localized output or unicode encoded output dependent on the default system locale. This is not useful for buildman, where we want reproducible warning or error messages or where the output of binutils is further processed. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* buildman: Fix bloat option when 'new' only drops functionsTom Rini2017-06-081-1/+1
| | | | | | | | | | In the case where a new build only decreases sizes and does not increase any size we still want to report what functions have been dropped when doing a bloat comparison. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* buildman: Allow 'gnueabihf' toolchains for ARMTom Rini2017-04-181-2/+3
| | | | | | | | | | Many toolchains for ARM use the 'gnueabihf' suffix rather than just 'gnueabi', so allow these to be used, but with a lower priority than 'gnueabi' ones. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* buildman: Translate more strings to latin-1Tom Rini2017-04-141-2/+2
| | | | | | | | | | When writing out some of our results we may now have UTF-8 characters in there as well. Translate these to latin-1 and ignore any errors (as this is for diagnostic and given the githash anything else can be reconstructed by the user. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* buildman: Handle commit subjects containing unicodeSimon Glass2017-04-131-2/+3
| | | | | | | | | | One of these has crept in in this commit: 40a808f1 ARCv2: SLC: Make sure busy bit is set properly on SLC flushing Adjust buildman to handle it. Signed-off-by: Simon Glass <sjg@chromium.org>
* kconfiglib.py: Kludge in 'imply' supportTom Rini2017-03-091-5/+6
| | | | | | | | | Currently upstream does not yet understand the imply keyword. For what we use kconfiglib.py for today, this is OK. We only need to be able to evaluate in order to make boards.cfg and none of those choices will depend on how imply evaluates out. Signed-off-by: Tom Rini <trini@konsulko.com>
* buildman: Allow showing the list of boards with -nSimon Glass2017-02-083-14/+17
| | | | | | | As well as showing the number of boards, allow showing the actual list of boards that would be built, if -v is provided. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Update link to the most recent prebuilt ARC toolachinAlexey Brodkin2017-01-281-1/+1
| | | | | | | | | | To troubleshoot unexpected bhavior during building and what's more important during execution it is strongly recommended to use recent ARC toolchain, and so we're now referring to arc-2016.09 which is the latest as of today. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* 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>