summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2025-05-27patman: Support extra test featuresSimon Glass
Provide support for the -X flag, which preserves the working directory used by tests. Also support -N which shows captured output for tests. Finally, allow selection of a particular test to run. Signed-off-by: Simon Glass <[email protected]>
2025-05-27patman: Tidy up the start-up codeSimon Glass
Much of this was written before the other Python tools and they have evolved. Make a few updates: - Rather than calling sys.exit(), return the exit code from the control module and use it in __main__ - Set up tout as it is used in some places - We now have quite a few tests, so update the comment about that Signed-off-by: Simon Glass <[email protected]>
2025-05-27patman: Rename test_basic() in test_checkpatchSimon Glass
This currently has the same name as a test in func_test.py so it isn't possible to select one or the other with 'patman test test_basic': both are executed. Rename this one to avoid confusion. Signed-off-by: Simon Glass <[email protected]>
2025-05-27patman: Correct a stray quoteSimon Glass
A quote character was added a few years ago, but was not intended. Drop it. Signed-off-by: Simon Glass <[email protected]>
2025-05-27tools: Plumb in capture controlSimon Glass
Add control of capturing output into u_boot_pylib and the tools which use it. Signed-off-by: Simon Glass <[email protected]>
2025-05-27u_boot_pylib: Allow disabling colour outputSimon Glass
When running tests there is no situation in which we want ANSI output as it makes it much harder to see what is going on in logs, tests, etc. Provide a way to disable this. Signed-off-by: Simon Glass <[email protected]>
2025-05-27u_boot_pylib: Avoid concurrent execution of only one testSimon Glass
There is no point in spinning up multiple processes if there is only one test to execute. Add a check for this. Signed-off-by: Simon Glass <[email protected]>
2025-05-27u_boot_pylib: Add a pagerSimon Glass
It is useful to have a pager when outputting a lot of text. Add support for this in the terminal library, making use of a context manager. Also add a function to indicate whether the output device is a terminal or not, while we are here, to avoid duplicating this code. Signed-off-by: Simon Glass <[email protected]>
2025-05-27u_boot_pylib: Improve ANSI-colour output with backgroundsSimon Glass
The current implementation does not handle background colours very well: - It outputs an incorrect code in some cases, leading to wrong colours - Some functions lack a control for the background Tidy this up so that background colours can be used in more places. Signed-off-by: Simon Glass <[email protected]>
2025-05-27u_boot_pylib: Allow control of capturingSimon Glass
Tests often capture output so they can check it. This means that if the test fails it is not easy to see what the output actually was. Add a -N flag which writes out the output after it has been captured. This is not a perfect solution but it is simple and seems to work well in practice. Signed-off-by: Simon Glass <[email protected]>
2025-05-27binman: Correct a typo in the toolpath commentSimon Glass
Fix the 'ist' typo in the comment for TestFunctional Signed-off-by: Simon Glass <[email protected]>
2025-05-27patman: Move capture_sys_output() into terminal and renameSimon Glass
This function is sometimes useful outside tests. Also it can affect how terminal output is done, e.g. whether ANSI characters should be emitted or not. Move it out of the test_util package and into terminal. Signed-off-by: Simon Glass <[email protected]>
2025-05-27patman: Move all non-test logic into control moduleSimon Glass
It is easier for tests if the top-level control logic is all in one module. Create a new do_patman() function to handle this. Move the existing code into it. Signed-off-by: Simon Glass <[email protected]>
2025-05-27binman: x86: Write skip-at-start when end-at-4gb is usedSimon Glass
The end-at-4gb property implies a value for skip-at-start so add it into the output FDT so that U-Boot can read it. Now that skip-at-start is implemented, we can drop the workarounds used in the x86 code to obtain the correct image-pos value. Signed-off-by: Simon Glass <[email protected]>
2025-05-27buildman: Add a way to build a particular targetSimon Glass
At present buildman only supports building the default target. Generally this is what is wanted, but in some cases boards erroneously have a different target for product extra files. Add a --target option to help. Also add a comment indicating which letters are free for new options. Signed-off-by: Simon Glass <[email protected]>
2025-05-09Dockerfile: use lz4 instead of lz4-toolsHeinrich Schuchardt
Since Ubuntu Jammy lz4-tools is only a virtual package which pulls in lz4 as dependency. Update documentation too. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-05-03tools: imx8image: add i.MX95 supportAlice Guo
i.MX95 uses binman to invoke mkimage to create image container. 2 image containers are needed currently. The first one is composed of ahab-container.img, LPDDR firmware images, OEI images, System Manager image and u-boot-spl.bin. The second one is consisted of ARM Trusted firmware and u-boot.bin. Because DDR OEI image and LPDDR firmware images have to be packaged together and named as m33-oei-ddrfw.bin by binman, so imx9_image.sh does not check if m33-oei-ddrfw.bin exists. When using "make imx95_19x19_evk_defconfig; make", imx9_image.sh will delete the line for u-boot.bin in container.cfg. In fact, binman is always called after the u-boot.bin is built, so imx9_image.sh does not check if u-boot.bin exists. Signed-off-by: Alice Guo <[email protected]>
2025-05-03binman: add a new entry type for packing DDR PHY firmware imagesAlice Guo
i.MX95 needs to combine DDR PHY firmware images and their byte counts together, so add a new entry type nxp-header-ddrfw for this requirement. Signed-off-by: Alice Guo <[email protected]>
2025-04-29Docker, CI: Add vexpress_fvp / vexpress_fvp_bloblist supportTom Rini
This adds the vexpress_fvp and vexpress_fvp_bloblist platforms to the list of platforms we test via emulator in CI. In order to do this we need to first have our container runtime have TF-A builds for the vexpress_fvp platform, both with and without transfer list support as well as installing "telnet" so that we can access console. In the CI files we check for the existence of /opt/tf-a/${TEST_PY_BD} and if found, copy bl1.bin and fip.bin to /tmp and set the variables so that we can later run FVP to run. Note that we currently disable the hostfs (semihosting) tests as they trigger a bug in FVP. This has been reported upstream, and can be enabled when fixed. Reviewed-by: Harrison Mutai <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-04-28mkimage: fix option parsing segfaultCarlos López
getopt_long() expects a NULL-terminated list of structures. The current list in mkimage does not have a zero-filled structure at the end, which can cause getopt_long() to walk past the end of the array when passing an unknown option, causing a segmentation fault. As a reproducer, the following command causes a segmentation fault (tested in Debian 12): mkimage --foobar Signed-off-by: Carlos López <[email protected]>
2025-04-24python: Use and refer to the venv module rather than virtualenvTom Rini
Using some form of sandbox with Python modules is a long standing best practice with the language. There are a number of ways to have a Python sandbox be created. At this point in time, it seems the Python community is moving towards using the "venv" module provided with Python rather than a separate tool. To match that we make the following changes: - Refer to a "Python sandbox" rather than virtualenv in comments, etc. - Install the python3-venv module in our container and not virtualenv. - In our CI files, invoke "python -m venv" rather than "virtualenv". - In documentation, tell users to install python3-venv and not virtualenv. Signed-off-by: Tom Rini <[email protected]>
2025-04-23rockchip: mkimage: Add rk3576 supportXuhui Lin
Add support for rk3576 package header in mkimage tool. Signed-off-by: Heiko Stuebner <[email protected]> Reviewed-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23rockchip: mkimage: Add support for RK3528Yifeng Zhao
Add support for generating Rockchip Boot Image for RK3528. Similar to RK3568, the RK3528 has 64 KiB SRAM and 4 KiB of it is reserved for BootROM. Signed-off-by: Yifeng Zhao <[email protected]> Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-15buildman: Update to grabbing gcc-14.2.0 toolchains by defaultTom Rini
With the switch to using GCC 14.2.0 in commit 001bac5f16ad ("Dockerfile: Update to gcc-14.2.0 and clang-18") in CI, we should make buildman match this. Signed-off-by: Tom Rini <[email protected]>
2025-04-11Merge patch series "binman: Check code-coverage requirements"Tom Rini
Simon Glass <[email protected]> says: This series adds a cover-coverage check to CI for Binman. The iMX8 tests are still not completed, so a work-around is included for those. A few fixes are included for some other problems. Link: https://lore.kernel.org/r/[email protected]
2025-04-11binman: Work around missing test coverageSimon Glass
The iMX8 entry-types don't have proper test coverage. Add a work-around to skip this for now. Signed-off-by: Simon Glass <[email protected]>
2025-04-11binman: Workaround lz4 cli padding in test casesJiaxun Yang
Newer lz4 util is not happy with any padding at end of file, it would abort with error message like: Stream followed by undecodable data at position 43. Workaround by skipping testCompUtilPadding test case and manually strip padding in testCompressSectionSize test case. Signed-off-by: Jiaxun Yang <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Simon Glass <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]>
2025-04-11binman: Drop algo check in CheckSetHashValue()Simon Glass
The CheckAddHashValue() function is always called before this one, so the algorithm check is never used. Replace it with an assert to avoid a coverage error. Signed-off-by: Simon Glass <[email protected]>
2025-04-11binman: fit: Drop unused codeSimon Glass
The key-name-hint case is not tested so is presumably not used. Drop it. Signed-off-by: Simon Glass <[email protected]>
2025-04-11binman: Drop GetRootSkipAtStart()Simon Glass
This method is not called anymore, so drop it. Signed-off-by: Simon Glass <[email protected]>
2025-04-11binman: Exclude dist-packages and site-packagesSimon Glass
Newer versions of the python3-coverage tool require a directory separator before and after the directory name. Add this so that system package are not included in the coverage report. Signed-off-by: Simon Glass <[email protected]>
2025-04-11binman: Add coverage to requirementsSimon Glass
We need the code-coverage package to run the coverage tests. Add this package. Signed-off-by: Simon Glass <[email protected]>
2025-04-11Merge patch series "Switch to using $(PHASE_) in Makefiles"Tom Rini
Tom Rini <[email protected]> says: This series switches to always using $(PHASE_) in Makefiles when building rather than $(PHASE_) or $(XPL_). It also starts on documenting this part of the build, but as a follow-up we need to rename doc/develop/spl.rst and expand on explaining things a bit. Link: https://lore.kernel.org/r/[email protected]
2025-04-11Kbuild: Always use $(PHASE_)Tom Rini
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our Makefiles as part of the macros to determine when to do something in our Makefiles based on what phase of the build we are in. For consistency, bring this down to a single macro and use "$(PHASE_)" only. Signed-off-by: Tom Rini <[email protected]>
2025-04-11Merge tag 'efi-2025-07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2025-07-rc1 CI: * https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25648 Documentation: * Update authenticated capsules documentation UEFI: * Add support for loading FIT images including initrd - efi_loader: efi_load_initrd: provide a memory mapped initrd - efi_loader: binary_run: register an initrd - bootm: add support for initrd in do_bootm_efi * efi_selftest: remove un-needed NULL checks * efi: Fix efiboot for payloads loaded from memory * Print extra information from the bootmgr * Move public cert for capsules to .rodata * Set EFI capsule dfu_alt_info env explicitly * Make FDT extra space configurable * Install the ACPI table from the bloblist * Handle GD_FLG_SKIP_RELOC * Handle malloc() errors Others: * acpi: select CONFIG_BLOBLIST * smbios: select CONFIG_BLOBLIST * xilinx: dfu: Fill directly update_info.dfu_string * cmd: fwu: Dump custom fields from mdata structure * board: remove capsule update support in set_dfu_alt_info()
2025-04-11doc/buildman: typo 'require'Heinrich Schuchardt
%s/require/required/ Signed-off-by: Heinrich Schuchardt <[email protected]>
2025-04-10tools/fit_check_sign: make key optionalDaniel Golle
Allow invoking fit_check_sig without the key parameter, allowing to validate only checksums and hashes for unsigned images. Signed-off-by: Daniel Golle <[email protected]>
2025-04-10tools: add pkg-config for preload_check_signRaymond Mao
The cflags and ldflags of preload_check_sign depend on the openssl package thus pkg-config is needed to get the location where openssl is installed. This fix a potential build failure when openssl is not from the distro and installed in a varied place. Signed-off-by: Raymond Mao <[email protected]>
2025-04-10patman: Show base commit on each patch when no cover letterSimon Glass
If a series is sent without a cover letter, there is no indication of the base commit. Add support for this, since single patches of small series may not always have a cover letter. Signed-off-by: Simon Glass <[email protected]>
2025-04-10binman: Fix a typo in elf.pySimon Glass
Fix an 'EFL' typo. It should be 'ELF'. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]>
2025-04-10patman: Show the base commit and branchSimon Glass
It is helpful to know which commit patches are based on, even if that commit might not be available to readers. Add a tag for this in the cover letter. Also add the local-branch name since that may be useful to the writer. Signed-off-by: Simon Glass <[email protected]>
2025-04-10CI: Move to latest container imagesTom Rini
- Bump up "Jammy" tag to jammy-20250404 - Include most recent changes to the Dockerfile itself Signed-off-by: Tom Rini <[email protected]>
2025-04-10Dockerfile: Add fdiskTom Rini
We had previously gotten this package through a chain of dependencies with guestfs-tools. Now that we no longer install that package, install fdisk (for sfdisk) directly. Fixes: eb1b90ec57a4 ("Dockerfile: Update to drop virt-make-fs packages") Signed-off-by: Tom Rini <[email protected]>
2025-04-10Dockerfile: Download the Arm FVP and extract itTom Rini
There are some reference platforms from Arm which are not found in QEMU but instead in the FVP tool. As we can make use of this in CI later on, download and extract it in our Dockerfile today. Signed-off-by: Tom Rini <[email protected]>
2025-04-10Dockerfile: Update to a more current TF-A release tagTom Rini
In preparation for using TF-A more in our CI loops, switch to the current release tag for TF-A. Signed-off-by: Tom Rini <[email protected]>
2025-04-10Dockerfile: install byaccLeonard Anderweit
Install byacc required to build cst from source. Signed-off-by: Leonard Anderweit <[email protected]>
2025-04-10Dockerfile: Update to gcc-14.2.0 and clang-18Tom Rini
Outside of changing versions here the other visible change is that we tell grub that riscv64 does not have "large model" support. Without this change the resulting mkimage is non-functional. This is known upstream already. Link: https://savannah.gnu.org/bugs/?65909 Signed-off-by: Tom Rini <[email protected]>
2025-04-08Merge patch series "Improve pytest runtime"Tom Rini
Tom Rini <[email protected]> says: One thing that Simon Glass has noted is that our pytest run time keeps getting longer. Looking at: https://source.denx.de/u-boot/u-boot/-/pipelines/25011/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D we can see that some of the longest running tests are a little puzzling. It turns out that we have two ways of making filesystem images without requiring root access and one of them is significantly slower than the other. This series changes us from using virt-make-fs to only using the mk_fs helper that currently resides in test_ut.py which uses standard userspace tools. The final result can be seen at: https://source.denx.de/u-boot/u-boot/-/pipelines/25015/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D and the tests changed here now run much quicker. Link: https://lore.kernel.org/r/[email protected]
2025-04-08Dockerfile: Update to drop virt-make-fs packagesTom Rini
Now that we do not need nor want people to use virt-make-fs for filesystem tests, remove the related packages from the installation list. Signed-off-by: Tom Rini <[email protected]>
2025-04-03Merge patch series "Introduce J742S2 SoC and EVM"Tom Rini
Manorit Chawdhry <[email protected]> says: The series adds support for J742S2 family of SoCs. Also adds J742S2 EVM Support and re-uses most of the stuff from the superset device J784s4. This device is a subset of J784S4 and shares the same memory map and thus the code is being reused from J784S4 to avoid duplication. It initially cleans up the J784s4 and AM69 files so that they can be re-usable for j742s2 and then it introduces J742S2. The DT for the following SoC will be coming to U-boot during 6.13 Sync so the series is kept as RFC till then. Here are some of the salient features of the J742S2 automotive grade application processor: The J742S2 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications. Some changes that this devices has from J784S4 are: * 4x Cortex-A72 vs 8x Cortex-A72 * 3x C7x DSP vs 4x C7x DSP * 4 port ethernet switch vs 8 port ethernet switch * 2 DDR controller vs 4 DDR controller Test logs: https://gist.github.com/manorit2001/f7df0e8cca1e9973b4361f0559c6f53d Link: https://lore.kernel.org/r/[email protected]