summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2022-12-06global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini1-3/+3
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-23tools: mkenvimage: Drop duplicate crc header includeMarek Vasut1-1/+0
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 <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-23binman: Add documentation for the command line argsSimon Glass1-1/+299
Add command-line documentation for binman. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-23buildman: Add --allow-missing flag to allow missing blobsTom Rini7-4/+193
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 <rasmus.villemoes@prevas.dk> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-23buildman: Reinstate removal of temp output dir in testsSimon Glass1-1/+1
This was dropped my mistake. Reinstate it. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: d829f1217c6 ("bulidman: Add support for a simple build")
2022-11-23buildman: Ensure config_fname is initedSimon Glass1-0/+1
Init this variable at the top level since it is a global. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-23binman: Add a separate section about environment variablesSimon Glass1-0/+30
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 <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-11-23buildman: Detect binman reporting missing blobsSimon Glass1-1/+5
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 <sjg@chromium.org>
2022-11-23buildman: Drop mention of old architecturesSimon Glass2-19/+1
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 <sjg@chromium.org>
2022-11-23buildman: Update the default settings fileSimon Glass2-0/+5
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 <sjg@chromium.org>
2022-11-23buildman: Update the arc toolchainSimon Glass1-1/+4
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 <sjg@chromium.org>
2022-11-23buildman: Drop mention of MAKEALLSimon Glass1-110/+0
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 <sjg@chromium.org>
2022-11-23buildman: Convert documentation to rSTSimon Glass5-1353/+1411
Convert the buildman documentation to rST format and include it in the 'build' section. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Quentin Schulz <foss+uboot@0leil.net>
2022-11-23binman: Use an exit code when blobs are missingSimon Glass4-4/+51
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 <sjg@chromium.org>
2022-11-23Revert "binman: btool: gzip: fix packer name so that binary can be found"Quentin Schulz1-1/+1
This reverts commit daa2da754afe1bac777f6cb0f05233e0de7b325d. This commit is not needed anymore since the btool_ prefix is automatically stripped by bintool. Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-23binman: bintool: remove btool_ prefix from btool namesQuentin Schulz2-2/+3
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 <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-31mkeficapsule: Add support for setting OEM flags in capsule headerSughosh Ganu1-3/+19
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 <sughosh.ganu@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-10-31mkeficapsule: Add support for generating empty capsulesSughosh Ganu2-7/+97
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 <sughosh.ganu@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-10-31test: dm: Add test cases for FWU Metadata uclassSughosh Ganu1-1/+3
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 <sughosh.ganu@linaro.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-31binman: Support writing symbols into ELF filesSimon Glass8-12/+151
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 <sjg@chromium.org>
2022-10-31binman: Handle writing ELF symbols in the Entry classSimon Glass8-34/+21
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 <sjg@chromium.org>
2022-10-31binman: Split out looking up a symbol into a functionSimon Glass1-15/+45
Move this code into its own function so it can be used from tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-31binman: Allow obtaining a symbol valueSimon Glass1-8/+45
Provide a function to obtain the integer value of an ELF symbol. This will be used Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass4-5/+5
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 <sjg@chromium.org>
2022-10-31buildman: Handle the MAINTAINERS 'N' tagSimon Glass1-0/+11
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 <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> Suggested-by: Tom Rini <trini@konsulko.com>
2022-10-31Merge tag 'video-20221030' of ↵Tom Rini1-5/+1
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 Glass1-1/+1
Now that all the old code is gone, rename this option. Driver model migration is now complete. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30Drop CONFIG_LCD_LOGOSimon Glass1-4/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-29binman: Add support for symlinking imagesNeha Malcom Francis4-0/+34
Adding support to symlink an image packaged using binman. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-26mkimage: fit: Fix signing of configs with external dataSean Anderson1-1/+6
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 <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-17docker: Install pyelftools for buildsSimon Glass1-0/+1
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 <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xpyron.glpk@gmx.de>
2022-10-12tools: k3_gen_x509_cert: Do not print SWRV on buildAndrew Davis1-1/+1
This matches the others here. Signed-off-by: Andrew Davis <afd@ti.com>
2022-10-11image-pre-load: Move macros/definitions to image.hSteven Lawrance1-2/+0
Putting these definitions in a header will allow signatures to be validated independently of bootm. Signed-off-by: Steven Lawrance <steven.lawrance@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-07buildman: differentiate between riscv32, riscv64Heinrich Schuchardt1-0/+11
riscv32 needs a different toolchain than riscv64 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Rick Chen <rick@andestech.com>
2022-10-07docker: install riscv32 toolchainHeinrich Schuchardt1-2/+2
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 <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com> [trini: Update to latest jammy tag] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-10-06tools: kwbimage: Verify maximal kwbimage header sizePali Rohár1-0/+3
BootROM loads kwbimage header to L2-SRAM and BootROM reserve only 192 kB for it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-10-03Merge branch 'next'Tom Rini11-356/+940
2022-09-29treewide: Drop image_header_t typedefSimon Glass6-30/+29
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 <sjg@chromium.org>
2022-09-29tools: env: Fix missing closedir in ubi_get_volnum_by_nameMiaoqian Lin1-1/+4
The function calls opendir() but missing the corresponding closedir() before exit the function. Add missing closedir() to fix it. Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
2022-09-26Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-riscv ↵Tom Rini2-7/+20
into next
2022-09-23tools: mtk_image: add support for nand headers used by newer chipsWeijie Gao3-30/+525
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 <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23tools: mtk_image: split the code of generating NAND header into a new fileWeijie Gao5-289/+389
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 <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23tools: mtk_image: split gfh header verification into a new functionWeijie Gao1-30/+21
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 <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-21binman: Get futility by building itSimon Glass2-7/+20
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 <sjg@chromium.org>
2022-09-19Merge branch 'master' into nextTom Rini52-204/+671
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-13tools: termios_linux.h: Fix compilation on non-glibc systemsPali Rohár1-0/+1
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 <michal.vasilek@nic.cz> Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-13tools: kwboot: Change KWBOOT_MSG_RSP_TIMEO_AXP to 10msStefan Roese1-1/+1
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 <sr@denx.de> Acked-by: Pali Rohár <pali@kernel.org>
2022-09-13dtoc: Drop sys.exit() in test_fdtSimon Glass1-1/+0
This breaks using pytest to run the tests. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-12binman: Add VPL supportSimon Glass12-22/+349
Add support for U-Boot's Verifying Program Loader phase. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-07Merge tag 'dm-pull-7sep22' of https://source.denx.de/u-boot/custodians/u-boot-dmTom Rini7-79/+27
binman fixes for bintool support