summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2023-07-24buildman: Add a test for Boards.output_is_new()Simon Glass
Add a test for this code, adjusting the timestamp on various files to check each use case. Signed-off-by: Simon Glass <[email protected]>
2023-07-24buildman: Add a test for Boards.scan_defconfigs()Simon Glass
Add a test for this code. It requires some defconfig files and a test Kconfig to work with, so copy these into the temporary directory at the start. Signed-off-by: Simon Glass <[email protected]>
2023-07-24buildman: Avoid globals in leaf functionsSimon Glass
Rather than using the global thoughout each function, pass in these values. This allows tests to use different values when testing the same functions. Improve a few comments while we are here. No functional change is intended. Signed-off-by: Simon Glass <[email protected]>
2023-07-24buildman: Drop dead code to handle :CONFIG_ constructSimon Glass
This is not needed anymore, so drop it. Signed-off-by: Simon Glass <[email protected]> Fixes: 252ed872 ("kconfig: remove meaningless prefixes in defconfig files")
2023-07-24buildman: Rename the ARM boardsSimon Glass
Use names consistent with their target names. Signed-off-by: Simon Glass <[email protected]>
2023-07-24buildman: Exit with the return code consistentlySimon Glass
Test should return a suitable exit code when they fail. Fix this and tidy up the code a little. Signed-off-by: Simon Glass <[email protected]>
2023-07-24buildman: Allow --debug to enable debuggingSimon Glass
The -D option is used, but plumb it through --debug to enable a full traceback when something goes wrong. Signed-off-by: Simon Glass <[email protected]>
2023-07-24buildman: Fix verboose typo and add commentSimon Glass
Fix the typo in the RunTests() function, adding comments while we are here. Signed-off-by: Simon Glass <[email protected]>
2023-07-24binman: ftest: Add test for u_boot_spl_pubkey_dtbLukas Funke
Add test for u_boot_spl_pubkey_dtb. The test adds a public key to the dtb and checks if the required nodes will be added to the images dtb. Signed-off-by: Lukas Funke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: doc: Add documentation for Xilinx Bootgen bintoolLukas Funke
Add documentation for the 'bootgen' bintool Signed-off-by: Lukas Funke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: etype: Add u-boot-spl-pubkey-dtb etypeLukas Funke
This adds a new etype 'u-boot-spl-pubkey-dtb'. The etype adds the public key from a certificate to the dtb. This creates a '/signature' node which is turn contains the fields which make up the public key. Usually this is done by 'mkimage -K'. However, 'binman sign' does not add the public key to the SPL. This is why the pubkey is added using this etype. The etype calls the underlying 'fdt_add_pubkey' tool. Signed-off-by: Lukas Funke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: btool: Add fdt_add_pubkey as btoolLukas Funke
Add btool which calls 'fdt_add_pubkey' Signed-off-by: Lukas Funke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: doc: Add documentation for fdt_add_pubkey bintoolLukas Funke
Add documentation for btool which calls 'fdt_add_pubkey' Signed-off-by: Lukas Funke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: blob_dtb: Add fake_size argument to ObtainContents()Lukas Funke
The method 'connect_contents_to_file()' calls ObtainsContents() with 'fake_size' argument. Without providing the argument in the blob_dtb we are not able to call this method without error. Signed-off-by: Lukas Funke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: Don't decompress data while signingLukas Funke
While signing a fit compressed data (i.e. 'blob-ext') is decompressed, but never compressed again. When compressed data was wrapped in a section, decompression leads to an error because the outer section had the original compressed size but the inner entry has the uncompressed size now. While singing there is no reason to decompress data. Thus, decompression should be disabled. Furthermore, bintools should be collected before loading the data. This way bintools are available if processing is required on a node. Signed-off-by: Lukas Funke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: Add tests for etype encryptedChristian Taedcke
Add tests to reach 100% code coverage for the added etype encrypted. Signed-off-by: Christian Taedcke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: Allow cipher node as special sectionChristian Taedcke
The new encrypted etype generates a cipher node in the device tree that should not be evaluated by binman, but still be kept in the output device tree. Signed-off-by: Christian Taedcke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: Add support for externally encrypted blobsChristian Taedcke
This adds a new etype encrypted. It creates a new cipher node in the related image similar to the cipher node used by u-boot, see boot/image-cipher.c. Signed-off-by: Christian Taedcke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-24binman: Add missing ssl documentationSimon Glass
Rerun 'binman bintool-docs' to regenerate bintools.rst Signed-off-by: Simon Glass <[email protected]>
2023-07-24binman: Renumber 277...289 TI test filesSimon Glass
These have ended up with the same numbers as earlier files. Fix them. Signed-off-by: Simon Glass <[email protected]>
2023-07-24binman: Renumber 277_rockchip and 278_mkimage test filesSimon Glass
These have ended up with the same numbers as earlier files. Fix them. Signed-off-by: Simon Glass <[email protected]>
2023-07-24binman: Tidy up tests for pre-load entry typeSimon Glass
Drop the use of a numbered key file since numbering is just for the test devicetree files. Also adjust the tests to avoid putting a hard-coded path to binman in the file, using the entry arg instead. Signed-off-by: Simon Glass <[email protected]>
2023-07-21buildman: Create a requirements.txt fileTom Rini
At this point, buildman requires a few different modules and so we need a requirements.txt to track what modules are needed. Cc: Simon Glass <[email protected]> Cc: Neha Malcom Francis <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2023-07-21binman: Overwrite symlink if it already existsAndrew Davis
Without this re-building will fail with an error when trying to create the symlink for the second time with an already exists error. Signed-off-by: Andrew Davis <[email protected]> [[email protected]: Added support for test output dir and testcase] Signed-off-by: Neha Malcom Francis <[email protected]>
2023-07-21k3: tools: config.mk: Update makefile and remove scriptsNeha Malcom Francis
Since binman is used to package bootloader images for all K3 devices, we do not have to rely on the earlier methods to package them. Scripts that were used to generate x509 certificate for tiboot3.bin and generate tispl.bin, u-boot.img have been removed. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2023-07-21binman: ti-secure: Add support for TI signingNeha Malcom Francis
The ti-secure entry contains certificate for binaries that will be loaded or booted by system firmware whereas the ti-secure-rom entry contains certificate for binaries that will be booted by ROM. Support for both these types of certificates is necessary for booting of K3 devices. Reviewed-by: Simon Glass <[email protected]> [[email protected]: fixed inconsist cert generation by multiple packing] Signed-off-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2023-07-21binman: ti-board-config: Add support for TI board config binariesNeha Malcom Francis
The ti-board-config entry loads and validates a given YAML config file against a given schema, and generates the board config binary. K3 devices require these binaries to be packed into the final system firmware images. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2023-07-21Merge tag 'xilinx-for-v2023.10-rc1-v2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2023.10-rc1 v2 axi_emac: - Change return value if RX packet is not ready cadence_qspi: - Enable flash reset for Versal NET dt: - Various DT syncups with Linux kernel - SOM - reserved pmufw memory location fpga: - Add load event mtd: - Add missing dependency for FLASH_CFI_MTD spi/nand: - Minor cleanup in Xilinx drivers versal-net: - Prioritize boot device in boot_targets - Wire mini ospi/qspi/emmc configurations watchdog: - Use new versal-wwdt property xilinx: - fix sparse warnings in various places ps7_init* - add missing headers - consolidate code around zynqmp_mmio_read/write - switch to amd.com email zynqmp_clk: - Add handling for gem rx/tsu clocks zynq_gem: - Configure mdio clock at run time zynq: - Enable fdt overlay support zynq_sdhci: - Call dll reset only for ZynqMP SOCs
2023-07-21arm64: zynqmp: Switch to amd.com emailsMichal Simek
Update my and DPs email address to match current setup. Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/aba5b19b9c5a95608829e86ad5cc4671c940f1bb.1688992543.git.michal.simek@amd.com
2023-07-20Merge tag 'dm-pull-20jul23' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dm binman mkimage and template enhancements misc fixes
2023-07-20binman: Reduce state.SetInt and bintool cmd to debug levelSimon Glass
These are not very important message. Change them to use the 'debug' level instead of 'detail'. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Support writing symbols inside a mkimage imageSimon Glass
Add support for writing symbols and determining the assumed position of binaries inside a mkimage image. This is useful as an example for other entry types which might want to do the same thing. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Support templates at any levelSimon Glass
Allow templates to be used inside a section, not just in the top-level /binman node. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Add a test for templating in a FITSimon Glass
Add this as a separate test case. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Support templating with multiple imagesSimon Glass
Allow a template to appear in the top level description when using multiple images. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Support simple templatesSimon Glass
Collections can used to collect the contents of other entries into a single entry, but they result in a single entry, with the original entries 'left behind' in their old place. It is useful to be able to specific a set of entries ones and have it used in multiple images, or parts of an image. Implement this mechanism. Signed-off-by: Simon Glass <[email protected]>
2023-07-20dtoc: Allow inserting a list of nodes into anotherSimon Glass
Provide a way to specify a phandle list of nodes which are to be inserted into an existing node. Signed-off-by: Simon Glass <[email protected]>
2023-07-20dtoc: Support copying the contents of a node into anotherSimon Glass
This permits implementation of a simple templating system, where a node can be reused as a base for others. For now this adds new subnodes after any existing ones. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Correct handling of zero bss sizeSimon Glass
Fix the check for the __bss_size symbol, since it may be 0. Unfortunately there was no test coverage for this. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Drop __bss_size variable in bss_data.cSimon Glass
This is not needed since the linker script sets it up. Drop the variable to avoid confusion. Fix the prototype for main() while we are here. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Provide a way to specify the fdt-list directlySimon Glass
Sometimes multiple boards are built with binman and it is useful to specify a different FDT list for each. At present this is not possible without providing multiple values of the of-list entryarg (which is not supported in the U-Boot build system). Allow a fit,fdt-list-val string-list property to be used instead. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Convert mkimage to Entry_sectionMarek Vasut
This is needed to handle mkimage with inner section located itself in a section. Signed-off-by: Marek Vasut <[email protected]> Use BuildSectionData() instead of ObtainContents(), add tests and a few other minor fixes: Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Add more detail on how ObtainContents() worksSimon Glass
This area of binman can be a bit confusing. Add some more comments to help. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Update elf to return number of written symbolsSimon Glass
Update the LookupAndWriteSymbols() function to return the number of symbols written. Also add some logging for when debugging is not enabled. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Allow disabling symbol writingSimon Glass
Some boards don't use symbol writing but do access the symbols in SPL. Provide an option to work around this. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Read _multiple_data_files in the correct placeSimon Glass
Move this to the ReadEntries() function where it belongs. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Use GetEntries() to obtain section contentsSimon Glass
Some section types don't have a simple _entries list. Use the GetEntries() method in GetEntryContents() and other places to handle this. This makes the behaviour more consistent. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Init align_default in entry_SectionSimon Glass
This should be set up in the init function, to avoid a warning about a property not set up there. Fix it. Signed-off-by: Simon Glass <[email protected]>
2023-07-20tools: Fix package discovery in pyproject.toml of u_boot_pylib.Maxim Cournoyer
When building from source, setuptools would complain about not finding package via its auto-discovery mechanism. Manually specify how to locate the files, relative to the package's directory. * tools/u_boot_pylib/pyproject.toml: New tool.setuptools.packages.find section. Signed-off-by: Maxim Cournoyer <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-07-20tools: Fix README file in pyproject.toml of u_boot_pylib.Maxim Cournoyer
* tools/u_boot_pylib/pyproject.toml (readme): Replace README.md with README.rst. Signed-off-by: Maxim Cournoyer <[email protected]> Reviewed-by: Simon Glass <[email protected]>