summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2023-02-21buildman: 'Thread' object has no attribute 'isAlive'Heinrich Schuchardt
The isAlive() method was deprecated in Python 3.8 and has been removed in Python 3.9. See https://bugs.python.org/issue37804. Use is_alive() instead. Since Python 2.6 is_alive() has been a synonym for isAlive(). So there should be no problems for users using elder Python 3 versions. Upstream-Status: Backport [fd434f47d4d008d41f4ee2fe5cb94791f780395c] Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-15tools/fdtgrep: Fix symbol table inclusion logicRoger Quadros
Without including the <linux/kconfig.h> file, the symbol CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY will not be visible and we will never include the symbol table. So include <linux/kconfig.h> Due to some reason it needs to be included after [#include "fdt_host.h"] otherwise it causes a build error. This fixes boot on AM64 board with NAND expansion card. Fixes: 4950bb272ab7 ("tools/fdtgrep: fix symbol table, depends on SPL overlay support" Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-06-24tools/fdtgrep: fix symbol table, depends on SPL overlay supportKevin Hilman
Loading of symbol table depends on DT Overlay support in SPL so make it compile-time dependent. Without this fix, SPL fails to boot some platforms where this feature is not enabled (e.g. dra71-evm.) Fixes: LCPD-27102 Fixes: 7471fdf830f4 ("tools/fdtgrep: Include __symbols__ table") Suggested-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Acked-by: Roger Quadros <rogerq@kernel.org>
2022-02-18tools/fdtgrep: Include __symbols__ tableRoger Quadros
This is required for overlays to work at SPL. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18tools: binman: add ti-secure entry typeRoger Quadros
This entry type is used to create a secured binary for use with K3 High Security (HS) devices. This allows us to no longer depend on k3_fit_atf.sh for A53 SPL and u-boot image generation even for HS devices. We still depend on the availability of an external tool provided by the TI_SECURE_DEV_PKG environment variable to secure the binaries. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18tools: binman: Rename atf-bl32 to tee-osRoger Quadros
tee-os is a more appropriate name for OP-TEE binary. Fixes: dd0bb6313c97 ("binman: Add support for TEE BL32") Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02binman: Add support for TEE BL32Roger Quadros
Add an entry for OP-TEE Trusted OS 'BL32' payload. This is required by platforms using Cortex-A cores with TrustZone technology. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2021-11-17k3_gen_x509_cert: Make SWRV configurable for anti-rollback protectionYogesh Siraswar
The x509 certificate SWRV is currently hard-coded to 0. This need to be updated to 1 for j721e 1.1, j7200 and am64x. It is don't care for other k3 devices. Added new config K3_X509_SWRV to k3. Default is set to 1. Signed-off-by: Yogesh Siraswar <yogeshs@ti.com> Reviewed-by: Dave Gerlach <d-gerlach@ti.com>
2021-11-11tools: k3_fit_atf: Fix DM binary FIT load addressesSuman Anna
commit 7d67334dfe9ce6a9f5ef3e9b95dd87ef482002b0 upstream. The DM binary runs on the MCU R5F Core0 after R5 SPL on J721E and J7200 SoCs. The binary is built alongside the TFA, OPTEE and A72 SPL binaries and included in the tispl.bin FIT image. The R5 SPL loads the DM binary at 0xA0000000 address, based on the value used in the FIT image build script. The DM binary though is an ELF image and not a regular binary file, and so is processed further to load the actual program segments using the U-Boot's standard ELF loader library. The DM binary does leverage a certain portion of DDR for its program segments, and typically reserves 16 MB of DDR at 0xA0000000 with the 1st MB used for IPC between Linux and the remote processor, and remaining memory for firmware segments. This can cause an incomplete loading of the program segments if the DM binary is larger than 1 MB, due to overlap of the initial loaded binary and the actual program segments. Fix this by using the address 0x89000000, which matches the current "addr_mcur5f0_0load" env variable used by R5 SPL before the DM firmware inclusion into the tispl.bin. Fixes: df5363a67f35 ("tools: k3_fit_atf: add DM binary to the FIT image") Signed-off-by: Suman Anna <s-anna@ti.com> Fixes: ad49cdb4feb4 ("tools: k3_fit_atf: add DM binary to the FIT image") [s-anna@ti.com: cherry-pick commit '468ec2f3ef8f' from v2021.10-rc4] Tested-by: Lucas Weaver <l-weaver@ti.com>
2021-06-06tools: k3_fit_atf: Add support for providing ATF load address using a ↵Aswath Govindraju
Kconfig symbol Add support for providing ATF load address with a Kconfig symbol. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Reviewed-by: Suman Anna <s-anna@ti.com>
2021-03-23tools: k3_fit_atf: add DM binary to the FIT imageTero Kristo
Add DM (device manager) firmware image to the fit image that is loaded by R5 SPL. This is needed with the HSM rearch where the firmware allocation has been changed slightly. Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-12-20tools: add a simple script to generate EFI variablesPaulo Alcantara
This script generates EFI variables for U-Boot variable store format. A few examples: - Generating secure boot keys $ openssl req -x509 -sha256 -newkey rsa:2048 -subj /CN=TEST_PK/ \ -keyout PK.key -out PK.crt -nodes -days 365 $ efisiglist -a -c PK.crt -o foo.esl $ tools/efivar.py set -i ubootefi.var -n db -d foo.esl -t file $ tools/efivar.py set -i ubootefi.var -n kek -d foo.esl -t file $ tools/efivar.py set -i ubootefi.var -n pk -d foo.esl -t file - Printing out variables $ tools/efivar.py set -i ubootefi.var -n var1 -d foo -t str $ tools/efivar.py set -i ubootefi.var -n var2 -d bar -t str $ tools/efivar.py print -i ubootefi.var var1: 8be4df61-93ca-11d2-aa0d-00e098032b8c EFI_GLOBAL_VARIABLE_GUID NV|BS|RT, DataSize = 0x3 0000000000: 66 6F 6F foo var2: 8be4df61-93ca-11d2-aa0d-00e098032b8c EFI_GLOBAL_VARIABLE_GUID NV|BS|RT, DataSize = 0x3 0000000000: 62 61 72 bar - Removing variables $ tools/efivar.py del -i ubootefi.var -n var1 $ tools/efivar.py set -i ubootefi.var -n var1 -a nv,bs -d foo -t str $ tools/efivar.py print -i ubootefi.var -n var1 var1: 8be4df61-93ca-11d2-aa0d-00e098032b8c EFI_GLOBAL_VARIABLE_GUID NV|BS, DataSize = 0x3 0000000000: 66 6F 6F foo $ tools/efivar.py del -i ubootefi.var -n var1 err: attributes don't match $ tools/efivar.py del -i ubootefi.var -n var1 -a nv,bs $ tools/efivar.py print -i ubootefi.var -n var1 err: variable not found Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Correct examples in commit message. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-12-02Merge tag 'dm-pull-30nov20' of git://git.denx.de/u-boot-dmTom Rini
Minor bugfixes
2020-11-30binman: Handle tool paths containing '~' correctlySimon Glass
At present if CROSS_COMPILE contains a tilde, such as ~/.buildman-toolchains/gcc-7.3.0-nolibc/i386-linux/bin/i386-linux-gcc then binman gives a confusing error: binman: Error 255 running '~/..buildman-toolchains/gcc-7.3.0- ... Fix this by expanding it out before running the tool. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-30mips: octeon: tools: Add update_octeon_header toolStefan Roese
Add a tool to update or insert an Octeon specific header into the U-Boot image. This is needed e.g. for booting via SPI NOR, eMMC and NAND. While working on this, move enum cvmx_board_types_enum and cvmx_board_type_to_string() to cvmx-bootloader.h and remove the unreferenced (unsupported) board definition. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Aaron Williams <awilliams@marvell.com> Cc: Chandrakala Chavva <cchavva@marvell.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2020-11-19tools: dumpimage: Remove remaining mentions of the -i optionTyler Hicks
The -i option of the dumpimage tool has been removed so it should no longer be documented in the README file. Refer readers to the tool's help output rather than maintain a copy of the usage in the README. Finally, adjust the example dumpfile invocation in imagetool.h to use the -o option instead of the removed -i option. Fixes: 12b831879a76 ("tools: dumpimage: Simplify arguments") Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com> Cc: Martyn Welch <martyn.welch@collabora.com> Acked-by: Martyn Welch <martyn.welch@collabora.com>
2020-11-19tools: image-host.c: use correct variable for strerrnoPhilippe Reynes
In the function get_random_data, strerrno is called with the variable ret (which is the return of the function clock_gettime). It should be called with errnor. This commit fixes this mistake. Reported-by: Coverity (CID: 312956) Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-19tools: image-host.c: use random instead of randPhilippe Reynes
According to the manpage of rand, it is recommended to use random instead of rand. This commit updates the function get_random_data to use random. Reported-by: Coverity (CID: 312953) Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-14patman: Add a Series-patchwork-url optionSimon Glass
Add a commit tag to allow the Patchwork URL to be specified in a commit. This can be handy for when you submit code to multiple projects but don't want to use the -p option. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-14patman: Add a setting for the Patchwork URLSimon Glass
Add an argument to allow specifying the the patchwork URL. This also adds this feature to the settings file, either globally, or on a per-project basis. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-14patman: Allow specifying the patchwork URLSimon Glass
Add a new argument to allow the URL of the patchwork server to be speciified. For now this is hard-coded in the main file, but future patches will move it to the settings file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-14patman: Update defaults in subparsersSimon Glass
At present values from the settings file are only applied to the main parser. With the new parser structure this means that some settings are ignored. Update the implementation to set defaults across the main parser and all subparsers. Also fix up the comments, since ArgumentParser is being used now. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-14patman: Correct Change-Ids error message argsSimon Glass
The arguments of this error are incorrectly formatted. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-14patman: Refactor how the default subcommand worksSimon Glass
At present patman tries to assume a default subcommand of 'send', to maintain backwards compatibility. However it does not cope with arguments added to the default command, so for example 'patman -t' does not work. Update the logic to handle this. Also update the CC command to use 'send' explicitly, since otherwise patman gets confused with the patch-filename argument. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Support listing comments from patchworkSimon Glass
While reviewing feedback it is helpful to see the review comments on the command line to check that each has been addressed. Add an option to support that. Update the workflow documentation to describe the new features. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Support parsing of review snippetsSimon Glass
Add support for parsing the contents of a patchwork 'patch' web page containing comments received from reviewers. This allows patman to show these comments in a simple 'snippets' format. A snippet is some quoted code plus some unquoted comments below it. Each review is from a unique person/email and can produce multiple snippets, one for each part of the code that attracts a comment. Show the file and line-number info at the top of each snippet if available. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Support updating a branch with review tagsSimon Glass
It is tedious to add review tags into the local branch and errors can sometimes be made. Add an option to create a new branch with the review tags obtained from patchwork. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Support checking for review tags in patchworkSimon Glass
Before sending out a new version of a series for review, it is important to add any review tags (e.g. Reviewed-by, Acked-by) collected by patchwork. Otherwise people waste time reviewing the same patch repeatedly, become frustrated and stop reviewing your patches. To help with this, add a new 'status' subcommand that checks patchwork for review tags, showing those which are not present in the local branch. This allows users to see what new review tags have been received and then add them. Sample output: $ patman status 1 Subject 1 Reviewed-by: Joe Bloggs <joe@napierwallies.co.nz> 2 Subject 2 Tested-by: Lord Edmund Blackaddër <weasel@blackadder.org> Reviewed-by: Fred Bloggs <f.bloggs@napier.net> + Reviewed-by: Mary Bloggs <mary@napierwallies.co.nz> 1 new response available in patchwork The '+' indicates a new tag. Colours are used to make it easier to read. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Detect missing upstream in CountCommitsToBranchSimon Glass
At present if we fail to find the upstream then the error output is piped to wc, resulting in bogus results. Avoid the pipe and check the output directly. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Improve handling of filesSimon Glass
Sometimes warnings are associated with a file and sometimes with the patch as a whole. Update the regular expression to handle both cases, even in emacs mode. Also add support for detecting new files. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Allow showing a Commit as a stringSimon Glass
Use the subject of the Commit object when printing it out. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Don't ignore lines starting with hashSimon Glass
These lines can indicate a continuation of an error and should not be ignored. Fix this. Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code") Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix spelling of plural for warningSimon Glass
Tidy up the extra 's' when there is only a single warning. Fix the empty print statement also. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Convert testBasic() to use an interatorSimon Glass
On balance it is easier to use an iterator here, particularly if we need to insert lines due to new functionality. The only niggle is the need to keep the previous iterator value around in one case. Convert this test to use iter(). Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Add some tests for warningsSimon Glass
Add tests that check that warnings are generated when expected. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Add a test for PatchStream tagsSimon Glass
The current functional tests run most of patman. Add a smaller test that just checks tag handling with the PatchStream class. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Drop unused signoff memberSimon Glass
This is not used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Convert 'Series-xxx' tag errors into warningsSimon Glass
If the Series-xxx tag is not recognised patman currently reports a fatal error. This is inconvenient if a new feature is later added to patman that an earlier version does not support. Report a warning instead, to allow the user to take action if needed, but still allow operation to proceed. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Attach warnings to individual patchesSimon Glass
At present warnings are produced across the whole set of patches when parsing them. It is more useful to associate each warning with the patch (or commit) that generated it. Attach warnings to the Commit object and move them out of PatchStream. Also avoid generating duplicate warnings for the same commit. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Move warning collection to a functionSimon Glass
Add a new function in PatchStream to collect the warnings generated while parsing the stream. This will allow us to adjust the logic, such as dealing with per-commit warnings. Two of the warnings are in fact internal errors, so change them to raise and exception. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix up argument/return docs in patchstreamSimon Glass
Add missing documentation and type information. Fix up some missing docs on exceptions also. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Drop unused args in patchstreamSimon Glass
Drop a few arguments that are not used in functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Rename variables in patchstreamSimon Glass
Some variables are too short or shadow other variables or types. Fix these to keep pylint3 happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Rename functions in patchstreamSimon Glass
Rename these functions to lower case as per PEP8. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix constant style in patchstreamSimon Glass
These constants should use upper case. Update them to keep pylint3 happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix indenting in patchstreamSimon Glass
Update the indenting to keep pylint3 happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Allow linking a series with patchworkSimon Glass
Add a new Series-links tag to tell patman how to find the series in patchwork. Each item is the series ID optionally preceded by the series version that the link refers to. An empty version indicates this is the latest series. For example: Series-links: 209816 1:203302 Documentation is added in a later patch. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix remaining pylint3 warnings in func_testSimon Glass
This fixes all but the ones about too many variables/statements. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Use capture_sys_output() consistentlySimon Glass
One test still uses its own function for capturing output. Modify it to use the standard one in test_util Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix whitespace errors in func_testSimon Glass
Fix up various indentation and other minor things to make pylint3 happier. Signed-off-by: Simon Glass <sjg@chromium.org>