Age | Commit message (Collapse) | Author |
|
This series from Ilias Apalodimas <ilias.apalodimas@linaro.org> largely
finishes the re-sync with the Linux Kernel v5.1 kbuild system.
Link: https://lore.kernel.org/r/20250627185723.342553-1-ilias.apalodimas@linaro.org
|
|
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 <ilias.apalodimas@linaro.org>
|
|
Allow -w to be used with -i to do a build without a separate output
directory.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
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 <sjg@chromium.org>
|
|
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 <sjg@chromium.org>
|
|
Simon Glass <sjg@chromium.org> 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/20250203162704.627469-1-sjg@chromium.org
|
|
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 <sjg@chromium.org>
|
|
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 <sjg@chromium.org>
|
|
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 <sjg@chromium.org>
|
|
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 <sjg@chromium.org>
|
|
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 <sjg@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Pass this in so the caller can change it independently of the member
variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Pass this in so the caller can change it independently of the member
variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Pass this in so the caller can change it independently of the member
variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
Make sure all functions have full argument documentation.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Provide the text of the exception when something goes wrong.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
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>
|
|
Move this code into a _config_and_build() function, so reduce the size of
run_commit().
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Put this in its own function to reduce the size of the run_commit()
function
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Put this in its own function to reduce the size of the run_commit()
function.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Put this in its own function to reduce the size of the run_commit()
function.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Move this logic into its own function to reduce the size of the
run_commt() function.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Split this into its own function so reduce the size of run_commit().
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Split this into its own function so reduce the size of run_commit().
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
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>
|
|
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>
|
|
Move a few more pieces to this new function.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
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>
|
|
This is already set up earlier in the function, so drop the extra
assignment.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This variable has a different meaning in the outer scope. Use a different
name to avoid confusion, or bugs.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Make this a public memory since it is used outside the class.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Fix the easy warnings in this file.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
The host compiler is not failing on warnings at present, when the
-E flag is used in buildman. Add the required flag to fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
|
|
The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.
To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This is quite a useful thing to use when building since it avoids small
size changes between commits. Add a -r flag for it.
Also undefine CONFIG_LOCALVERSION_AUTO since this appends the git hash
to the version string, causing every build to be slightly different.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This cuts down build performance considerably and is not always needed,
when checking for build errors, etc.
Add a flag to disable it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
It is sometimes useful to see the exact 'make' command used by buildman
for a commit. Add an output file for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add a new flag to buildman so that we will in turn pass
BINMAN_ALLOW_MISSING=1 to 'make'. Make use of this flag in CI.
Allow the settings file to control this.
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Buildman should consider a build as a success (with warnings) if missing
blobs have been dealt with by binman, even though buildman itself returns
and error code overall. This is how other warnings are dealt with.
We cannot easily access the 103 exit code, so detect the problem in the
output.
With this change, missing blobs result in an exit code of 101, although
they still indicate failure.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
We have a module called 'board'. Sometimes buildman uses 'brd' as an
instance variable but sometimes it uses 'board', which is confusing and
can mess with the module handling. Update the code to use 'brd'
consistently, making it easier for tools to determine when the module
is being referenced.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|