aboutsummaryrefslogtreecommitdiff
path: root/tools/buildman
AgeCommit message (Collapse)Author
2024-07-26buildman: Show board list with -xSimon Glass
When -x is used, buildman does not show the list of boards that will be built, since there are no terms which cause boards to be added, only terms which cause them to be removed. Add a special case to fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com>
2024-07-08Revert "buildman: Always use the full path in CROSS_COMPILE"Tom Rini
There are operations in buildman that result in running the cross-tools (such as performing size checks) and now that we have not modified PATH to know where our tools are, these operations fail. This reverts commit 6c0a3cf75f72370deec3ee516a9dd377397af207. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-07-03buildman: Always use the full path in CROSS_COMPILESimon Glass
The feature to set the toolchain path does not seem to be needed. It causes problems with venv (see [1]). Let's remove it. Add some tests while we are here. It does not look like any docs changes are needed for this. [1] https://patchwork.ozlabs.org/project/uboot/patch/20240621131423.2363294-6-sjg@chromium.org/ Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2024-07-03buildman: Fix a few typos in toolchain codeSimon Glass
Fix 'Thie' and capitalise 'unicode'. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-07-03buildman: Add python3-pycryptodomeSimon Glass
This is used by some Binman entry types, so add it to allow more tests to pass. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-07-03buildman: Add python3-coverageSimon Glass
Add this package so we can run code-coverage tests for Binman. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-07-03buildman: Add a way to limit the number of buildmansSimon Glass
Buildman uses all available CPUs by default, so running more than one or two concurrent processes is not normally useful. However in some CI cases we want to be able to run several jobs at once to save time. For example, in a lab situation we may want to run a test on 20 boards at a time, since only the build step actually takes much CPU. Add an option which allows such a limit. When buildman starts up, it waits until the number of running processes goes below the limit, then claims a spot in the list. The list is maintained with a temporary file. Note that the temp file is user-specific, since it is hard to create a locked temporary file which can be accessed by any user. In most cases, only one user is running jobs on a machine, so this should not matter. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03buildman: Add a flag to force mrproper on failureSimon Glass
When a file is removed by a commit (e.g. include/common.h yay!) it can cause incremental build failures since one of the dependency files from a previous build may mention the file. Add an option to run 'make mrproper' automatically when a build fails. This can be used to automatically resolve the problem, without always adding the large overhead of 'make mrproper' to every build. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03buildman: Avoid rebuilding when --mrproper is usedSimon Glass
When this flag is enabled, 'make mrproper' is always used when reconfiguring, so there is no point in doing it again. Update this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03buildman: Make mrproper an argument to run_commit()Simon Glass
Pass this in so the caller can change it independently of the member variable. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03buildman: Make mrproper an argument to _config_and_build()Simon Glass
Pass this in so the caller can change it independently of the member variable. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03buildman: Make mrproper an argument to _reconfigure()Simon Glass
Pass this in so the caller can change it independently of the member variable. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03tools: binman: fix deprecated Python ConfigParser methodsBrandon Maier
The method `ConfigParser.readfp()` is marked deprecated[1]. In Python 3.12 this method have been removed, so replace it with `ConfigParser.read_file()`. [1] https://docs.python.org/3.11/library/configparser.html#configparser.ConfigParser.readfp Signed-off-by: Brandon Maier <brandon.maier@collins.com> CC: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-03tools: binman: fix deprecated Python unittest methodsBrandon Maier
The methods `unittest.assertEquals()` and `unittest.assertRegexpMatches()` are marked deprecated[1]. In Python 3.12 these aliases have been removed, so do a sed to replace them with their new names. [1] https://docs.python.org/3.11/library/unittest.html#deprecated-aliases Signed-off-by: Brandon Maier <brandon.maier@collins.com> CC: Simon Glass <sjg@chromium.org> CC: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-05-03tools: typo arguemntsHeinrich Schuchardt
%s/arguemnts/arguemnts/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-29tools: buildman: fix non-existing SafeConfigParser in Python 3.12+Quentin Schulz
SafeConfigParser was renamed back in Python 3.2 (yes, no typo) to ConfigParser[1], but it was still working as an alias until it got removed in 3.12[2]. [1] https://docs.python.org/3.8/whatsnew/3.2.html#configparser [2] https://github.com/python/cpython/pull/92503 Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-18tools: binman: ti_board_cfg: Check for linting problemsNeha Malcom Francis
Use yamllint for checking whether YAML configuration files are adhering to default yamllint rules. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Suggested-by: Nishanth Menon <nm@ti.com>
2023-12-31buildman: type cotainingHeinrich Schuchardt
%s/cotaining/containing/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13tools: Move python tools to version 0.0.6Simon Glass
A new release has been done with this version, so update it. Use the version numbers in dependencies also. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13doc: Update documentation URLSimon Glass
Update to use the new docs.u-boot.org URL for documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-07buildman: Use oldconfig when adjusting the configSimon Glass
We cannot be sure that the new config is consistent, particularly when changing a major item like CONFIG_CMDLINE. Use 'make oldconfig' to check that and avoid any such problems. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-02buildman: Include symbols in the read-only data sectionSimon Glass
When symbols switch between the inited data section and the read-only data section their visbility changes, at present, with the -B option. This is confusing, since adding 'const' to a variable declaration can make it look like a significant improvement in bloat. But in fact nothing has changed. Add 'r' to the list of symbols types that are recorded, to correct this problem. Add a constant to make it easier to find this code next time. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-10-02Merge branch 'next'Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-09-23buildman: Start the clock when the build startsSimon Glass
The Kconfig and maintainer processing can take a while, sometimes 5 seconds or more. This skews the timing printed by buildmand when the build completes. Start the clock when the threads start to avoid this problem. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com>
2023-09-23buildman: Show progress when regenerating the board.cfg fileSimon Glass
This can take a while, so show a message when starting. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by Tom Rini <trini@konsulko.com>
2023-09-23buildman: Keep all common output filesSimon Glass
Make a list of common output extensions and use it to ensure that the -k option preserves all of these. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-23buildman: Fix full help for Python 3.8Simon Glass
With Python versions older than 3.9 Buildman produces an error on start-up. Fix this with a workaround for importlib. There is already a workaround for v3.6 but I am not sure if that is still functioning. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-26CI: Update to gcc-13.2.0Tom Rini
The latest kernel.org toolchains for gcc are now 13.2.0, so upgrade to that. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-05buildman: Drop warning about orphaned defconfigsSimon Glass
Some boards use a MAINTAINERS entry to specify common files without referencing any defconfigs. This is allowed and should not result in a warning. Drop the warning in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-05buildman: Exit after reading toolchainSimon Glass
Recent refactoring changed buildman to continue operation after fetching a toolchain. Fix this. Fixes: b8680646521 ("bulidman: Move toolchain handling to a function") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-25buildman: Specify the output directory in testsSimon Glass
The default output directory is generally '../' in tests so we end up trying to create '../.bm-work'. This does not work with azure, so update these tests to use the temporary directory instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Enable test coverageSimon Glass
Enable measuring test coverage for buildman so we can see the gaps. It is currently at 68%. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add an option to check maintainers and targetsSimon Glass
In poking around it seems that many boards don't define a CONFIG_TARGET Kconfig variable. This is not strictly necessary, but add an option to buildman so these can be viewed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Use -D for --debugSimon Glass
Change -D to mean --debug for consistency with other tools. This is not a commonly used option, so the impact should be minimal. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add a way to print the architecture for a boardSimon Glass
This is useful for some tools and is easily available for buildman. Add a new --print-arch option. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move copy_files() out ot BuilderThread classSimon Glass
This does not need to be in the class. Move it out to avoid a pylint warning. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Tidy up some comments in builderthreadSimon Glass
Make sure all functions have full argument documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Tidy up reporting of a toolchain errorSimon Glass
Provide the text of the exception when something goes wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Avoid passing result into _read_done_file()Simon Glass
Move the creating of the result object into the function which sets it up, to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Create a function to handle config and buildSimon Glass
Move this code into a _config_and_build() function, so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move checkout code to a separate functionSimon Glass
Put this in its own function to reduce the size of the run_commit() function Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move code to decide output dirsSimon Glass
Put this in its own function to reduce the size of the run_commit() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move code to remove old outputsSimon Glass
Put this in its own function to reduce the size of the run_commit() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move reading of the done file into a functionSimon Glass
Move this logic into its own function to reduce the size of the run_commt() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move bulid code into its own functionSimon Glass
Split this into its own function so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move reconfigure code into its own functionSimon Glass
Split this into its own function so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert config_out to string IOSimon Glass
This is probably a little more efficient and it allows passing the object to another function to write data. Convert config_out to use a string I/O device. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move more things into _build_args()Simon Glass
Move more of the argument-building code into this function. Fix a missing assignment for out_rel_dir too. Rename the function since it now builds all the arguments. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move setting of toolchain arguments to _build_args()Simon Glass
Move a few more pieces to this new function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Start a function to set up the make argumentsSimon Glass
Move some of this code into a new funciion, to help reduce the size of the run_commits() function. Signed-off-by: Simon Glass <sjg@chromium.org>