aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2024-03-25Merge tag 'v2024.04-rc5' into nextWIP/25Mar2024-nextTom Rini1-4/+4
Prepare v2024.04-rc5
2024-03-21patman: Properly document the patchwork_url settingDouglas Anderson1-4/+4
The "Series-patchwork-url:" tag description says that it overrides the settings file but doesn't specify the name of the setting. Elsewhere in the documentation about the "useful" settings we see a setting that sounds promising called "patchwork_server" that's actually not a valid setting. It should be "patchwork_url". Fix these problems so the doc is right and more useful. Signed-off-by: Douglas Anderson <dianders@chromium.org>
2024-03-15CI: Move to latest container imageTom Rini1-1/+1
This moves us to our latest container image, which is now based on the current "Jammy" tag. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-14CI: Cherry-pick reset support for m68k for QEMUTom Rini1-0/+1
In order to support the reset pytest on QEMU on m68k platforms we need to grab this change from upstream. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-14CI: Update to using clang-17Tom Rini1-2/+2
Currently, llvm-17 is the stable release. Update our container and CI to fetch and use that. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-14Dockerfile: install xilinx-bootgen packageHeinrich Schuchardt1-0/+1
Bootgen is used in a binman test. The test is skipped without the binary. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-03-14Dockerfile: build fiptoolHeinrich Schuchardt1-0/+10
Fiptool is used in a binman test. The test is skipped without the binary. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-03-04tools: imx9_image: Reword warning message.Mathieu Othacehe1-1/+1
If the optional `tee.bin` OP-TEE binary is missing, the image will still be functional. Adapt the warning message accordingly. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2024-03-01dtoc: avoid invalid escape sequence '\s'Heinrich Schuchardt1-4/+4
\s is not a valid escape sequence in strings. Mark regular expressions with r''. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-27CI: Move to latest container imageTom Rini1-1/+1
This moves us to our latest container image, which is now based on the current "Jammy" tag. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-02-27Dockerfile: Build coreboot from sourceTom Rini1-0/+11
To make CI runs rely less on external servers, build a coreboot release from source and populate /opt/coreboot with the output. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-02-08tools: mkimage: Add support for i.MXRT FlexSPI HeaderJesse Taube3-19/+120
Modify imx8m Flex SPI Configuration Block to work with imxrt. Add more Flex SPI configuration options to Kconfig. Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> Tested-by: Adam Ford <aford173@gmail.com> #imx8mn-beacon
2024-01-29tools: buildman: fix non-existing SafeConfigParser in Python 3.12+Quentin Schulz1-1/+1
SafeConfigParser was renamed back in Python 3.2 (yes, no typo) to ConfigParser[1], but it was still working as an alias until it got removed in 3.12[2]. [1] https://docs.python.org/3.8/whatsnew/3.2.html#configparser [2] https://github.com/python/cpython/pull/92503 Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-24docker: Add tools/buildman/requirements.txt to the cacheTom Rini1-2/+4
As we have had this file for a while now, we should include installing and populating our pip cache from here as well. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-18image-host: refactor and protect for very long filenamesHugo Cornelis1-10/+32
This patch adds a function fit_image_read_key_iv_data that checks the return value of snprintf and allows to generate a sensible error message when generating binary images using filenames that are too long for the OS to handle. This is especially relevant for automated builds such as Buildroot and Yocto builds. Signed-off-by: Hugo Cornelis <hugo.cornelis@essensium.com>
2024-01-18tools: binman: ti_board_cfg: Check for linting problemsNeha Malcom Francis6-2/+46
Use yamllint for checking whether YAML configuration files are adhering to default yamllint rules. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Suggested-by: Nishanth Menon <nm@ti.com>
2024-01-18CI: Move to latest Ubuntu "Jammy" tagTom Rini1-1/+1
Move to the latest "Jammy" tag from Ubuntu. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-17docker: build QEMU v8.2.0Heinrich Schuchardt1-1/+3
ACPI support for RISC-V requires a recent QEMU. Upgrade the used QEMU to v8.2.0. QEMU commit 0c7ffc977195 ("hw/net: cadence_gem: Fix MDIO_OP_xxx values") is needed to fix the Ethernet PHY driver used by the emulated SiFive Unleashed Board emulation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-17Merge tag 'xilinx-for-v2024.04-rc1-v2' of ↵Tom Rini2-21/+199
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2024.04-rc1-v2 xilinx: - Enable NFS, WGET, DNS and BLKMAP by default zynqmp: - Support new power-management node - Remove multiple blank lines from DTSes - Wire multiboot with DFU infrastructure - Fix i2c-gpio pinctrl group name - SOM DT changes (phy on kd240, kv260 cleanups - Cleanup i2c bus on zcu1285 - DT cleanup (fix node names not to use _) - Fix USB interrupts - Cleanup zcu100 DT - Add support for kaslr-seed zynqmp_r5: - Fix W=1 issue with missing dir tools: - Improve zynqmpimage mkimage support
2024-01-13doc: fix three-dash references in reStructuredTextGrzegorz Szymaszek1-1/+1
The "Sending patches" and "Patman patch manager" documents refer to the three-dash, "---", that separates patch parts. The symbol is written in the documentation in the same form as it is in actual patches: as three U+002D HYPHEN-MINUS characters. When building the documentation, Sphinx converts this symbol to a U+2014 EM DASH, that is invalid in this case. Make the three-dash symbol a reStructuredText inline literal to prevent its conversion; that is, enclose it in a pair of double backquotes (`). Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-01-11tools: fix build without LIBCRYPTO supportPaul-Erwan Rio4-3/+9
Commit cb9faa6f98ae ("tools: Use a single target-independent config to enable OpenSSL") introduced a target-independent configuration to build crypto features in host tools. But since commit 2c21256b27d7 ("hash: Use Kconfig to enable hashing in host tools and SPL") the build without OpenSSL is broken, due to FIT signature/encryption features. Add missing conditional compilation tokens to fix this. Signed-off-by: Paul-Erwan Rio <paulerwan.rio@gmail.com> Tested-by: Alexander Dahl <ada@thorsis.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11tools: kwbimage: Allow disabling build on non-mvebu platformsAlexander Dahl2-1/+8
Some users want to build with CONFIG_TOOLS_LIBCRYPTO disabled, which in general is possible for at least some boards. 32-bit mvebu however requires kwbimage for building SPL, and kwbimage has a hard dependency to host OpenSSL. The new symbol CONFIG_TOOLS_KWBIMAGE allows disabling kwbimage build on non-mvebu platforms, and thus building without host libcrypto from OpenSSL. Based on previous work and discussions, see links below. Link: https://lore.kernel.org/u-boot/20211021093304.25399-1-pali@kernel.org/ Link: https://lore.kernel.org/u-boot/20220111153120.1276641-1-marex@denx.de/ Link: https://lore.kernel.org/u-boot/20230121154743.667253-2-paulerwan.rio@gmail.com/ Cc: Marek Vasut <marex@denx.de> Cc: Paul-Erwan Rio <paulerwan.rio@gmail.com> Signed-off-by: Alexander Dahl <ada@thorsis.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-10tools: zynqmpimage: print partition namesBrandon Maier2-0/+97
Each partition may belong to an image, which has a name. That name can be useful for debugging as it helps identify where the partition came from. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Link: https://lore.kernel.org/r/20240104185258.39465-4-brandon.maier@collins.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-01-10tools: zynqmpimage: add partition extractingBrandon Maier2-19/+96
Extract partitions from a Xilinx Boot Image using dumpimage. Add helper for_each_zynqmp_part() to reuse the partition walking code between the printing and extracting functions. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Link: https://lore.kernel.org/r/20240104185258.39465-3-brandon.maier@collins.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-01-10tools: zynqmpimage: print all partition sizesBrandon Maier1-0/+6
Two of the partition size fields are not printed. Currently only the "total" size is displayed, which is the size of the image data (encrypted), padding, expansion, and authentication data. Add the "unencrypted data" size, which is the original size of the data before being encrypted. And "encrypted data" size, which is just the encrypted data. To avoid printing useless information, only print the encrypted and unencrypted sizes if they are different from the total. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Link: https://lore.kernel.org/r/20240104185258.39465-2-brandon.maier@collins.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-01-10tools: zynqmpimage: show info on partition 0Brandon Maier1-3/+1
The zynqmpimage_print_header() skips printing the first partition. This is because the image header can contain duplicate fields as the first partition. However some fields, like the partition attributes, are only present in the partition table. It is also possible for the first partition to not be declared in the image header, if the image is not a bootloader image. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Link: https://lore.kernel.org/r/20240104185258.39465-1-brandon.maier@collins.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-01-08mach-imx: Add i.MX93 binman support.Mathieu Othacehe1-0/+31
Add dedicated Makefile targets for the i.MX93 and a new imx93-u-boot.dtsi device-tree to create binman images. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
2024-01-05fw_env: autodetect NAND erase size and env sectorsWIP/2024-01-05-fw_env-fixesAnthony Loiseau2-2/+12
As already done for NOR chips, if device ESIZE and ENVSECTORS static configurations are both zero, then autodetect them at runtime. Cc: Joe Hershberger <joe.hershberger@ni.com> cc: Stefan Agner <stefan@agner.ch> cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Anthony Loiseau <anthony.loiseau@allcircuits.com>
2024-01-05fw_env: keep calling read() until whole flash block is readRafał Miłecki1-19/+15
It's totally valid for read() to provide less bytes than requested maximum. It may happen if there is no more data available yet or source pushes data in small chunks. This actually happens when trying to read env data from NVMEM device. Kernel may provide NVMEM content in page size parts (like 4096 B). This fixes warnings like: Warning on /sys/bus/nvmem/devices/u-boot-env0/nvmem: Attempted to read 16384 bytes but got 4096 Warning on /sys/bus/nvmem/devices/u-boot-env0/nvmem: Attempted to read 12288 bytes but got 4096 Warning on /sys/bus/nvmem/devices/u-boot-env0/nvmem: Attempted to read 8192 bytes but got 4096 Since the main loop in flash_read_buf() is used to read blocks this patch adds a new nested one. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-05fw_env: rename variables holding env data contentRafał Miłecki1-21/+18
Rename "addr0" and "addr1" to "buf0" and "buf1" accordingly. Name "addr" suggests that variable contains a numeric value being some kind of address. Name "buf" is de facto a standard name for pointer to allocated memory for reading data to. While at it drop redundant checks for NULL before calling free(). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-05fw_env: fix reading NVMEM device's "compatible" valueRafał Miłecki1-4/+14
Call to fread() was changed to check for return value. The problem is it can't be checked for returning 1 (as it is) to determine success. We call fread() with buffer size as "size" argument. Reading any "compatible" value shorter than buffer size will result in returning 0 even on success. Modify code to use fstat() to determine expected read length. This fixes regression that broke using fw_env with NVMEM devices. Fixes: c059a22b7776 ("tools: env: fw_env: Fix unused-result warning") Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2024-01-04Merge patch series "ATF and OP-TEE Firewalling for K3 devices."WIP/04Jan2024-nextTom Rini7-4/+192
Manorit Chawdhry <m-chawdhry@ti.com> 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 Chawdhry3-0/+79
Add test for TI firewalling node in ti-secure. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04binman: ti-secure: Add support for firewalling entitiesManorit Chawdhry3-3/+112
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 <sjg@chromium.org> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04dtoc: Change dst to self in debug messageManorit Chawdhry1-1/+1
Fix the error message to not use dst and use self as it is copying the properties to self. While using templating if there are no subnodes defined, we end up in this situation where "dst" isn't defined and it tries to print the error message and fails. 'UnboundLocalError: local variable 'dst' referenced before assignment' Fixes: 55e1278d5eca ("dtoc: Allow inserting a list of nodes into another") Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-31fdtgrep: Allow propagating properties up to supernodesSimon Glass1-1/+17
The existing bootph binding is defined such that properties in a subnode are also implied in the supernode also, as in this example: buttons { /* bootph,pre-ram is implied by btn1 */ compatible = "gpio-keys"; btn1 { bootph,pre-ram; gpios = <&gpio_a 3 0>; label = "button1"; linux,code = <BTN_1>; }; Provide an option to implement this in fdtgrep. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31fdtgrep: Move property checking into a functionSimon Glass1-13/+35
The h_include() function includes a piece which checks if a node contains a property being searched for. Move this into its own function to reduce the size of the h_include() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31fdtgrep: Simplify code to inverting the matchSimon Glass1-8/+2
The code to invert the match in h_include() is a bit convoluted. Simplify it by using disp->invert only once. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31fdtgrep: Tidy up comment for h_include()Simon Glass1-3/+9
Copy the comment from fdt_first_region() so that it is clear what value this function returns. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31fdtgrep: Correct references to fdt_find_regions()Simon Glass1-3/+3
The function name is actually fdtgrep_find_regions() so update the name in comments accordinging. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31fdtgrep: Correct ordering of flagsSimon Glass1-7/+7
Two of the flags are out of order, so fix this. Also adjust the ordering of one flag in the main switch() Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31fdtgrep: Tidy up a few type warnings and commentsSimon Glass1-9/+10
Align the code with the upstream version at fdt-tools which had a few tweaks before being applied. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-31binman: used-before-assignment in ftest.pyHeinrich Schuchardt1-5/+15
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 <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-31buildman: type cotainingHeinrich Schuchardt1-1/+1
%s/cotaining/containing/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-21global: Restrict use of '#include <linux/kconfig.h>'Tom Rini1-1/+0
In general terms, we -include include/linux/kconfig.h and so normal U-Boot code does not need to also #include it. However, for code which is shared with userspace we may need to add it so that either our full config is available or so that macros such as CONFIG_IS_ENABLED() can be evaluated. In this case make sure that we guard these includes with a test for USE_HOSTCC so that it clear as to why we're doing this. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-15board: stm32f469-disco: add splash screen with stmicroelectronics logoDario Binacchi1-0/+0
Display the STMicroelectronics logo with features VIDEO_LOGO and SPLASH_SCREEN on stm32f469-disco board. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-12-14Merge tag 'u-boot-imx-next-20231214' of ↵Tom Rini1-1/+1
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next - Add TPM support for venice boards - Add networking support for imx93-evk - Enable TCP, IPv6, wget for DHCOM and Data Modul boards - Enable fastboot support for Toradex boards - Allow pico-imx7d to boot from SD - Enable fastboot for beacon imx8m beacon boards, disabled SYS_CONSOLE_IS_IN_ENV - Fix mxsboot to prevent NAND blocks being reported as bad - Add imx8mm PWM clock support - Several devicetree syncs with the kernel - Add support for i.MX8MP Polyhex Debix Model A SBC - Reworked ddr_load_train_firmware() to get a 50ms boot time improvement
2023-12-13binman: elf: Using variable 'old_val' before assignmentHeinrich Schuchardt1-4/+4
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 <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13binman: etype: dm: Add entry type for TI DMNeha Malcom Francis4-0/+56
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 <n-francis@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13binman: doc: fix typoDario Binacchi1-1/+1
s/use set/set/ Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>