summaryrefslogtreecommitdiff
path: root/tools/buildman
AgeCommit message (Collapse)Author
2026-03-27doc/buildman: fix missing :: on examplesDavid Lechner
Fix 4 instances in buildman.rst where examples were missing :: for proper formatting. Three cases just had a single : and in one case, : didn't make grammatical sense, so it gets a stand-alone :: along with fixing the indent. Signed-off-by: David Lechner <[email protected]>
2026-01-19test/py, buildman: Update filelock package versionTom Rini
The GitHub dependabot tool has reported a "medium" priority bug CVE-2026-22701, with this package. Update to the patched version. Reported-by: GitHub dependabot Signed-off-by: Tom Rini <[email protected]>
2025-12-18test/py, buildman: Update filelock package versionTom Rini
The GitHub dependabot tool has reported a "medium" priority bug CVE-2025-68146, with this package. Update to the patched version. Reported-by: GitHub dependabot Signed-off-by: Tom Rini <[email protected]>
2025-12-10tools: use setuptools 78.1.1Heinrich Schuchardt
CVE-2025-47273 describes a path traversal vulnerability. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-08-30doc: Capitalize the word Buildman whenever it's used as a proper nounAdriano Carvalho
This consistency reads a bit nicer. Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Rephrase to be more precise and less confusing (build)Adriano Carvalho
It was "... doing the same build ... will not trigger a rebuild". Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Rephrase to read a bit nicerAdriano Carvalho
Reads better. Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Rephrase to be more clearAdriano Carvalho
It might not be clear what is meant with "to make sure the shell leaves it alone". Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Rephrase in a simpler wayAdriano Carvalho
It reads a bit nicer. Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Add riscv and unfold the list with the architecture/code nameAdriano Carvalho
riscv was missing from the list. To some, the architecture's name may not be obvious from the code name. Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Use "supports" instead of "has"Adriano Carvalho
Strictly speaking, "has" doesn't make sense. "supports" seems like a better word and it probably was what the original author meant. Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Quote all long form options using double backticks/grave accentsAdriano Carvalho
Otherwise, the two dashes are rendered as just one. Signed-off-by: Adriano Carvalho <[email protected]>
2025-08-30doc: Fix obvious typos and minor improvementsAdriano Carvalho
These are fixes to what looks like obvious typos. Some minor improvments are also included, such as: - Write "symbolic link" instead of symlink - Correct capitalization for LLVM (all caps) - Remove dead link and surrounding sentence Signed-off-by: Adriano Carvalho <[email protected]>
2025-07-08Merge patch series "kbuild: Update Makefile.extrawarn to 5.1"Tom Rini
This series from Ilias Apalodimas <[email protected]> largely finishes the re-sync with the Linux Kernel v5.1 kbuild system. Link: https://lore.kernel.org/r/[email protected]
2025-07-08kbuild: Bump the build system to 5.1Ilias Apalodimas
Our last sync with the kernel was 5.1. Even that was a partial one as some patches from 4.x kernels were already missing making the transition to a modern kbuild infeasible. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefile[.lib/.kbuild]. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call. One of the biggest changes is get rid of partial linking entirely and build .a archives isntead of .o. We diaviate from the kernel on that. Instead of calling a custom script to create the archive symbol table, we call ar with rcTP (isntead of rcSTP) since we want a resulting archive that's sauble with the linker. The only affected platforms are PPC ones. Unfortunately I don't have any of them around to test, but the objdump of the resulting files -- arch/powerpc/lib/built-in.[oa] looks identical. Signed-off-by: Ilias Apalodimas <[email protected]>
2025-07-01buildman: Support an in-tree build in the current dirSimon Glass
Allow -w to be used with -i to do a build without a separate output directory. Signed-off-by: Simon Glass <[email protected]>
2025-07-01buildman: Correct behaviour of --in-treeSimon Glass
This option doesn't work as expected since it sets the cwd to the work directory, which does not necessarily hold the source code. It should be left unset, so that the current directory is the source directory. Signed-off-by: Simon Glass <[email protected]>
2025-05-27tools: Plumb in capture controlSimon Glass
Add control of capturing output into u_boot_pylib and the tools which use it. Signed-off-by: Simon Glass <[email protected]>
2025-05-27patman: Move capture_sys_output() into terminal and renameSimon Glass
This function is sometimes useful outside tests. Also it can affect how terminal output is done, e.g. whether ANSI characters should be emitted or not. Move it out of the test_util package and into terminal. Signed-off-by: Simon Glass <[email protected]>
2025-05-27buildman: Add a way to build a particular targetSimon Glass
At present buildman only supports building the default target. Generally this is what is wanted, but in some cases boards erroneously have a different target for product extra files. Add a --target option to help. Also add a comment indicating which letters are free for new options. Signed-off-by: Simon Glass <[email protected]>
2025-04-24python: Use and refer to the venv module rather than virtualenvTom Rini
Using some form of sandbox with Python modules is a long standing best practice with the language. There are a number of ways to have a Python sandbox be created. At this point in time, it seems the Python community is moving towards using the "venv" module provided with Python rather than a separate tool. To match that we make the following changes: - Refer to a "Python sandbox" rather than virtualenv in comments, etc. - Install the python3-venv module in our container and not virtualenv. - In our CI files, invoke "python -m venv" rather than "virtualenv". - In documentation, tell users to install python3-venv and not virtualenv. Signed-off-by: Tom Rini <[email protected]>
2025-04-15buildman: Update to grabbing gcc-14.2.0 toolchains by defaultTom Rini
With the switch to using GCC 14.2.0 in commit 001bac5f16ad ("Dockerfile: Update to gcc-14.2.0 and clang-18") in CI, we should make buildman match this. Signed-off-by: Tom Rini <[email protected]>
2025-04-11doc/buildman: typo 'require'Heinrich Schuchardt
%s/require/required/ Signed-off-by: Heinrich Schuchardt <[email protected]>
2025-04-01u_boot_pylib: Clean up pylint warnings in gitutil.pySimon Glass
This file has about 40 pylint warnings, but no errors. Quite a few of these warnings have been there for a while, but most are coming from newer versions of pylint, where people come up with new warnings. The f-string warning is the most common one: C0209: Formatting a regular string which could be an f-string That feature was not available when the code was written, but it is often more convenient than using % with a list of arguments. This patches reduces the number of warnings in this file, with 7 left remaining. Signed-off-by: Simon Glass <[email protected]>
2025-03-04Merge patch series "tools: Minor clean-ups for the command library"Tom Rini
Simon Glass <[email protected]> says: This series adds comments and fixes pylint warnings in the command library. It also introduces a new, simpler way of running a single command. Link: https://lore.kernel.org/r/[email protected]
2025-03-04u_boot_pylib: Add a function to run a single commandSimon Glass
Add a helper to avoid needing to use a list within a list for this simple case. Update existing users of runpipe() to use this where possible. Signed-off-by: Simon Glass <[email protected]>
2025-03-04u_boot_pylib: Correct case for test_resultSimon Glass
This should be in capitals and defined at the start of the file. Update it. Signed-off-by: Simon Glass <[email protected]>
2025-02-21buildman: Update tests for newer filelock moduleSimon Glass
Recent versions of this module call time.perf_counter() so add a patch for this also. Signed-off-by: Simon Glass <[email protected]> Reported-by: Tom Rini <[email protected]>
2025-02-21tools: Fix pylint 3.3.4 errorsSimon Glass
This newer pylint produces errors about variables possibly being used before being set. Adjust the code to pass these checks. Signed-off-by: Simon Glass <[email protected]> Reported-by: Tom Rini <[email protected]>
2025-02-17u_boot_pylib: Move gitutil into the librarySimon Glass
Move this file into U-Boot's Python library, so that it is no-longer part of patman. This makes a start on: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/35 Signed-off-by: Simon Glass <[email protected]>
2025-02-14python: Recreate test/py and tools/buildman requirements.txt filesTom Rini
Use the "pipreqs" tool to re-create these files, with a few manual corrections. We still need to include pytest-xdist which the tool does not detect. We also for now don't upgrade most of the required tools as that creates problems with various tests, which should be resolved independently. Signed-off-by: Tom Rini <[email protected]>
2025-01-25buildman: Record an error if a toolchain is missingSimon Glass
Buildman has always treated the lack of a toolchain as an infrastructure problem rather than a build failure. However the logic for this is not correct, since it does not write a 'done' file in this case. As a result, one of two things can happen. 1. If a previous build ran in the same (output) directory, the outcome of *that* build is recorded as the outcome of this one 2. Otherwise, no outcome is recorded Obviously this inconsistency is not ideal. While (2) is rare, it can be very confusing as the build sort-of fails but does not produce any summary output with 'buildman -s' Overall it seems better to attribute a toolchain issue to the boards that it affects. This results in clear failures which can be examined, no matter what happened in the .bm-work directory previously. So write a 'done' file for each build when a toolchain is missing. The end result of this patch is to make missing toolchains much more obvious. It should be things a bit easier for novice users. Signed-off-by: Simon Glass <[email protected]>
2025-01-25buildman: Drop unused OUTPUT_FILE constantSimon Glass
This is not actually used but its presence suggests that it is the filename for the board database. Drop it to avoid confusion. Signed-off-by: Simon Glass <[email protected]>
2024-11-19buildman: Support a tilde to represent the home directorySimon Glass
It is convenient to use ~ to represent the home directory in the settings file. Add support for this. Signed-off-by: Simon Glass <[email protected]>
2024-11-19buildman: Correct logic for adding a toolchainSimon Glass
If the toolchain is bad, it should not be added. Correct the logic for this. Signed-off-by: Simon Glass <[email protected]>
2024-11-19buildman: Document the toolchain-prefix sectionSimon Glass
This is mentioned in examples but should have its own mention in the 'settings' documentation. Add it. Signed-off-by: Simon Glass <[email protected]>
2024-11-19buildman: Correct the indentation in the setting-up sectionSimon Glass
The example settings file should be indented so that it shows correctly in the output. Fix it. Signed-off-by: Simon Glass <[email protected]>
2024-11-19buildman: Support #include files in defconfigsSimon Glass
This is used by some boards in U-Boot and is a convenient way to deal with common settings where using a Kconfig files is not desirable. Detect #include files and process them as if they were part of the original file. Signed-off-by: Simon Glass <[email protected]> Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/30
2024-11-19buildman: Set up the tout librarySimon Glass
Use this to control info and debugging messages. Enable them if -v is given. Signed-off-by: Simon Glass <[email protected]>
2024-11-19buildman: Add a lower-level test for KconfigScannerSimon Glass
This code is tested by test_scan_defconfigs() but it is useful to have some specific tests for the KconfigScanner's operation in U-Boot. Add a test which checks that the values are obtained correctly. Signed-off-by: Simon Glass <[email protected]>
2024-10-18buildman: Correct some warnings about regex stringsSimon Glass
With Python 3.12 some warnings have cropped up. Fix them. Signed-off-by: Simon Glass <[email protected]>
2024-09-26buildman: Allow skipping the dtc buildSimon Glass
For most boards, the device-tree compiler is built in-tree, ignoring the system version. Add a special option to skip this build. This can be useful when the system dtc is up-to-date, as it speeds up the build. Signed-off-by: Simon Glass <[email protected]>
2024-09-26buildman: Retry the build for current sourceSimon Glass
Buildman retries a failed build when processing a branch, but does not do this when building current source. It is useful to do this retry in both cases, so add the logic for it. Signed-off-by: Simon Glass <[email protected]>
2024-09-24buildman/toolchain.py: do not set CROSS_COMPILE for sandboxJerome Forissier
When building for sandbox, self.cross is empty. In MakeEnvironment(), CROSS_COMPILE is defined to be self.cross (with or without a full path), optionally prefixed by the toolchain wrapper defined in ~/.buildman. This is fine when self.cross is not empty, but it doesn't make sense when it is: - Either there is no wrapper and we end up with an empty CROSS_COMPILE which is the same as not defining it (the host compiler will be used), - Or there is a wrapper and CROSS_COMPILE will contain only the wrapper which obviously is not a valid compiler, hence an error. Test case: $ sudo apt install ccache $ grep -q toolchain-wrapper ~/.buildman || \ printf "[toolchain-wrapper]\nwrapper = ccache\n" >>~/.buildman $ make mrproper $ ./tools/buildman/buildman sandbox_noinst $ ./tools/buildman/buildman sandbox_noinst Building current source for 1 boards (1 thread, 24 jobs per thread) sandbox: + sandbox_noinst +arch/sandbox/lib/reloc_sandbox_efi.c:10:15: error: operator '==' has no left operand + 10 | #if HOST_ARCH == HOST_ARCH_X86_64 + | ^~ [...] The GetEnvArgs function is modified too, since the VAR_CROSS_COMPILE case has the same issue. In tools/buildman/test.py, testGetEnvArgs is extended and testMakeEnvironment is added. They check the 'arm' and 'sandbox' toolchains, with and without a wrapper. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-09-06buildman: Support building within a Python venvSimon Glass
The Python virtualenv tool sets up a few things in the environment, putting its path first in the PATH environment variable and setting up a sys.prefix different from the sys.base_prefix value. At present buildman puts the toolchain path first in PATH so that it can be found easily during the build. For sandbox this causes problems since /usr/bin/gcc (for example) results in '/usr/bin' being prepended to the PATH variable. As a result, the venv is partially disabled. The result is that sandbox builds within a venv ignore the venv, e.g. when looking for packages. Correct this by detecting the venv and adding the toolchain path after the venv path. Signed-off-by: Simon Glass <[email protected]>
2024-08-27tools/scripts/Kconfig: Update references from kconfig-language.txt to rstHiago De Franco
The Linux kernel documentation has transitioned from using kconfig-language.txt to kconfig-language.rst. Therefore update all occurrences of kconfig-language.txt. Signed-off-by: Hiago De Franco <[email protected]>
2024-08-26buildman: Make test_process_limit handle time.monotonic()Simon Glass
Newer versions of filelock use time.monotonic() instead of time.time(). Update the test the handle this. It would be better if filelock had support for writing unit tests which use locking. Signed-off-by: Simon Glass <[email protected]>
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 <[email protected]> Tested-by: Tom Rini <[email protected]>
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 <[email protected]>
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/[email protected]/ Signed-off-by: Simon Glass <[email protected]> Suggested-by: Tom Rini <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Andrejs Cainikovs <[email protected]>