summaryrefslogtreecommitdiff
path: root/tools/binman
AgeCommit message (Collapse)Author
2024-08-05binman: Keep the efi_capsule input fileSimon Glass
There is no need to remove input files. It makes it harder to diagnose failures. Keep the payload file. There is no test for this condition, but one could be added. Signed-off-by: Simon Glass <[email protected]> Acked-by: Sughosh Ganu <[email protected]>
2024-08-05binman: Deal with mkeficapsule being missingSimon Glass
Tools cannot be assumed to be present. Add a check for this with the mkeficpasule tool. Signed-off-by: Simon Glass <[email protected]> Fixes: b617611b27a ("binman: capsule: Add support for generating...")
2024-08-05binman: Collect the version number for mkeficapsuleSimon Glass
Now that this tool has a version number, collect it. Signed-off-by: Simon Glass <[email protected]>
2024-07-29Makefile: Pass OF_SPL_REMOVE_PROPS to binmanSimon Glass
Pass CONFIG_OF_SPL_REMOVE_PROPS to binman so that it can remove properties correctly when producing FITs for SPL phases. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: fit: Allow running fdtgrep on devicetree blobsSimon Glass
When using FIT to load firmware builds for multiple models, the FIT must include a common binary along with a number of devicetree blobs, one for each model. This is the same mechanism as is used for loading an OS. However, SPL builds do not normally use the full devicetree, but instead a cut-down version which various nodes and properties removed. Add a new fit,fdt-phase property to allow binman to produce these devicetree blobs. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: fit: Write the compatible string to configurationSimon Glass
FIT allows the FDT's root-node compatible string to be placed in a configuration node to simplify and speed up finding the best match for booting. Add a new property to support this. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: fit: Allow providing FDT filenames in a directorySimon Glass
In some cases the list of available FDT files is not available in an entryarg. Provide an option to point to a directory containing them instead. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Add support for alternative FDTsSimon Glass
FIT provides a way to select between different devicetree blobs depending on the model. This works fine for U-Boot proper and allows SPL to select the correct blob for the current board at runtime. The boot sequence (SPL->U-Boot proper) is therefore covered by the existing feature set. The first boot phase (typically TPL) cannot use FIT since SoC boot ROMs don't currently support it. Therefore the TPL image must be specific to each model it boots on. To support booting on mulitple models, binman must therefore produce a separate TPL image for each model, even if the images for the rest of the phases are identical. TPL needs to be packaged as an executable binary along with a reduced devicetree. When multiple models are supported, a reduced devicetree must be provided for each model. U-Boot's build system is designed to build a single devicetree for SPL builds, so does not support this requirement. Add a new 'alternatives' feature to Binman, allowing it to automatically subset a devicetree to produce the reduced devicetree for a particular phase for each supported model. With this it is possible to produce a separate TPL image for each of the models. The correct one can then be loaded onto a board, along with the common FIT image(s). Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Allow entry types to override FDT contentsSimon Glass
At present the contents of an FDT (for each phase) are fixed, determined by the build and provided to Binman as input files. Provide a means for entry types to provide their own FDT, so that it can be processed, if needed. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Remove dependency on pylibfdt for entry-docsSimon Glass
Allow the entry-docs command to operate even if pylibfdt is not present in the systemn. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Add a bintool for fdtgrepSimon Glass
Binman needs the ability to run fdtgrep to prepare devicetree subsets for use by SPL and TPL. Add a new bintool in preparation for this. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Correct indentation in testSplPubkeyDtbSimon Glass
This function has strange indentation. Fix it. Fixes: 8c1fbd1f607 ("binman: ftest: Add test for u_boot_spl_pubkey_dtb") Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Fix a comment typo in _DoReadFileDtb()Simon Glass
Fix a minor typo in this function. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Mention expanded entries in u-boot-vplSimon Glass
Add a comment about this entry type being expanded, to match the comment for SPL and TPL. Drop an unwanted line in the SPL and TPL docs while here. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Correct comment in blob_dtb GetFdtEtype()Simon Glass
The filenames are a bit confused. Fix them. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Write the compressed output to a fileSimon Glass
When an entry is compressed, write the compressed contents to a file so that it is possible to see what was produced. This aids debugging with new images. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: elf: Add more debugging to LookupAndWriteSymbols()Simon Glass
When symbol-writing does not appear to work, it can sometimes be hard to figure out what is going on. Add some more debugging to help. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Move problem-checking code into a functionSimon Glass
This has become quite long, so move it into a separate function. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Tidy up comment for Bintoolfdt_add_pubkey.run()Simon Glass
This function returns a value, so add documentation for it. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Tidy up bintool docsSimon Glass
The docs have somehow got out of sync. Regenerate the file to fix the problem. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Correct an error in the FIT-template exampleSimon Glass
The example contains references to an non-existent node. Fix it. Signed-off-by: Simon Glass <[email protected]>
2024-07-26binman: Update cbfstoolSimon Glass
Update to a newer version of this tool, 4.22.01. This runs OK with the current binman tests and matches the one in CI. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-07-03binman: Make Intel ME default to position 0x1000Simon Glass
This cannot ever go at offset 0 since the descriptor is there. Use a better offset for the ME, as used by link and coral, for example. This matters when we start using assumed sizes for missing blobs. Signed-off-by: Simon Glass <[email protected]>
2024-07-03binman: Support an assumed size for missing binariesSimon Glass
Binman has a the useful feature of handling missing external blobs gracefully, including allowing them to be missing, deciding whether the resulting image is functional or not and faking blobs when this is necessary for particular tools (e.g. mkimage). This feature is widely used in CI. One drawback is that if U-Boot grows too large to fit along with the required blobs, then this is not discovered until someone does a 'real' build which includes the blobs. Add a 'assume-size' property to entries to allow Binman to reserve a given size for missing external blobs. Signed-off-by: Simon Glass <[email protected]>
2024-07-03binman: Update the entrydocs headerSimon Glass
Reduce the length of the underline for this header, to match the heading itself. Signed-off-by: Simon Glass <[email protected]>
2024-07-03binman: ti: Regenerate entry docsSimon Glass
Correct formatting errors in the documentation. Regenerate the entries.rst file to include this recent addition. Signed-off-by: Simon Glass <[email protected]>
2024-07-03binman: Regenerate nxp docsSimon Glass
Regenerate the entries.rst file to include this recent addition. Note that more docs are needed here, to actually describe the entry type. Note also that the entry type needs Binman tests added. Signed-off-by: Simon Glass <[email protected]>
2024-07-03binman: efi: Correct entry docsSimon Glass
Somehow the class documentation has got out of sync with the generated entries.rst file. Regenerating it causes errors, so correct these and regenerate the entries.rst file. Signed-off-by: Simon Glass <[email protected]> Fixes: 809f28e7213 ("binman: capsule: Use dumped capsule header...")
2024-07-03tools: binman: fix deprecated Python unittest methodsBrandon Maier
The methods `unittest.assertEquals()` and `unittest.assertRegexpMatches()` are marked deprecated[1]. In Python 3.12 these aliases have been removed, so do a sed to replace them with their new names. [1] https://docs.python.org/3.11/library/unittest.html#deprecated-aliases Signed-off-by: Brandon Maier <[email protected]> CC: Simon Glass <[email protected]> CC: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-05-24binman: Add nxp_imx8mcst etype for i.MX8M flash.bin signingMarek Vasut
Add new binman etype which allows signing both the SPL and fitImage sections of i.MX8M flash.bin using CST. There are multiple DT properties which govern the signing process, nxp,loader-address is the only mandatory one which sets the SPL signature start address without the imx8mimage header, this should be SPL text base. The key material can be configured using optional DT properties nxp,srk-table, nxp,csf-crt, nxp,img-crt, all of which default the key material names generated by CST tool scripts. The nxp,unlock property can be used to unlock CAAM access in SPL section. Reviewed-by: Tim Harvey <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2024-05-03binman: Fix typo in mkimage etype descriptionMarek Vasut
Fix a typo, no functional change. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2024-04-28binman: Add nxp_imx8mimage etypeMarek Vasut
Add new binman etype derived from mkimage etype which generates configuration input file for mkimage -T imx8mimage, and runs the mkimage on input data. The mkimage -T imx8mimage is used to generate combined image with SPL and DDR PHY blobs which is bootable on i.MX8M. The configuration file generated here is equivalent of imx8mimage.cfg, which is the file passed to '$ mkimage -T imx8mimage -n imx8mimage.cfg ...' . The settings generated into the imx8mimage.cfg file are configured via supported binman DT properties, nxp,boot-from, nxp,loader-address, nxp,rom-version. Signed-off-by: Marek Vasut <[email protected]>
2024-04-11tools: binman: ti_board_cfg: improve error messageMichael Walle
When there is a lint error the user gets the following cryptic message: binman: Node '/path/to/some/node': Yamllint error: 18: comments This isn't very helpful. Improve the message to tell the user that the number is actually a line number and also tell the user in which file they have to look. Signed-off-by: Michael Walle <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]>
2024-04-11binman: ti-secure: Enable debug extension for combined bootManorit Chawdhry
To debug using jtag, ROM needs to unlock jtag debugging on HS devices and it does that looking at this debug extension. Add the debug extension and enable it by default. Link: https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/security/sec_cert_format.html?highlight=debug#sysfw-debug-ext Signed-off-by: Manorit Chawdhry <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]>
2024-01-18tools: binman: ti_board_cfg: Check for linting problemsNeha Malcom Francis
Use yamllint for checking whether YAML configuration files are adhering to default yamllint rules. Signed-off-by: Neha Malcom Francis <[email protected]> Suggested-by: Nishanth Menon <[email protected]>
2024-01-04Merge patch series "ATF and OP-TEE Firewalling for K3 devices."Tom Rini
Manorit Chawdhry <[email protected]> says: K3 devices have firewalls that are used to prevent illegal accesses to memory regions that are deemed secure. The series prevents the illegal accesses to ATF and OP-TEE regions that are present in different K3 devices. AM62X, AM62AX and AM64X are currently in hold due to some firewall configurations that our System Controller (TIFS) needs to handle. The devices that are not configured with the firewalling nodes will not be affected and can continue to work fine until the firewall nodes are added so will be a non-blocking merge. Test Logs: https://gist.github.com/manorit2001/4cead2fb3a19eb5d19005b3f54682627 CICD Run: https://github.com/u-boot/u-boot/pull/442
2024-01-04binman: ftest: Add test for ti-secure firewall nodeManorit Chawdhry
Add test for TI firewalling node in ti-secure. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Manorit Chawdhry <[email protected]>
2024-01-04binman: ti-secure: Add support for firewalling entitiesManorit Chawdhry
We can now firewall entities while loading them through our secure entity TIFS, the required information should be present in the certificate that is being parsed by TIFS. The following commit adds the support to enable the certificates to be generated if the firewall configurations are present in the binman dtsi nodes. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Manorit Chawdhry <[email protected]>
2023-12-31binman: used-before-assignment in ftest.pyHeinrich Schuchardt
Pytest 7.4.3 complains if a variable is used in a finally clause without having been initialized before the try clause. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-12-13binman: elf: Using variable 'old_val' before assignmentHeinrich Schuchardt
old_val can only be assumed initialized in the finally block if it is assigned a value before the try statement. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-12-13binman: etype: dm: Add entry type for TI DMNeha Malcom Francis
K3 devices introduces the concept of centralized power, resource and security management to System Firmware. This is to overcome challenges by the traditional approach that implements system control functions on each of the processing units. The software interface for System Firmware is split into TIFS and DM. DM (Device Manager) is responsible for resource and power management from secure and non-secure hosts. This additional binary is necessary for specific platforms' ROM boot images and is to be packaged into tispl.bin Add an entry for DM. The entry can be used for the packaging of tispl.bin by binman along with ATF and TEE. Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Andrew Davis <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-12-13binman: doc: fix typoDario Binacchi
s/use set/set/ Signed-off-by: Dario Binacchi <[email protected]> Reviewed-By: Michael Trimarchi <[email protected]>
2023-12-13tools: Move python tools to version 0.0.6Simon Glass
A new release has been done with this version, so update it. Use the version numbers in dependencies also. Signed-off-by: Simon Glass <[email protected]>
2023-12-13doc: Update documentation URLSimon Glass
Update to use the new docs.u-boot.org URL for documentation. Signed-off-by: Simon Glass <[email protected]>
2023-11-11doc: shorten overlong title underlinesHeinrich Schuchardt
Title underlines should match the length of the title. Unfortunately docutils only catches underlines that are too short. Add some missing empty lines after titles. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-11-02binman: openssl: x509: ti_secure_rom: Add support for bootcore_optsNeha Malcom Francis
According to the TRMs of K3 platform of devices, the ROM boot image format specifies a "Core Options Field" that provides the capability to set the boot core in lockstep when set to 0 or to split mode when set to 2. Add support for providing the same from the binman DTS. Also modify existing test case for ensuring future coverage. Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-11-02binman: Move stage header into a CBFS attributeSimon Glass
cbfsutil completely changed the way that stages are formatted in CBFS. Adjust the binman implementation to do the same. This mirrors commit 81dc20e744 in coreboot. Signed-off-by: Simon Glass <[email protected]>
2023-11-02binman: Rename TYPE_STAGE to TYPE_LEGACY_STAGESimon Glass
In preparation for changing how stages are stored, rename the existing stage tag. Signed-off-by: Simon Glass <[email protected]>
2023-11-02binman: Replace FILENAME_ALIGN 16 with ATTRIBUTE_ALIGN 4Simon Glass
cbfsutil changed to 4-byte alignment for filenames instead of 16. Adjust the binman implementation to do the same. This mirrors commit 5779ca718c in coreboot. Signed-off-by: Simon Glass <[email protected]>
2023-11-02binman: Ensure attributes always come last in the metadataSimon Glass
cbfsutil changed to write zero bytes instead of 0xff when a small padding must be added. Adjust the binman implementation to do the same. Drop the code which looks for an unused attribute tag, since it is not used. A future patch moves the attributes to the end of the header in any case, so no data will follow the attributes. This mirrors commit f0cc7adb2f in coreboot. Signed-off-by: Simon Glass <[email protected]>