[PATCH 2/6] buildman: Keep all permitted output files
Tom Rini
trini at konsulko.com
Thu Aug 24 16:26:32 CEST 2023
On Wed, Aug 23, 2023 at 09:02:55PM -0600, Simon Glass wrote:
> Now that we have a list of permitted output extensions, use it to ensure
> that the -k option preserves all of these.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Suggested-by: Tom Rini <trini at konsulko.com>
> ---
>
> tools/buildman/builderthread.py | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
> index 25f460c207db..d8374e68eb7f 100644
> --- a/tools/buildman/builderthread.py
> +++ b/tools/buildman/builderthread.py
> @@ -23,6 +23,9 @@ from u_boot_pylib import command
> RETURN_CODE_RETRY = -1
> BASE_ELF_FILENAMES = ['u-boot', 'spl/u-boot-spl', 'tpl/u-boot-tpl']
>
> +# Extensions allowed for images (keep in sync with binman/image.py, README.md)
> +ALLOWED_EXTS = ['.bin', '.rom', '.itb', '.img']
> +
> def mkdir(dirname, parents=False):
> """Make a directory if it doesn't already exist.
>
> @@ -636,10 +639,10 @@ class BuilderThread(threading.Thread):
>
> # Now write the actual build output
> if keep_outputs:
> - copy_files(
> - result.out_dir, build_dir, '',
> - ['u-boot*', '*.bin', '*.map', '*.img', 'MLO', 'SPL',
> - 'include/autoconf.mk', 'spl/u-boot-spl*'])
> + to_copy = ['u-boot*', '*.map', 'MLO', 'SPL',
> + 'include/autoconf.mk', 'spl/u-boot-spl*']
> + to_copy += [f'*{ext}' for ext in ALLOWED_EXTS]
> + copy_files(result.out_dir, build_dir, '', to_copy)
>
> def _send_result(self, result):
> """Send a result to the builder for processing
The alternative here is to just add to the list "*.stm32" and
"*_unsigned", and move along. We already have other special cases here,
of "MLO" and I guess "SPL" too. And of course there's many other things
being caught with "u-boot*" such as ".imx".
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230824/bde3ea8f/attachment.sig>
More information about the U-Boot
mailing list