Attempt to enforce standard extensions for build output
Subsystems (3)
cover Attempt to enforce standard extensions for build output
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.img
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
Some patches are included to fix up some easy problems. But the following boards generate 'custMpk.pem' and it is not clear how to fix this, so I am asking for help from the maintainers:
am62ax_evm_r5 am62x_evm_r5 am64x_evm_r5 am65x_evm_r5 am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc am65x_hs_evm_r5 j7200_evm_r5 j721e_evm_r5 j721s2_evm_r5 verdin-am62_r5 am62ax_evm_a53 am62x_evm_a53 am64x_evm_a53 am65x_evm_a53 am65x_hs_evm_a53 j7200_evm_a72 j721e_evm_a72 j721s2_evm_a72 verdin-am62_a53
It looks like the .pem files are listed as top-level images, e.g.:
&custmpk_pem {
filename = "../../ti/keys/custMpk.pem";
};but if the only objective is to pick up an existing file, it is better to set BINMAN_INDIRS to include that directory. Also we should only have simple leafnames in the 'filename' property, so the '../../ti/keys' is not correct. It makes it harder for people to get the files from other places. Making this easier is one of binman's goals.
Most likely the custmpk_pem node can be removed and the .pem file can be included directly in the place that needs it, e.g. by adjusting the ti-secure-rom etype (or ex509_cert) to use tools.get_input_filename() when reading the key file.
For example, this:
custMpk {
filename = "custMpk.pem";
custmpk_pem: blob-ext {
filename = "../keys/custMpk.pem";
};
};is really just copying a file from '../keys/custMpk.pem' to 'custMpk.pem' so is equivalent to:
custMpk {
type = "blob";
filename = "custMpk.pem";
}(note that blob-ext implies that the blob may be missing, so blob is a better choice, since the key cannot be missing)
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
Simon Glass (6):
binman: Require image filenames to have certain extensions
buildman: Keep all permitted output files
buildman: Show progress when regenerating the board.cfg file
buildman: Start the clock when the build starts
kontron_sl28: Use u-boot-update.bin instead of u-boot.update
stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
.../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- doc/board/kontron/sl28.rst | 4 ++-- doc/board/st/stm32mp1.rst | 18 +++++++++--------- include/configs/stm32mp15_dh_dhsom.h | 2 +- tools/binman/binman.rst | 5 +++++ tools/binman/etype/section.py | 3 +-- tools/binman/ftest.py | 12 ++++++++++-- tools/binman/image.py | 9 +++++++++ tools/binman/test/022_image_name.dts | 4 ++-- tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ tools/buildman/boards.py | 15 ++++++++++++--- tools/buildman/builder.py | 3 ++- tools/buildman/builderthread.py | 11 +++++++---- tools/buildman/control.py | 3 ++- 15 files changed, 81 insertions(+), 29 deletions(-) create mode 100644 tools/binman/test/311_bad_image_name.dts
Signature · 1 line
2.42.0.rc1.204.g551eb34607-goog
PATCH 1/6 binman: Require image filenames to have certain extensions
It is helpful to be able to distinguish output files from other files when building U-Boot. This is useful for buildman, for example, which can preserve output files when requested.
Most images use extensions like .bin or .rom but some use other ones.
Introduce a check and produce an error if an image filename does not have an allowed extension.
---
tools/binman/binman.rst | 5 +++++ tools/binman/etype/section.py | 3 +-- tools/binman/ftest.py | 12 ++++++++++-- tools/binman/image.py | 9 +++++++++ tools/binman/test/022_image_name.dts | 4 ++-- tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ 6 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 tools/binman/test/311_bad_image_name.dts
tools/binman/binman.rst +5 -0
@@ -678,6 +678,11 @@ filename: put into the entry. If binman knows about the entry type (like u-boot-bin), then there is no need to specify this. + Note that image filenames must have one of a limited set of extensions: + `.bin`, `.rom`, `.itb` or `.img`. Others will generate an error. This is + so that it is clear which output files are images. It allows buildman to + preserve them when its `-k` option is used, for example. + type: Sets the type of an entry. This defaults to the entry name, but it is possible to use any name, and then add (for example) 'type = "u-boot"'
tools/binman/etype/section.py +1 -2
@@ -10,6 +10,7 @@ images to be created. from collections import OrderedDict import concurrent.futures +import os import re import sys
@@ -20,7 +21,6 @@ from u_boot_pylib import tools from u_boot_pylib import tout from u_boot_pylib.tools import to_hex_size - class Entry_section(Entry): """Entry that contains other entries
@@ -203,7 +203,6 @@ class Entry_section(Entry): self.align_default = fdt_util.GetInt(self._node, 'align-default', 0) self._filename = fdt_util.GetString(self._node, 'filename', self._filename) - self.ReadEntries() def ReadEntries(self):
tools/binman/ftest.py +10 -2
@@ -1107,11 +1107,11 @@ class TestFunctional(unittest.TestCase): retcode = self._DoTestFile('022_image_name.dts') self.assertEqual(0, retcode) image = control.images['image1'] - fname = tools.get_output_filename('test-name') + fname = tools.get_output_filename('test-name.bin') self.assertTrue(os.path.exists(fname)) image = control.images['image2'] - fname = tools.get_output_filename('test-name.xx') + fname = tools.get_output_filename('test-name.img') self.assertTrue(os.path.exists(fname)) def testBlobFilename(self):
@@ -7216,5 +7216,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self.assertRegex(err, "Image 'image'.*missing bintools.*: bootgen") + def testBadImageName(self): + """Test that image files can be named""" + with self.assertRaises(ValueError) as e: + self._DoTestFile('311_bad_image_name.dts') + self.assertIn( + "Image filename 'test-name.what' must use a permitted extension: .bin, .rom, .itb, .img", + str(e.exception)) + if __name__ == "__main__": unittest.main()
tools/binman/image.py +9 -0
@@ -21,6 +21,9 @@ from dtoc import fdt_util from u_boot_pylib import tools from u_boot_pylib import tout +# Extensions allowed for images (keep in sync with buildman/builderthread.py) +ALLOWED_EXTS = ['.bin', '.rom', '.itb', '.img'] + class Image(section.Entry_section): """A Image, representing an output from binman
@@ -97,6 +100,12 @@ class Image(section.Entry_section): self.allow_repack = fdt_util.GetBool(self._node, 'allow-repack') self._symlink = fdt_util.GetString(self._node, 'symlink') + if self.section is None: + ext = os.path.splitext(self._filename)[1] + if ext not in ALLOWED_EXTS: + self.Raise( + f"Image filename '{self._filename}' must use a permitted extension: {', '.join(ALLOWED_EXTS)}") + @classmethod def FromFile(cls, fname): """Convert an image file into an Image for use in binman
tools/binman/test/022_image_name.dts +2 -2
@@ -7,13 +7,13 @@ binman { multiple-images; image1 { - filename = "test-name"; + filename = "test-name.bin"; u-boot { }; }; image2 { - filename = "test-name.xx"; + filename = "test-name.img"; u-boot { }; };
tools/binman/test/311_bad_image_name.dts new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + multiple-images; + image1 { + filename = "test-name.what"; + u-boot { + }; + }; + }; +};
Signature · 1 line
2.42.0.rc1.204.g551eb34607-goog
PATCH 2/6 buildman: Keep all permitted output files
In reply to Simon GlassNow that we have a list of permitted output extensions, use it to ensure that the -k option preserves all of these.
---
tools/buildman/builderthread.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
tools/buildman/builderthread.py +7 -4
@@ -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
Signature · 1 line
2.42.0.rc1.204.g551eb34607-goog
Re: [PATCH 2/6] buildman: Keep all permitted output files
Quoted 29 lines · Simon Glass
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 <[email protected]>Suggested-by Tom Rini <[email protected]>---
tools/buildman/builderthread.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)tools/buildman/builderthread.py +3
-1@@ -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(
tools/buildman/builderthread.py class BuilderThread(threading.Thread): · line 648
Quoted 10 lines
tools/buildman/builderthread.py +4
-3- 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".
Signature · 1 line
Tom
PATCH 3/6 buildman: Show progress when regenerating the board.cfg file
In reply to Simon GlassThis can take a while, so show a message when starting.
Reported-by Tom Rini <[email protected]>
---
tools/buildman/boards.py | 15 ++++++++++++--- tools/buildman/control.py | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-)
tools/buildman/boards.py +12 -3
@@ -19,6 +19,7 @@ import time from buildman import board from buildman import kconfiglib +from u_boot_pylib.terminal import print_clear, tprint ### constant variables ### OUTPUT_FILE = 'boards.cfg'
@@ -863,11 +864,19 @@ class Boards: Returns: bool: True if all is well, False if there were warnings """ - if not force and output_is_new(output, CONFIG_DIR, '.'): + if not force: if not quiet: - print(f'{output} is up to date. Nothing to do.') - return True + tprint('\rChecking for Kconfig changes...', newline=False) + is_new = output_is_new(output, CONFIG_DIR, '.') + print_clear() + if is_new: + if not quiet: + print(f'{output} is up to date. Nothing to do.') + return True + if not quiet: + tprint('\rGenerating board list...', newline=False) params_list, warnings = self.build_board_list(CONFIG_DIR, '.', jobs) + print_clear() for warn in warnings: print(warn, file=sys.stderr) self.format_and_output(params_list, output)
tools/buildman/control.py +2 -1
@@ -621,7 +621,8 @@ def do_buildman(args, toolchains=None, make_func=None, brds=None, if not brds: brds = get_boards_obj(output_dir, args.regen_board_list, args.maintainer_check, args.full_check, - args.threads, args.verbose) + args.threads, args.verbose and + not args.print_arch and not args.print_prefix) if isinstance(brds, int): return brds
Signature · 1 line
2.42.0.rc1.204.g551eb34607-goog
PATCH 4/6 buildman: Start the clock when the build starts
In reply to Simon GlassThe 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.
---
tools/buildman/builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/buildman/builder.py +2 -1
@@ -328,7 +328,7 @@ class Builder: self._build_period_us = None self._complete_delay = None self._next_delay_update = datetime.now() - self._start_time = datetime.now() + self._start_time = None self._step = step self._error_lines = 0 self.no_subdirs = no_subdirs
@@ -1778,6 +1778,7 @@ class Builder: self._prepare_output_space() if not self._ide: tprint('\rStarting build...', newline=False) + self._start_time = datetime.now() self.setup_build(board_selected, commits) self.process_result(None) self.thread_exceptions = []
Signature · 1 line
2.42.0.rc1.204.g551eb34607-goog
PATCH 5/6 kontron_sl28: Use u-boot-update.bin instead of u-boot.update
In reply to Simon GlassA '.update' extension is not allowed anymore, so change it.
---
arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- doc/board/kontron/sl28.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi +1 -1
@@ -64,7 +64,7 @@ &binman { u-boot-update { - filename = "u-boot.update"; + filename = "u-boot-update.bin"; fit { description = "FIT update image";
doc/board/kontron/sl28.rst +2 -2
@@ -39,12 +39,12 @@ Update image ------------ After the build finished, there will be an update image called -u-boot.update. This can either be used in the DFU mode (which isn't +u-boot-update.bin. This can either be used in the DFU mode (which isn't supported yet) or encapsulated in an EFI UpdateCapsule. To build the capsule use the following command - $ tools/mkeficapsule -f u-boot.update -i 1 UpdateUboot + $ tools/mkeficapsule -f u-boot-update.bin -i 1 UpdateUboot Afterward you can copy this file to your ESP into the /EFI/UpdateCapsule/ folder. On the next EFI boot this will automatically update your
Signature · 1 line
2.42.0.rc1.204.g551eb34607-goog
Re: [PATCH 5/6] kontron_sl28: Use u-boot-update.bin instead of u-boot.update
Am 2023-08-24 05:02, schrieb Simon Glass:
Quoted 3 lines
A '.update' extension is not allowed anymore, so change it.
Signed-off-by Simon Glass <[email protected]>
Looks good to me, as it is just an intermediate binary.
PATCH 6/6 stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
In reply to Simon GlassA '.stm32' extension is not allowed anymore, so change it.
---
arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- doc/board/st/stm32mp1.rst | 18 +++++++++--------- include/configs/stm32mp15_dh_dhsom.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-)
arch/arm/dts/stm32mp15-u-boot.dtsi +1 -1
@@ -222,7 +222,7 @@ #if defined(CONFIG_SPL) &binman { spl-stm32 { - filename = "u-boot-spl.stm32"; + filename = "u-boot-spl-stm32.bin"; mkimage { args = "-T stm32image -a 0x2ffc2500 -e 0x2ffc2500"; u-boot-spl {
doc/board/st/stm32mp1.rst +9 -9
@@ -318,7 +318,7 @@ Build Procedure - stm32mp15_basic_defconfig - - FSBL = spl/u-boot-spl.stm32 + - FSBL = spl/u-boot-spl-stm32.bin - SSBL = u-boot.img (without CONFIG_SPL_LOAD_FIT) or u-boot.itb (with CONFIG_SPL_LOAD_FIT=y)
@@ -361,7 +361,7 @@ Build Procedure 8. The bootloaders files + The **ROM code** expects FSBL binaries with STM32 image header = - tf-a.stm32 or u-boot-spl.stm32 + tf-a.stm32 or u-boot-spl-stm32.bin According the FSBL / the boot mode:
@@ -468,9 +468,9 @@ or: +-------+--------+---------+------------------------+------------------------+ | *Num* | *Name* | *Size* | *Trusted boot content* | *Basic boot content* | +=======+========+=========+========================+========================+ - | 1 | fsbl1 | 256 KiB | TF-A_ BL2 (tf-a.stm32) | SPL (u-boot-spl.stm32) | + | 1 | fsbl1 | 256 KiB | TF-A_ BL2 (tf-a.stm32) | SPL (u-boot-spl-stm32.bin) | +-------+--------+---------+------------------------+------------------------+ - | 2 | fsbl2 | 256 KiB | TF-A_ BL2 (tf-a.stm32) | SPL (u-boot-spl.stm32) | + | 2 | fsbl2 | 256 KiB | TF-A_ BL2 (tf-a.stm32) | SPL (u-boot-spl-stm32.bin) | +-------+--------+---------+------------------------+------------------------+ | 3 | ssbl | 2MB | U-Boot (u-boot.stm32) | U-Boot (u-boot.img) | +-------+--------+---------+------------------------+------------------------+
@@ -528,8 +528,8 @@ c) copy the FSBL (2 times) and SSBL file on the correct partition. for basic boot mode : <SD card dev> = /dev/mmcblk0:: - # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p1 - # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p2 + # dd if=u-boot-spl-stm32.bin of=/dev/mmcblk0p1 + # dd if=u-boot-spl-stm32.bin of=/dev/mmcblk0p2 # dd if=u-boot.img of=/dev/mmcblk0p3 # Without CONFIG_SPL_LOAD_FIT OR dd if=u-boot.itb of=/dev/mmcblk0p3 # With CONFIG_SPL_LOAD_FIT=y
@@ -542,7 +542,7 @@ Prepare eMMC You can use U-Boot to copy binary in eMMC. In the next example, you need to boot from SD card and the images -(tf-a.stm32, fip.bin / u-boot-spl.stm32, u-boot.img for systems without +(tf-a.stm32, fip.bin / u-boot-spl-stm32.bin, u-boot.img for systems without CONFIG_SPL_LOAD_FIT or u-boot.itb for systems with CONFIG_SPL_LOAD_FIT=y) are presents on SD card (mmc 0) in ext4 partition 4 (bootfs)
@@ -561,7 +561,7 @@ b) copy FSBL, TF-A_ or SPL, on first eMMC boot partition # ext4load mmc 0:4 0xC0000000 tf-a.stm32 or - # ext4load mmc 0:4 0xC0000000 u-boot-spl.stm32 + # ext4load mmc 0:4 0xC0000000 u-boot-spl-stm32.bin # mmc dev 1 # mmc partconf 1 1 1 1
@@ -838,4 +838,4 @@ Arm TrustZone technology + https://www.op-tee.org/ + https://optee.readthedocs.io/en/latest/ + https://optee.readthedocs.io/en/latest/building/devices/stm32mp1.html - + https://github.com/OP-TEE/optee_os + + https://github.com/OP-TEE/optee_os
include/configs/stm32mp15_dh_dhsom.h +1 -1
@@ -22,7 +22,7 @@"usb_pgood_delay=1000\0" \"update_sf=" /* Erase SPI NOR and install U-Boot from SD */ \"setexpr loadaddr1 ${loadaddr} + 0x1000000 && " \ -"load mmc 0:4 ${loadaddr1} /boot/u-boot-spl.stm32 && " \ +"load mmc 0:4 ${loadaddr1} /boot/u-boot-spl-stm32.bin && " \"env set filesize1 ${filesize} && " \"load mmc 0:4 ${loadaddr} /boot/u-boot.itb && " \"sf probe && sf erase 0 0x200000 && " \
Signature · 1 line
2.42.0.rc1.204.g551eb34607-goog
Re: [PATCH 6/6] stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
Quoted 1 line · Simon Glass
A '.stm32' extension is not allowed anymore, so change it.
Why?
This will likely break a huge amount of scripts, I'm tempted to NAK it unless there is a very good reason.
Re: [PATCH 6/6] stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
Quoted 7 lines · Marek Vasut
Quoted 1 line · Simon Glass
A '.stm32' extension is not allowed anymore, so change it.
Why?
This will likely break a huge amount of scripts, I'm tempted to NAK it unless there is a very good reason.
This is in the cover letter. Today, buildman --keep-outputs doesn't actually keep the needed for booting outputs from a build for a number of platforms. Simon's response is to stop having a free-form list of outputs. With I guess the caveat being ROM-defined names (for example, we still keep "MLO" because that is the literal filename TI ROM looks for on FAT partitions, on mos of their 32bit platforms).
Signature · 1 line
Tom
Re: [PATCH 6/6] stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
Quoted 9 lines · Tom Rini
Quoted 7 lines · Marek Vasut
Quoted 1 line · Simon Glass
A '.stm32' extension is not allowed anymore, so change it.
Why?
This will likely break a huge amount of scripts, I'm tempted to NAK it unless there is a very good reason.
Quoted 6 lines
This is in the cover letter. Today, buildman --keep-outputs doesn't actually keep the needed for booting outputs from a build for a number of platforms. Simon's response is to stop having a free-form list of outputs. With I guess the caveat being ROM-defined names (for example, we still keep "MLO" because that is the literal filename TI ROM looks for on FAT partitions, on mos of their 32bit platforms).
Why not just place the free-form files into some output/ directory and be done with it ? Then they can have whatever extension they want, as long as the output/ directory name is stable.
Re: [PATCH 6/6] stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
Quoted 17 lines · Marek Vasut
Quoted 9 lines · Tom Rini
Quoted 7 lines · Marek Vasut
Quoted 1 line · Simon Glass
A '.stm32' extension is not allowed anymore, so change it.
Why?
This will likely break a huge amount of scripts, I'm tempted to NAK it unless there is a very good reason.
Quoted 6 lines
This is in the cover letter. Today, buildman --keep-outputs doesn't actually keep the needed for booting outputs from a build for a number of platforms. Simon's response is to stop having a free-form list of outputs. With I guess the caveat being ROM-defined names (for example, we still keep "MLO" because that is the literal filename TI ROM looks for on FAT partitions, on mos of their 32bit platforms).
Quoted 3 lines
Why not just place the free-form files into some output/ directory and be done with it ? Then they can have whatever extension they want, as long as the output/ directory name is stable.
Yes, an alternative here is to just extend the list that's removed in patch 2/6.
Signature · 1 line
Tom
Re: [PATCH 6/6] stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
Quoted 18 lines · Tom Rini
Quoted 17 lines · Marek Vasut
Quoted 15 lines · Tom Rini
Quoted 7 lines · Marek Vasut
Quoted 1 line · Simon Glass
A '.stm32' extension is not allowed anymore, so change it.
Why?
This will likely break a huge amount of scripts, I'm tempted to NAK it unless there is a very good reason.
This is in the cover letter. Today, buildman --keep-outputs doesn't actually keep the needed for booting outputs from a build for a number of platforms. Simon's response is to stop having a free-form list of outputs. With I guess the caveat being ROM-defined names (for example, we still keep "MLO" because that is the literal filename TI ROM looks for on FAT partitions, on mos of their 32bit platforms).
Quoted 6 lines
Quoted 3 lines
Why not just place the free-form files into some output/ directory and be done with it ? Then they can have whatever extension they want, as long as the output/ directory name is stable.
Yes, an alternative here is to just extend the list that's removed in patch 2/6.
I ... am not on CC of that patch ...
It would be really good if Simon CCed everyone involved on all the patches.
Re: [PATCH 6/6] stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
In reply to Tom RiniHi Simon,
Quoted 15 lines · Tom Rini
Quoted 14 lines · Marek Vasut
Quoted 13 lines · Tom Rini
Quoted 6 lines · Marek Vasut
Quoted 1 line · Simon Glass
A '.stm32' extension is not allowed anymore, so change it.
Why?
This will likely break a huge amount of scripts, I'm tempted to NAK it unless there is a very good reason.
This is in the cover letter. Today, buildman --keep-outputs doesn't actually keep the needed for booting outputs from a build for a number of platforms. Simon's response is to stop having a free-form list of outputs. With I guess the caveat being ROM-defined names (for example, we still keep "MLO" because that is the literal filename TI ROM looks for on FAT partitions, on mos of their 32bit platforms).
Quoted 6 lines
Quoted 3 lines
Why not just place the free-form files into some output/ directory and be done with it ? Then they can have whatever extension they want, as long as the output/ directory name is stable.
Yes, an alternative here is to just extend the list that's removed in patch 2/6.
The ".stm32" was choosen on output on mkimage to be aligned with:
- all STMicroelectonics documentation (for example https://wiki.st.com/stm32mpu/wiki/STM32_header_for_binary_files)
- the proposed scripts or files, in particular in the YOCTO generated flashlayout files.
- this extension list expected by our tools: STM CubeProgrammer (https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer)
and Signing tools (https://wiki.st.com/stm32mpu/wiki/Signing_tool)
So I prefer to kept the ".stm32" extension here:
filename = "u-boot-spl.stm32"
NB: the justification for buildman '-k' option seens not fully relevant here
because in patch 2/6 you kept not only the ALLOWED extension but also some particular files
+ to_copy = ['u-boot*', '*.map', 'MLO', 'SPL',
+ 'include/autoconf.mk', 'spl/u-boot-spl*']
+ to_copy += [f'*{ext}' for ext in ALLOWED_EXTS]
so all the files "u-boot*" are kept with buildman -k even if it is not a allowed extension.
I propose to change the patch 1/6 if you are agree
and allow binman to generate the file with same rules than buildman -k option in patch 2/6
The filename is valid if
- the file is named with the allowed prefix 'u-boot' => 'u-boot*' so "u-boot-spl.stm32" is allowed
- the file is with allowed extension =>.bin, .rom, .itb, .img
Regards
Patrick
Re: [PATCH 6/6] stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32
Hi,
Quoted 65 lines · Patrick DELAUNAY
Hi Simon,
Quoted 15 lines · Tom Rini
Quoted 14 lines · Marek Vasut
Quoted 13 lines · Tom Rini
Quoted 6 lines · Marek Vasut
Quoted 1 line · Simon Glass
A '.stm32' extension is not allowed anymore, so change it.
Why?
This will likely break a huge amount of scripts, I'm tempted to NAK it unless there is a very good reason.
This is in the cover letter. Today, buildman --keep-outputs doesn't actually keep the needed for booting outputs from a build for a number of platforms. Simon's response is to stop having a free-form list of outputs. With I guess the caveat being ROM-defined names (for example, we still keep "MLO" because that is the literal filename TI ROM looks for on FAT partitions, on mos of their 32bit platforms).
Quoted 6 lines
Quoted 3 lines
Why not just place the free-form files into some output/ directory and be done with it ? Then they can have whatever extension they want, as long as the output/ directory name is stable.
Yes, an alternative here is to just extend the list that's removed in patch 2/6.
The ".stm32" was choosen on output on mkimage to be aligned with:
- all STMicroelectonics documentation (for example
https://wiki.st.com/stm32mpu/wiki/STM32_header_for_binary_files)- the proposed scripts or files, in particular in the YOCTO generated flashlayout files.
- this extension list expected by our tools: STM CubeProgrammer
(https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer)and Signing tools (https://wiki.st.com/stm32mpu/wiki/Signing_tool)
So I prefer to kept the ".stm32" extension here:
filename = "u-boot-spl.stm32"NB: the justification for buildman '-k' option seens not fully relevant here
because in patch 2/6 you kept not only the ALLOWED extension but
also some particular files(quoted diff) +3
-0+ to_copy = ['u-boot*', '*.map', 'MLO', 'SPL', + 'include/autoconf.mk', 'spl/u-boot-spl*'] + to_copy += [f'*{ext}' for ext in ALLOWED_EXTS]so all the files "u-boot*" are kept with buildman -k even if it is not a allowed extension.
I propose to change the patch 1/6 if you are agree
and allow binman to generate the file with same rules than buildman -k option in patch 2/6
Quoted 6 lines
The filename is valid if
- the file is named with the allowed prefix 'u-boot' => 'u-boot*' so "u-boot-spl.stm32" is allowed
- the file is with allowed extension =>.bin, .rom, .itb, .img
Yes OK, it seems this won't affect you in any case.
But as Tom says, we are going to try another path...basically just opt in those files we need.
Regards,
Simon
Hi,
Quoted 9 lines
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman can keep the required files.
How does this work? I didn't get all the patches from this series, which makes it really hard to review or ack the individual patches.
Are we just whitelisting any files with these extension? Honestly, this sounds like an arbitrary restriction to me. But maybe I'm missing some context.
-michael
Hi Michael,
Quoted 15 lines · Michael Walle
Hi,
Quoted 11 lines
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman
can keep the required files.
Quoted 7 lines
How does this work? I didn't get all the patches from this series, which makes
it really hard to review or ack the individual patches.Are we just whitelisting any files with these extension? Honestly, this sounds like an arbitrary restriction to me. But maybe I'm missing some context.
You can see the full series here:
https://patchwork.ozlabs.org/project/uboot/list/?series=370121
Regards,
Simon
Hi,
Quoted 16 lines
Quoted 16 lines
Quoted 11 lines
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman
can keep the required files.How does this work? I didn't get all the patches from this series, which makes
it really hard to review or ack the individual patches.
Quoted 7 lines
Quoted 3 lines
Are we just whitelisting any files with these extension? Honestly, this sounds like an arbitrary restriction to me. But maybe I'm missing some context.
You can see the full series here:
https://patchwork.ozlabs.org/project/uboot/list/?series=370121
I know the archives/patchwork. All I was saying is that sending just parts of a patch series to specific ppl doesn't make any sense, because you always miss the context and for that you have to look at the archives.
-michael
Hi Simon
+ Vignesh, Nishanth to comment on this as well
Quoted 2 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
[...]
Quoted 7 lines
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
I think this can work... but few concerns.
1. Our output binaries also include <image>.bin_unsigned, would extensions that aren't "standard" be added to the list if they are truly output binaries? If not, changing names for them may be a long stretch (pinging Vignesh and Nishanth to comment here).
2. Can it be an option to not enforce this, to support users that may make use of the intermediate binaries?
Also if we do move forward with this, we will need to sync to make sure that the changes to the affected boards come through as well.
Signature · 2 lines
Thanking You Neha Malcom Francis
Hi Neha,
Quoted 19 lines · Neha Malcom Francis
Hi Simon
+ Vignesh, Nishanth to comment on this as well
Quoted 2 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
[...]
Quoted 7 lines
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
Quoted 6 lines
I think this can work... but few concerns.
1. Our output binaries also include <image>.bin_unsigned, would extensions that aren't "standard" be added to the list if they are truly output binaries? If not, changing names for them may be a long stretch (pinging Vignesh and Nishanth to comment here).
How about changing them to image-unsigned.bin ? That is a convention I am trying to follow...so we have the file type last.
Quoted 3 lines
2. Can it be an option to not enforce this, to support users that may make use of the intermediate binaries?
This does not apply to sections within an image, which can still produce files. But those files won't be preserved by buildman unless they have a supported extension.
Quoted 3 lines
Also if we do move forward with this, we will need to sync to make sure that the changes to the affected boards come through as well.
Yes.
Regards,
Simon
Quoted 91 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman can keep the required files.
Some patches are included to fix up some easy problems. But the following boards generate 'custMpk.pem' and it is not clear how to fix this, so I am asking for help from the maintainers:
am62ax_evm_r5 am62x_evm_r5 am64x_evm_r5 am65x_evm_r5 am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc am65x_hs_evm_r5 j7200_evm_r5 j721e_evm_r5 j721s2_evm_r5 verdin-am62_r5 am62ax_evm_a53 am62x_evm_a53 am64x_evm_a53 am65x_evm_a53 am65x_hs_evm_a53 j7200_evm_a72 j721e_evm_a72 j721s2_evm_a72 verdin-am62_a53It looks like the .pem files are listed as top-level images, e.g.:
&custmpk_pem { filename = "../../ti/keys/custMpk.pem"; };but if the only objective is to pick up an existing file, it is better to set
BINMAN_INDIRSto include that directory. Also we should only have simple leafnames in the 'filename' property, so the '../../ti/keys' is not correct. It makes it harder for people to get the files from other places. Making this easier is one of binman's goals.Most likely the
custmpk_pemnode can be removed and the .pem file can be included directly in the place that needs it, e.g. by adjusting the ti-secure-rom etype (orex509_cert) to usetools.get_input_filename()when reading the key file.For example, this:
custMpk { filename = "custMpk.pem"; custmpk_pem: blob-ext { filename = "../keys/custMpk.pem"; }; };is really just copying a file from '../keys/custMpk.pem' to 'custMpk.pem' so is equivalent to:
custMpk { type = "blob"; filename = "custMpk.pem"; }(note that blob-ext implies that the blob may be missing, so blob is a better choice, since the key cannot be missing)
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
Simon Glass (6):
binman: Require image filenames to have certain extensions
buildman: Keep all permitted output files
buildman: Show progress when regenerating the board.cfg file
buildman: Start the clock when the build starts
kontron_sl28: Use u-boot-update.bin instead of u-boot.update
stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32.../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- doc/board/kontron/sl28.rst | 4 ++-- doc/board/st/stm32mp1.rst | 18 +++++++++--------- include/configs/stm32mp15_dh_dhsom.h | 2 +- tools/binman/binman.rst | 5 +++++ tools/binman/etype/section.py | 3 +-- tools/binman/ftest.py | 12 ++++++++++-- tools/binman/image.py | 9 +++++++++
Quoted 8 lines
tools/binman/test/022_image_name.dts | 4 ++-- tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ tools/buildman/boards.py | 15 ++++++++++++--- tools/buildman/builder.py | 3 ++- tools/buildman/builderthread.py | 11 +++++++---- tools/buildman/control.py | 3 ++- 15 files changed, 81 insertions(+), 29 deletions(-) create mode 100644 tools/binman/test/311_bad_image_name.dts
This doesn't seem to address the ones I pointed out on IRC as being the first order (to me anyhow) problem of needing the _unsigned files on the platforms you list above for PEM files.
Signature · 1 line
Tom
Hi Tom,
Quoted 103 lines · Tom Rini
Quoted 91 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman can keep the required files.
Some patches are included to fix up some easy problems. But the following boards generate 'custMpk.pem' and it is not clear how to fix this, so I am asking for help from the maintainers:
am62ax_evm_r5 am62x_evm_r5 am64x_evm_r5 am65x_evm_r5 am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc am65x_hs_evm_r5 j7200_evm_r5 j721e_evm_r5 j721s2_evm_r5 verdin-am62_r5 am62ax_evm_a53 am62x_evm_a53 am64x_evm_a53 am65x_evm_a53 am65x_hs_evm_a53 j7200_evm_a72 j721e_evm_a72 j721s2_evm_a72 verdin-am62_a53It looks like the .pem files are listed as top-level images, e.g.:
&custmpk_pem { filename = "../../ti/keys/custMpk.pem"; };but if the only objective is to pick up an existing file, it is better to set
BINMAN_INDIRSto include that directory. Also we should only have simple leafnames in the 'filename' property, so the '../../ti/keys' is not correct. It makes it harder for people to get the files from other places. Making this easier is one of binman's goals.Most likely the
custmpk_pemnode can be removed and the .pem file can be included directly in the place that needs it, e.g. by adjusting the ti-secure-rom etype (orex509_cert) to usetools.get_input_filename()when reading the key file.For example, this:
custMpk { filename = "custMpk.pem"; custmpk_pem: blob-ext { filename = "../keys/custMpk.pem"; }; };is really just copying a file from '../keys/custMpk.pem' to 'custMpk.pem' so is equivalent to:
custMpk { type = "blob"; filename = "custMpk.pem"; }(note that blob-ext implies that the blob may be missing, so blob is a better choice, since the key cannot be missing)
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
Simon Glass (6):
binman: Require image filenames to have certain extensions
buildman: Keep all permitted output files
buildman: Show progress when regenerating the board.cfg file
buildman: Start the clock when the build starts
kontron_sl28: Use u-boot-update.bin instead of u-boot.update
stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32.../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- doc/board/kontron/sl28.rst | 4 ++-- doc/board/st/stm32mp1.rst | 18 +++++++++--------- include/configs/stm32mp15_dh_dhsom.h | 2 +- tools/binman/binman.rst | 5 +++++ tools/binman/etype/section.py | 3 +-- tools/binman/ftest.py | 12 ++++++++++-- tools/binman/image.py | 9 +++++++++Quoted 8 lines
tools/binman/test/022_image_name.dts | 4 ++-- tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ tools/buildman/boards.py | 15 ++++++++++++--- tools/buildman/builder.py | 3 ++- tools/buildman/builderthread.py | 11 +++++++---- tools/buildman/control.py | 3 ++- 15 files changed, 81 insertions(+), 29 deletions(-) create mode 100644 tools/binman/test/311_bad_image_name.dts
Quoted 3 lines
This doesn't seem to address the ones I pointed out on IRC as being the first order (to me anyhow) problem of needing the
_unsignedfiles on the platforms you list above for PEM files.
I think it should be xxx-unsigned.bin instead of xxx.bin_unsigned
Regards,
Simon
Quoted 106 lines · Simon Glass
Hi Tom,
Quoted 103 lines · Tom Rini
Quoted 99 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman can keep the required files.
Some patches are included to fix up some easy problems. But the following boards generate 'custMpk.pem' and it is not clear how to fix this, so I am asking for help from the maintainers:
am62ax_evm_r5 am62x_evm_r5 am64x_evm_r5 am65x_evm_r5 am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc am65x_hs_evm_r5 j7200_evm_r5 j721e_evm_r5 j721s2_evm_r5 verdin-am62_r5 am62ax_evm_a53 am62x_evm_a53 am64x_evm_a53 am65x_evm_a53 am65x_hs_evm_a53 j7200_evm_a72 j721e_evm_a72 j721s2_evm_a72 verdin-am62_a53It looks like the .pem files are listed as top-level images, e.g.:
&custmpk_pem { filename = "../../ti/keys/custMpk.pem"; };but if the only objective is to pick up an existing file, it is better to set
BINMAN_INDIRSto include that directory. Also we should only have simple leafnames in the 'filename' property, so the '../../ti/keys' is not correct. It makes it harder for people to get the files from other places. Making this easier is one of binman's goals.Most likely the
custmpk_pemnode can be removed and the .pem file can be included directly in the place that needs it, e.g. by adjusting the ti-secure-rom etype (orex509_cert) to usetools.get_input_filename()when reading the key file.For example, this:
custMpk { filename = "custMpk.pem"; custmpk_pem: blob-ext { filename = "../keys/custMpk.pem"; }; };is really just copying a file from '../keys/custMpk.pem' to 'custMpk.pem' so is equivalent to:
custMpk { type = "blob"; filename = "custMpk.pem"; }(note that blob-ext implies that the blob may be missing, so blob is a better choice, since the key cannot be missing)
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
Simon Glass (6):
binman: Require image filenames to have certain extensions
buildman: Keep all permitted output files
buildman: Show progress when regenerating the board.cfg file
buildman: Start the clock when the build starts
kontron_sl28: Use u-boot-update.bin instead of u-boot.update
stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32.../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- doc/board/kontron/sl28.rst | 4 ++-- doc/board/st/stm32mp1.rst | 18 +++++++++--------- include/configs/stm32mp15_dh_dhsom.h | 2 +- tools/binman/binman.rst | 5 +++++ tools/binman/etype/section.py | 3 +-- tools/binman/ftest.py | 12 ++++++++++-- tools/binman/image.py | 9 +++++++++ tools/binman/test/022_image_name.dts | 4 ++-- tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ tools/buildman/boards.py | 15 ++++++++++++--- tools/buildman/builder.py | 3 ++- tools/buildman/builderthread.py | 11 +++++++---- tools/buildman/control.py | 3 ++- 15 files changed, 81 insertions(+), 29 deletions(-) create mode 100644 tools/binman/test/311_bad_image_name.dts
Quoted 5 lines
Quoted 3 lines
This doesn't seem to address the ones I pointed out on IRC as being the first order (to me anyhow) problem of needing the
_unsignedfiles on the platforms you list above for PEM files.I think it should be xxx-unsigned.bin instead of xxx.bin_unsigned
As I was saying on IRC, you need to make that change then, if we're going to go down this path, before v2023.10 is out.
And to repeat what I said inside another part of the thread, the u-boot* glob is hiding other "arbitrary" extensions that we've had in-use for forever.
Signature · 1 line
Tom
Hi Tom,
Quoted 108 lines · Tom Rini
Quoted 106 lines · Simon Glass
Hi Tom,
Quoted 103 lines · Tom Rini
Quoted 99 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman can keep the required files.
Some patches are included to fix up some easy problems. But the following boards generate 'custMpk.pem' and it is not clear how to fix this, so I am asking for help from the maintainers:
am62ax_evm_r5 am62x_evm_r5 am64x_evm_r5 am65x_evm_r5 am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc am65x_hs_evm_r5 j7200_evm_r5 j721e_evm_r5 j721s2_evm_r5 verdin-am62_r5 am62ax_evm_a53 am62x_evm_a53 am64x_evm_a53 am65x_evm_a53 am65x_hs_evm_a53 j7200_evm_a72 j721e_evm_a72 j721s2_evm_a72 verdin-am62_a53It looks like the .pem files are listed as top-level images, e.g.:
&custmpk_pem { filename = "../../ti/keys/custMpk.pem"; };but if the only objective is to pick up an existing file, it is better to set
BINMAN_INDIRSto include that directory. Also we should only have simple leafnames in the 'filename' property, so the '../../ti/keys' is not correct. It makes it harder for people to get the files from other places. Making this easier is one of binman's goals.Most likely the
custmpk_pemnode can be removed and the .pem file can be included directly in the place that needs it, e.g. by adjusting the ti-secure-rom etype (orex509_cert) to usetools.get_input_filename()when reading the key file.For example, this:
custMpk { filename = "custMpk.pem"; custmpk_pem: blob-ext { filename = "../keys/custMpk.pem"; }; };is really just copying a file from '../keys/custMpk.pem' to 'custMpk.pem' so is equivalent to:
custMpk { type = "blob"; filename = "custMpk.pem"; }(note that blob-ext implies that the blob may be missing, so blob is a better choice, since the key cannot be missing)
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
Simon Glass (6):
binman: Require image filenames to have certain extensions
buildman: Keep all permitted output files
buildman: Show progress when regenerating the board.cfg file
buildman: Start the clock when the build starts
kontron_sl28: Use u-boot-update.bin instead of u-boot.update
stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32.../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- doc/board/kontron/sl28.rst | 4 ++-- doc/board/st/stm32mp1.rst | 18 +++++++++--------- include/configs/stm32mp15_dh_dhsom.h | 2 +- tools/binman/binman.rst | 5 +++++ tools/binman/etype/section.py | 3 +-- tools/binman/ftest.py | 12 ++++++++++-- tools/binman/image.py | 9 +++++++++ tools/binman/test/022_image_name.dts | 4 ++-- tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ tools/buildman/boards.py | 15 ++++++++++++--- tools/buildman/builder.py | 3 ++- tools/buildman/builderthread.py | 11 +++++++---- tools/buildman/control.py | 3 ++- 15 files changed, 81 insertions(+), 29 deletions(-) create mode 100644 tools/binman/test/311_bad_image_name.dts
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This doesn't seem to address the ones I pointed out on IRC as being the first order (to me anyhow) problem of needing the
_unsignedfiles on the platforms you list above for PEM files.I think it should be xxx-unsigned.bin instead of xxx.bin_unsigned
As I was saying on IRC, you need to make that change then, if we're going to go down this path, before v2023.10 is out.
Yes I can do that one...but I am stuck on the PEM files so need the maintainer there to figure out what is up, as described in detail in the cover letter.
Quoted 4 lines
And to repeat what I said inside another part of the thread, the u-boot* glob is hiding other "arbitrary" extensions that we've had in-use for forever.
Yes, understood. Do you think that is a problem? I should improve the docs for buildman -k too.
Regrads,
Simon
Quoted 125 lines · Simon Glass
Hi Tom,
Quoted 108 lines · Tom Rini
Quoted 106 lines · Simon Glass
Hi Tom,
Quoted 103 lines · Tom Rini
Quoted 99 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman can keep the required files.
Some patches are included to fix up some easy problems. But the following boards generate 'custMpk.pem' and it is not clear how to fix this, so I am asking for help from the maintainers:
am62ax_evm_r5 am62x_evm_r5 am64x_evm_r5 am65x_evm_r5 am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc am65x_hs_evm_r5 j7200_evm_r5 j721e_evm_r5 j721s2_evm_r5 verdin-am62_r5 am62ax_evm_a53 am62x_evm_a53 am64x_evm_a53 am65x_evm_a53 am65x_hs_evm_a53 j7200_evm_a72 j721e_evm_a72 j721s2_evm_a72 verdin-am62_a53It looks like the .pem files are listed as top-level images, e.g.:
&custmpk_pem { filename = "../../ti/keys/custMpk.pem"; };but if the only objective is to pick up an existing file, it is better to set
BINMAN_INDIRSto include that directory. Also we should only have simple leafnames in the 'filename' property, so the '../../ti/keys' is not correct. It makes it harder for people to get the files from other places. Making this easier is one of binman's goals.Most likely the
custmpk_pemnode can be removed and the .pem file can be included directly in the place that needs it, e.g. by adjusting the ti-secure-rom etype (orex509_cert) to usetools.get_input_filename()when reading the key file.For example, this:
custMpk { filename = "custMpk.pem"; custmpk_pem: blob-ext { filename = "../keys/custMpk.pem"; }; };is really just copying a file from '../keys/custMpk.pem' to 'custMpk.pem' so is equivalent to:
custMpk { type = "blob"; filename = "custMpk.pem"; }(note that blob-ext implies that the blob may be missing, so blob is a better choice, since the key cannot be missing)
The fact that the .pem files are at the top level means that they are output images, which surely is not intended. They should be buried in the image description, at a lower level, as part of something else.
So please take a loke at the above and see if the binman descriptions can be reworked slightly to follow these new rules.
Simon Glass (6):
binman: Require image filenames to have certain extensions
buildman: Keep all permitted output files
buildman: Show progress when regenerating the board.cfg file
buildman: Start the clock when the build starts
kontron_sl28: Use u-boot-update.bin instead of u-boot.update
stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32.../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- doc/board/kontron/sl28.rst | 4 ++-- doc/board/st/stm32mp1.rst | 18 +++++++++--------- include/configs/stm32mp15_dh_dhsom.h | 2 +- tools/binman/binman.rst | 5 +++++ tools/binman/etype/section.py | 3 +-- tools/binman/ftest.py | 12 ++++++++++-- tools/binman/image.py | 9 +++++++++ tools/binman/test/022_image_name.dts | 4 ++-- tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ tools/buildman/boards.py | 15 ++++++++++++--- tools/buildman/builder.py | 3 ++- tools/buildman/builderthread.py | 11 +++++++---- tools/buildman/control.py | 3 ++- 15 files changed, 81 insertions(+), 29 deletions(-) create mode 100644 tools/binman/test/311_bad_image_name.dtsQuoted 8 lines
Quoted 5 lines
Quoted 3 lines
This doesn't seem to address the ones I pointed out on IRC as being the first order (to me anyhow) problem of needing the
_unsignedfiles on the platforms you list above for PEM files.I think it should be xxx-unsigned.bin instead of xxx.bin_unsigned
As I was saying on IRC, you need to make that change then, if we're going to go down this path, before v2023.10 is out.
Yes I can do that one...but I am stuck on the PEM files so need the maintainer there to figure out what is up, as described in detail in the cover letter.
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
And to repeat what I said inside another part of the thread, the u-boot* glob is hiding other "arbitrary" extensions that we've had in-use for forever.
Yes, understood. Do you think that is a problem? I should improve the docs for buildman -k too.
Well, I'm not convinced that just extending the list in 2/6 isn't better. What this series does is say "anything that's not prefixed with u-boot can only have a few suffixes, for CI". Since most people still aren't going to use buildman instead of make, to build things. It'll just be maybe-feasible for some other cases now.
Signature · 1 line
Tom
Quoted 10 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
Quoted 7 lines
.bin
.rom
.itb
.imgOther extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like binman build --ls to print their names/paths for buildman to preserve them.
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs, and the Makefile should default to O=build to achieve the "output dir". I'm not sure if that's going to happen.
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.img
Quoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
Quoted 4 lines
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs
Agreed
Quoted 2 lines
, and the
Makefileshould default to O=build to achieve the "output dir". I'm not sure if that's going to happen.
I would quite like the 'non-output' file (i.e. things that are not a binman image) to appear in a 'binman-work' subdir of the output dir. What do you think?
Regards,
Simon
Quoted 27 lines · Simon Glass
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgQuoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.
Quoted 5 lines
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
I think all of the complaints thus far have shown the problem with trying to enforce an arbitrary limit here.
Signature · 1 line
Tom
Quoted 27 lines · Simon Glass
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgQuoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.
Quoted 5 lines
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
I guess my strongest argument is that people already/will have workflows that depend on certain filenames or extensions, and shouldn't have to modify binman code (consider that people may be using the PyPI wheels) to accommodate those when we are already putting the name in the dtb.
I do want some standardization to the U-Boot build outputs though, but more like a global binman.dts with like u-boot.rom, u-boot-sdmmc.img images with well-defined TPL, SPL, U-Boot sections that arch-dtsi files can fill in.
Quoted 4 lines
Quoted 3 lines
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs
Quoted 8 lines
Agreed
Quoted 2 lines
, and the
Makefileshould default to O=build to achieve the "output dir". I'm not sure if that's going to happen.I would quite like the 'non-output' file (i.e. things that are not a binman image) to appear in a 'binman-work' subdir of the output dir. What do you think?
I'd prefer them to go in a tempfile.TemporaryDirectory() and discarded at the end of a binman run, and a "--tmpdir <path>" option to use a given directory instead and preserve things for debugging.
Hi Alper,
Quoted 54 lines · Alper Nebi Yasak
Quoted 27 lines · Simon Glass
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgQuoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.Quoted 5 lines
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
I guess my strongest argument is that people already/will have workflows that depend on certain filenames or extensions, and shouldn't have to modify binman code (consider that people may be using the PyPI wheels) to accommodate those when we are already putting the name in the dtb.
I do want some standardization to the U-Boot build outputs though, but more like a global
binman.dtswith like u-boot.rom, u-boot-sdmmc.img images with well-defined TPL, SPL, U-Boot sections that arch-dtsi files can fill in.Quoted 9 lines
Quoted 3 lines
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs
Agreed
Quoted 2 lines
, and the
Makefileshould default to O=build to achieve the "output dir". I'm not sure if that's going to happen.
Quoted 7 lines
Quoted 3 lines
I would quite like the 'non-output' file (i.e. things that are not a binman image) to appear in a 'binman-work' subdir of the output dir. What do you think?
I'd prefer them to go in a
tempfile.TemporaryDirectory()and discarded at the end of a binman run, and a "--tmpdir <path>" option to use a given directory instead and preserve things for debugging.
Actually, that was the original purpose of the output directory in the u_boot_pylib.tools module. But with all the files binman creates, that has been lost. I think we should restore that purpose (with an output dir as a temp dir) and then I think what you have written here will work.
Regards,
Simon
Quoted 65 lines · Simon Glass
Hi Alper,
Quoted 54 lines · Alper Nebi Yasak
Quoted 27 lines · Simon Glass
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgQuoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.Quoted 5 lines
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
I guess my strongest argument is that people already/will have workflows that depend on certain filenames or extensions, and shouldn't have to modify binman code (consider that people may be using the PyPI wheels) to accommodate those when we are already putting the name in the dtb.
I do want some standardization to the U-Boot build outputs though, but more like a global
binman.dtswith like u-boot.rom, u-boot-sdmmc.img images with well-defined TPL, SPL, U-Boot sections that arch-dtsi files can fill in.Quoted 9 lines
Quoted 3 lines
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs
Agreed
Quoted 2 lines
, and the
Makefileshould default to O=build to achieve the "output dir". I'm not sure if that's going to happen.Quoted 7 lines
Quoted 3 lines
I would quite like the 'non-output' file (i.e. things that are not a binman image) to appear in a 'binman-work' subdir of the output dir. What do you think?
I'd prefer them to go in a
tempfile.TemporaryDirectory()and discarded at the end of a binman run, and a "--tmpdir <path>" option to use a given directory instead and preserve things for debugging.
Quoted 5 lines
Actually, that was the original purpose of the output directory in the u_boot_pylib.tools module. But with all the files binman creates, that has been lost. I think we should restore that purpose (with an output dir as a temp dir) and then I think what you have written here will work.
Just please note the rest of the feedback that's been given to this series too.
Signature · 1 line
Tom
Hi Tom,
Quoted 67 lines · Tom Rini
Quoted 65 lines · Simon Glass
Hi Alper,
Quoted 61 lines · Alper Nebi Yasak
Quoted 27 lines · Simon Glass
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgQuoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.Quoted 5 lines
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
I guess my strongest argument is that people already/will have workflows that depend on certain filenames or extensions, and shouldn't have to modify binman code (consider that people may be using the PyPI wheels) to accommodate those when we are already putting the name in the dtb.
I do want some standardization to the U-Boot build outputs though, but more like a global
binman.dtswith like u-boot.rom, u-boot-sdmmc.img images with well-defined TPL, SPL, U-Boot sections that arch-dtsi files can fill in.Quoted 4 lines
Quoted 3 lines
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs
Quoted 8 lines
Agreed
Quoted 2 lines
, and the
Makefileshould default to O=build to achieve the "output dir". I'm not sure if that's going to happen.I would quite like the 'non-output' file (i.e. things that are not a binman image) to appear in a 'binman-work' subdir of the output dir. What do you think?
I'd prefer them to go in a
tempfile.TemporaryDirectory()and discarded at the end of a binman run, and a "--tmpdir <path>" option to use a given directory instead and preserve things for debugging.
Quoted 8 lines
Quoted 5 lines
Actually, that was the original purpose of the output directory in the u_boot_pylib.tools module. But with all the files binman creates, that has been lost. I think we should restore that purpose (with an output dir as a temp dir) and then I think what you have written here will work.
Just please note the rest of the feedback that's been given to this series too.
Yes. It is a bit hard to know what to do. I suppose we need binman to publish a list of the image files it writes, so buildman can use that to save them. Or we could just add some more special cases to the rule in buildman?
Regards,
Simon
Quoted 76 lines · Simon Glass
Hi Tom,
Quoted 73 lines · Tom Rini
Quoted 70 lines · Simon Glass
Hi Alper,
Quoted 54 lines · Alper Nebi Yasak
Quoted 27 lines · Simon Glass
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgQuoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.Quoted 5 lines
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
I guess my strongest argument is that people already/will have workflows that depend on certain filenames or extensions, and shouldn't have to modify binman code (consider that people may be using the PyPI wheels) to accommodate those when we are already putting the name in the dtb.
I do want some standardization to the U-Boot build outputs though, but more like a global
binman.dtswith like u-boot.rom, u-boot-sdmmc.img images with well-defined TPL, SPL, U-Boot sections that arch-dtsi files can fill in.Quoted 9 lines
Quoted 3 lines
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs
Agreed
Quoted 2 lines
, and the
Makefileshould default to O=build to achieve the "output dir". I'm not sure if that's going to happen.Quoted 7 lines
Quoted 3 lines
I would quite like the 'non-output' file (i.e. things that are not a binman image) to appear in a 'binman-work' subdir of the output dir. What do you think?
I'd prefer them to go in a
tempfile.TemporaryDirectory()and discarded at the end of a binman run, and a "--tmpdir <path>" option to use a given directory instead and preserve things for debugging.Actually, that was the original purpose of the output directory in the u_boot_pylib.tools module. But with all the files binman creates, that has been lost. I think we should restore that purpose (with an output dir as a temp dir) and then I think what you have written here will work.
Quoted 7 lines
Quoted 2 lines
Just please note the rest of the feedback that's been given to this series too.
Yes. It is a bit hard to know what to do. I suppose we need binman to publish a list of the image files it writes, so buildman can use that to save them. Or we could just add some more special cases to the rule in buildman?
Extend the list of files that we do keep today, so that at least more cases could work, set aside the "everything else is an error" notion for now.
Signature · 1 line
Tom
Hi Tom,
Quoted 81 lines · Tom Rini
Quoted 79 lines · Simon Glass
Hi Tom,
Quoted 75 lines · Tom Rini
Quoted 65 lines · Simon Glass
Hi Alper,
Quoted 54 lines · Alper Nebi Yasak
Quoted 27 lines · Simon Glass
Hi Alper,
Quoted 17 lines · Alper Nebi Yasak
Quoted 15 lines · Simon Glass
In this early stage of using binman to produce output files, we are mostly seeing people using common extensions such as '.bin' and '.rom'
But unusual extensions appear in some places.
We would like 'buildman -k' to keep the build outputs, but this is hard if there is no consistency as to the extension used.
This series adjusts binman to enforce just 4 extensions for output images:
.bin
.rom
.itb
.imgQuoted 6 lines
Quoted 2 lines
Other extensions will produce an error. With this rule observed, buildman can keep the required files.
I dislike this limitation. We know what files we will generate, they are listed in binman dtb, so we can add something like
binman build --lsto print their names/paths for buildman to preserve them.Quoted 5 lines
Yes, it would be good to have that...
But why do you dislike the limitation? Do you think extensions provide useful information? I suppose one problem is that *.bin might pick up private blobs that happen to be in the source directory?
I guess my strongest argument is that people already/will have workflows that depend on certain filenames or extensions, and shouldn't have to modify binman code (consider that people may be using the PyPI wheels) to accommodate those when we are already putting the name in the dtb.
I do want some standardization to the U-Boot build outputs though, but more like a global
binman.dtswith like u-boot.rom, u-boot-sdmmc.img images with well-defined TPL, SPL, U-Boot sections that arch-dtsi files can fill in.Quoted 9 lines
Quoted 3 lines
Regarding the output directory suggestion, I think the binman outputs (not temporary/intermediate files) should be in the same directory as make outputs
Agreed
Quoted 2 lines
, and the
Makefileshould default to O=build to achieve the "output dir". I'm not sure if that's going to happen.Quoted 7 lines
Quoted 3 lines
I would quite like the 'non-output' file (i.e. things that are not a binman image) to appear in a 'binman-work' subdir of the output dir. What do you think?
I'd prefer them to go in a
tempfile.TemporaryDirectory()and discarded at the end of a binman run, and a "--tmpdir <path>" option to use a given directory instead and preserve things for debugging.Quoted 5 lines
Actually, that was the original purpose of the output directory in the u_boot_pylib.tools module. But with all the files binman creates, that has been lost. I think we should restore that purpose (with an output dir as a temp dir) and then I think what you have written here will work.
Just please note the rest of the feedback that's been given to this series too.
Quoted 8 lines
Quoted 4 lines
Yes. It is a bit hard to know what to do. I suppose we need binman to publish a list of the image files it writes, so buildman can use that to save them. Or we could just add some more special cases to the rule in buildman?
Extend the list of files that we do keep today, so that at least more cases could work, set aside the "everything else is an error" notion for now.
OK got it, thanks.
- Simon