summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2022-11-23tools: mkenvimage: Drop duplicate crc header includeMarek Vasut
This header was already included just above version.h, do not include it twice. Fixes: 3db71108575 ("crc32: Use the crc.h header for crc functions") Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-11-22binman: Add documentation for the command line argsSimon Glass
Add command-line documentation for binman. Signed-off-by: Simon Glass <[email protected]>
2022-11-22buildman: Add --allow-missing flag to allow missing blobsTom Rini
Add a new flag to buildman so that we will in turn pass BINMAN_ALLOW_MISSING=1 to 'make'. Make use of this flag in CI. Allow the settings file to control this. Cc: Rasmus Villemoes <[email protected]> Cc: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2022-11-22buildman: Reinstate removal of temp output dir in testsSimon Glass
This was dropped my mistake. Reinstate it. Signed-off-by: Simon Glass <[email protected]> Fixes: d829f1217c6 ("bulidman: Add support for a simple build")
2022-11-22buildman: Ensure config_fname is initedSimon Glass
Init this variable at the top level since it is a global. Signed-off-by: Simon Glass <[email protected]>
2022-11-22binman: Add a separate section about environment variablesSimon Glass
These are documented in various several sections. Add a new section that mentions them all in one place so it is easier to see what environment variables can be used to control U-Boot's use of binman. Signed-off-by: Simon Glass <[email protected]> Suggested-by: Heinrich Schuchardt <[email protected]>
2022-11-22buildman: Detect binman reporting missing blobsSimon Glass
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with. We cannot easily access the 103 exit code, so detect the problem in the output. With this change, missing blobs result in an exit code of 101, although they still indicate failure. Signed-off-by: Simon Glass <[email protected]>
2022-11-22buildman: Drop mention of old architecturesSimon Glass
Support for some architectures has been removed since buildman was first written. Also all toolchains are now available at kernel.org so we don't need the links, except for arc where the kernel.org toolchain fails to build all boards. Signed-off-by: Simon Glass <[email protected]>
2022-11-22buildman: Update the default settings fileSimon Glass
The settings file omits a few lines which are useful for getting every board building. Add these and update the documentation tool. Signed-off-by: Simon Glass <[email protected]>
2022-11-22buildman: Update the arc toolchainSimon Glass
There is one on kernel.org but it does not build the hsdk_4xd board. Add a link to one which does. Signed-off-by: Simon Glass <[email protected]>
2022-11-22buildman: Drop mention of MAKEALLSimon Glass
This script was removed about 6 years ago so most people should be aware that it is not needed anymore. Drop mention of it. Signed-off-by: Simon Glass <[email protected]>
2022-11-22buildman: Convert documentation to rSTSimon Glass
Convert the buildman documentation to rST format and include it in the 'build' section. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2022-11-22binman: Use an exit code when blobs are missingSimon Glass
At present binman returns success when told to handle missing/faked blobs or missing bintools. This is confusing since in fact the resulting image cannot work. Use exit code 103 to signal this problem, with a -W option to convert it to a warning. Rename the flag to --ignore-missing since it controls bintools also. Add documentation about exit codes while we are here. Signed-off-by: Simon Glass <[email protected]>
2022-11-22Revert "binman: btool: gzip: fix packer name so that binary can be found"Quentin Schulz
This reverts commit daa2da754afe1bac777f6cb0f05233e0de7b325d. This commit is not needed anymore since the btool_ prefix is automatically stripped by bintool. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-11-22binman: bintool: remove btool_ prefix from btool namesQuentin Schulz
The binary is looked on the system by the suffix of the packer class. This means binman was looking for btool_gzip on the system and not gzip. Since a btool can have its btool_ prefix missing but its module and binary presence on the system appropriately found, there's no need to actually keep this prefix after listing all possible btools, so let's remove it. This fixes gzip btool by letting Bintool.find_bintool_class handle the missing prefix and still return the correct class which is then init with gzip name instead of btool_gzip. Additionally, there was an issue with the cached module global variable. The variable only stores the module and not the associated class name when calling find_bintool_class. This means that when caching the module on the first call to find_bintool_class, class_name would be set to Bintoolbtool_gzip but the module_name gzip only, adding the module in the gzip key in the module dictionary. When hitting the cache on next calls, the gzip key would be found, so its value (the module) is used. However the default class_name (Bintoolgzip) is used, failing the getattr call. Instead, let's enforce the same class name: Bintool<packer>, whatever the filename it is contained in. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-31mkeficapsule: Add support for setting OEM flags in capsule headerSughosh Ganu
Add support for setting OEM flags in the capsule header. As per the UEFI specification, bits 0-15 of the flags member of the capsule header can be defined per capsule GUID. The oemflags will be used for the FWU Multi Bank update feature, as specified by the Dependable Boot specification[1]. Bit 15 of the flags member will be used to determine if the acceptance/rejection of the updated images is to be done by the firmware or an external component like the OS. [1] - https://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Acked-by: Etienne Carriere <[email protected]>
2022-10-31mkeficapsule: Add support for generating empty capsulesSughosh Ganu
The Dependable Boot specification[1] describes the structure of the firmware accept and revert capsules. These are empty capsules which are used for signalling the acceptance or rejection of the updated firmware by the OS. Add support for generating these empty capsules. [1] - https://git.codelinaro.org/linaro/dependable-boot/mbfw/uploads/6f7ddfe3be24e18d4319e108a758d02e/mbfw.pdf Signed-off-by: Sughosh Ganu <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Acked-by: Etienne Carriere <[email protected]>
2022-10-31test: dm: Add test cases for FWU Metadata uclassSughosh Ganu
Add test cases for accessing the FWU Metadata on the sandbox platform. The sandbox platform also uses the metadata access driver for GPT partitioned block devices. The FWU feature will be tested on the sandbox64 variant with a raw capsule. Remove the FIT capsule testing from sandbox64 defconfig -- the FIT capsule test will be run on the sandbox_flattree variant. Signed-off-by: Sughosh Ganu <[email protected]> Suggested-by: Heinrich Schuchardt <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2022-10-31binman: Support writing symbols into ELF filesSimon Glass
In some cases the ELF version of SPL builds may be packaged, rather than a binary .bin file. Add support for this. Signed-off-by: Simon Glass <[email protected]>
2022-10-31binman: Handle writing ELF symbols in the Entry classSimon Glass
This feature is used by several etypes and we plan to add more that use it. Make symbol writing a feature of the base class to reduce the code duplication. Signed-off-by: Simon Glass <[email protected]>
2022-10-31binman: Split out looking up a symbol into a functionSimon Glass
Move this code into its own function so it can be used from tests. Signed-off-by: Simon Glass <[email protected]>
2022-10-31binman: Allow obtaining a symbol valueSimon Glass
Provide a function to obtain the integer value of an ELF symbol. This will be used Signed-off-by: Simon Glass <[email protected]>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <[email protected]>
2022-10-31buildman: Handle the MAINTAINERS 'N' tagSimon Glass
This is needed for some soon-to-be-applied patches. Scan the configs/ directory to see if any of the files match. Signed-off-by: Simon Glass <[email protected]> Tested-by: Tom Rini <[email protected]> Suggested-by: Tom Rini <[email protected]>
2022-10-30Merge tag 'video-20221030' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-video - fix [hv]sync active vs back porch in dw_mipi_dsi - simplefb rotation support - support splash as raw image from MMC - enhancements to Truetype console (multiple fonts and sizes) - drop old LCD support
2022-10-30video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEOSimon Glass
Now that all the old code is gone, rename this option. Driver model migration is now complete. Signed-off-by: Simon Glass <[email protected]>
2022-10-30Drop CONFIG_LCD_LOGOSimon Glass
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <[email protected]>
2022-10-29binman: Add support for symlinking imagesNeha Malcom Francis
Adding support to symlink an image packaged using binman. Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-26mkimage: fit: Fix signing of configs with external dataSean Anderson
Just like we exclude data-size, data-position, and data-offset from fit_config_check_sig, we must exclude them while signing as well. While we're at it, use the FIT_DATA_* defines for fit_config_check_sig as welll. Fixes: 8edecd3110e ("fit: Fix verification of images with external data") Fixes: c522949a29d ("rsa: sig: fix config signature check for fit with padding") Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-17docker: Install pyelftools for buildsSimon Glass
Binman needs this module to build sandbox_vpl and it is needed elsewhere in CI. Add it to the docker file. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-10-12tools: k3_gen_x509_cert: Do not print SWRV on buildAndrew Davis
This matches the others here. Signed-off-by: Andrew Davis <[email protected]>
2022-10-11image-pre-load: Move macros/definitions to image.hSteven Lawrance
Putting these definitions in a header will allow signatures to be validated independently of bootm. Signed-off-by: Steven Lawrance <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-07buildman: differentiate between riscv32, riscv64Heinrich Schuchardt
riscv32 needs a different toolchain than riscv64 Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-10-07docker: install riscv32 toolchainHeinrich Schuchardt
For building riscv32 targets we should use the riscv32 toolchain. Add it to the Docker image. Drop the riscv toolchain-alias as we do not need it in future. While in here, update to the latest "jammy" tag. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Rick Chen <[email protected]> [trini: Update to latest jammy tag] Signed-off-by: Tom Rini <[email protected]>
2022-10-06tools: kwbimage: Verify maximal kwbimage header sizePali Rohár
BootROM loads kwbimage header to L2-SRAM and BootROM reserve only 192 kB for it. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-10-03Merge branch 'next'Tom Rini
2022-09-29treewide: Drop image_header_t typedefSimon Glass
This is not needed and we should avoid typedefs. Use the struct instead and rename it to indicate that it really is a legacy struct. Signed-off-by: Simon Glass <[email protected]>
2022-09-29tools: env: Fix missing closedir in ubi_get_volnum_by_nameMiaoqian Lin
The function calls opendir() but missing the corresponding closedir() before exit the function. Add missing closedir() to fix it. Signed-off-by: Miaoqian Lin <[email protected]>
2022-09-26Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-riscv ↵Tom Rini
into next
2022-09-23tools: mtk_image: add support for nand headers used by newer chipsWeijie Gao
This patch adds more nand headers in two new types: 1. HSM header, used for spi-nand thru SNFI interface 2. SPIM header, used for spi-nand thru spi-mem interface The original nand header is renamed to AP header. Tested-by: Daniel Golle <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2022-09-23tools: mtk_image: split the code of generating NAND header into a new fileWeijie Gao
The predefined NAND headers take too much spaces in the mtk_image.c. Moving them into a new file can significantly improve the readability of both mtk_image.c and the new mtk_nand_headers.c. This is a preparation for adding more NAND headers. Reviewed-by: Simon Glass <[email protected]> Tested-by: Daniel Golle <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2022-09-23tools: mtk_image: split gfh header verification into a new functionWeijie Gao
The verification code of gfh header for NAND and non-NAND are identical. It's better to define a individual function to reduce redundancy. Reviewed-by: Simon Glass <[email protected]> Tested-by: Daniel Golle <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2022-09-21binman: Get futility by building itSimon Glass
A binary download is not great, since it depends on libraries being present in the system. Build futility from source instead. Signed-off-by: Simon Glass <[email protected]>
2022-09-19Merge branch 'master' into nextTom Rini
Signed-off-by: Tom Rini <[email protected]>
2022-09-13tools: termios_linux.h: Fix compilation on non-glibc systemsPali Rohár
TCGETS2 is defined in header file asm/ioctls.h provided by linux kernel. On glib systems it is automatically included by some other glibc include header file and therefore TCGETS2 is present in termios_linux.h when linux kernel provides it. On non-glibc systems (e.g. musl) asm/ioctls.h is not automatically included which results in the strange error that BOTHER is supported, TCGETS2 not defined and struct termios does not provide c_ispeed member. tools/kwboot.c: In function 'kwboot_tty_change_baudrate': tools/kwboot.c:662:6: error: 'struct termios' has no member named 'c_ospeed' 662 | tio.c_ospeed = tio.c_ispeed = baudrate; | ^ Fix this issue by explicitly including asm/ioctls.h file which provides TCGETS2 macro (if supported on selected architecture) to not depending on glibc auto-include behavior and because termios_linux.h requires it. With this change it is possible compile kwboot with musl libc. Reported-by: Michal Vasilek <[email protected]> Signed-off-by: Pali Rohár <[email protected]>
2022-09-13tools: kwboot: Change KWBOOT_MSG_RSP_TIMEO_AXP to 10msStefan Roese
Testing on the theadorable Armada XP platform has shown, thaz using the current value of 1000ms as response timeout does not result in reliable booting via kwboot. Using 10ms seems to be much better. So let's change this value to this 10ms instead. Signed-off-by: Stefan Roese <[email protected]> Acked-by: Pali Rohár <[email protected]>
2022-09-12dtoc: Drop sys.exit() in test_fdtSimon Glass
This breaks using pytest to run the tests. Drop it. Signed-off-by: Simon Glass <[email protected]>
2022-09-12binman: Add VPL supportSimon Glass
Add support for U-Boot's Verifying Program Loader phase. Signed-off-by: Simon Glass <[email protected]>
2022-09-07Merge tag 'dm-pull-7sep22' of https://source.denx.de/u-boot/custodians/u-boot-dmTom Rini
binman fixes for bintool support
2022-09-04binman: allow user-defined filenames for mkimage entryQuentin Schulz
mkimage entry currently creates a file whose name is derived from the section name containing said entry. Let's allow the user to define a filename for the mkimage-generated binary by using the 'filename' DT property. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>