aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2022-01-10Merge branch 'next'WIP/10Jan2022Tom Rini46-223/+2951
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-09Merge tag 'u-boot-amlogic-20220107' of ↵WIP/09Jan2022-nextTom Rini2-48/+186
https://source.denx.de/u-boot/custodians/u-boot-amlogic into next - disable CONFIG_NET_RANDOM_ETHADDR when unnecessary on amlogic based configs - meson64_android: add board specific env settings, in order to support VIM3/L for android - add changes to support VIM3/L android boot by using meson64_android.h config
2022-01-07binman: add support for creating dummy files for external blobsHeiko Thiery9-8/+138
While converting to binman for an imx8mq board, it has been found that building in the u-boot CI fails. This is because an imx8mq requires an external binary (signed_hdmi_imx8m.bin). If this file cannot be found mkimage fails. To be able to build this board in the u-boot CI a binman option (--fake-ext-blobs) is introduced that can be switched on via the u-boot makefile option BINMAN_FAKE_EXT_BLOBS. With that the needed dummy files are created. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-05tools: kwbimage: Fix checksum calculation for v1 imagesPierre Bourdon1-3/+3
Recent changes caused fields in the image main header to be modified after the header checksum had already been computed. Move the checksum computation to once again be the last operation performed on the header. Fixes: 2b0980c24027 ("tools: kwbimage: Fill the real header size into the main header") Signed-off-by: Pierre Bourdon <delroth@gmail.com> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-28Merge tag 'efi-2022-01-rc4-4' of ↵WIP/28Dec2021Tom Rini1-0/+2
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-01-rc4-4 UEFI: * allow for more than 16 KiB UEFI variable size when using StMM Others: * make watchdog sysreset compatible with separate poweroff driver * avoid OpenSSL deprecation warnings
2021-12-26video: theadorable: Use RGB565 for BMP blittingSimon Glass1-0/+0
At present this uses RGB555 format for blitting to a display. Sandbox uses 565 and that seems to be more normal for BMP as well. Update the code accordingly and add a test. Note that this likely breaks the theadorable board so we may need to discuss supporting both formats. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-26video: Add a test for 16bpp BMP filesSimon Glass1-0/+0
Add a compressed 16bpp BMP file and a test to cover this. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-26tools: avoid OpenSSL deprecation warningsHeinrich Schuchardt1-0/+2
Our Gitlab CI buildsystem is set up to treat warnings as errors. With OpenSSL 3.0 a lot of deprecation warnings occur. With the patch compatibility with OpenSSL 1.1.1 is declared. In the long run we should upgrade our code to use the current API. A -Wdiscarded-qualifiers warning is muted by casting. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-24rockchip: mkimage: Add support for rk3568 SoCKever Yang1-0/+1
rk3568 is the first SoC which supports idb header v2. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2021-12-24rockchip: mkimage: Add support for idb header V2Yi Liu1-28/+158
Rockchip BootRom supports new idb header v2 instead of legacy version. Add support for it so that we can generate image for new SoCs. Signed-off-by: Yi Liu <liuyi@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2021-12-24rockchip: mkimage: Add image header versionKever Yang1-12/+17
We are going to have more than one version header, add the version in the header info. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2021-12-24rockchip: mkimage: rename RK_SIGNATURE to RK_MAGICKever Yang1-5/+5
The first 4byte of idbimage is a magic number instead of signature, correct it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2021-12-23fdt: Make it easier to debug u-boot.dtsi filesSimon Glass1-6/+8
At present one must hack the Makefile to see what is going on with these files. Also it doesn't quite work correctly. Fix this by using an environment variable for debugging. Update the docs also. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23fdt: Drop CONFIG_BINMAN_STANDALONE_FDTSimon Glass1-20/+0
This was added as a hack to work around not having an in-tree devicetree. Now that this is fixed it is not needed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-20Merge tag 'v2022.01-rc4' into nextWIP/20Dec2021-nextTom Rini1-7/+8
Prepare v2022.01-rc4
2021-12-20fw_setenv: Unbreak fw_setenv caused by buggy MEMISLOCKED useJoakim Tjernlund1-7/+8
Commit "fw_setenv: lock the flash only if it was locked before" checks for Locked status with uninitialized erase data. Address by moving the test for MEMISLOCKED. Fixes: 8a726b852502 ("fw_setenv: lock the flash only if it was locked before") Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
2021-12-17fdtgrep: Correct alignment of struct sectionSimon Glass1-2/+1
When outputting a devicetree we should not align the struct section to a 16-byte boundary. The normal position is fine, which is 8-byte aligned. This avoids leaving adding 8 extra zero bytes in the output tree in the case where the reserved section is empty (i.e has 16 zero bytes). Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-17iot2050: binman: add missing-msg for blobsIvan Mikhaylov1-0/+11
Add the 'missing-msg' for blobs for more detailed output on missing system firmware and SEBoot blobs. Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org> Fix minor typos: Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-17binman: Use less hard coded magic when inserting new PATHAndy Shevchenko1-5/+7
Instead of joining hard coded '..' to the run-time path of the executable, take just a dirname out of it. Besides that, use $(srctree) where it makes sense. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2021-12-17binman: Do not pollute source tree when build with `make O=...`Andy Shevchenko1-1/+12
Importing libraries in Python caches the bytecode by default. Since we run scripts in source tree it ignores the current directory settings, which is $(srctree), and creates cache just in the middle of the source tree. Move cache to the current directory. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2021-12-17binman: Add support for ATF FIPSimon Glass13-0/+862
This format is used in firmware binaries so we may as well supported it. With this patch binman supports creating, listing and updating FIPs, as well as extracting files from one, provided that an FDTMAP is also present somewhere in the image. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-17binman: Add a utility module for ATF FIPSimon Glass3-1/+1061
Add support for this format which is used by ARM Trusted Firmware to find firmware binaries to load. FIP is like a simpler version of FMAP but uses a UUID instead of a name, for each entry. It supports reading a FIP, writing a FIP and parsing the ATF source code to get a list of supported UUIDs. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Rename _ReadSubnodes() to ReadEntries()Simon Glass3-6/+6
This method name is more commonly used for this function. Use it consistently. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Support lists of external blobsSimon Glass6-3/+133
Sometimes it is useful to have a list of related external blobs in a single entry. An example is the DDR binaries used by meson. There are 9 files in total. Add support for this, so we don't have to have a separate entry for each. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05dtoc: Add support for reading string-list propertiesSimon Glass2-0/+30
Add a function to read a list of strings from the devicetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Allow extracting a file in an alternative formatSimon Glass12-21/+193
In some cases entries encapsulate other data and it is useful to access the data within. An example is the fdtmap which consists of a 16-byte header, followed by a devicetree. Provide an option to specify an alternative format when extracting files. In the case of fdtmap, this is 'fdt', which produces an FDT file which can be viewed with fdtdump. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Allow listing an image created by a newer versionSimon Glass5-18/+74
If an older version of binman is used to list images created by a newer one, it is possible that it will contain entry types that are not supported. At present this produces an error. Adjust binman to use a plain 'blob' entry type to cope with this, so the image can at least be listed. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Allow providing tools and blob directoriesSimon Glass1-1/+30
At present it is necessary to symlink files containing external blobs into the U-Boot tree in order for binman to find them. This is not very convenient. Add two new environment/Makefile variables to help with this. Add documentation as well, fixing a related nit. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Rename testCbfsNoCOntents()Simon Glass1-1/+1
Use a lower-case O as was intended. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: cfbs: Refactor ObtainContents() for consistencySimon Glass1-17/+23
Update this to use the same arguments as entry_Section uses. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: cbfs: Refactor the init processSimon Glass1-2/+6
Update the constructor to work in the recommended way, where the node properties are read in a separate function. This makes it more similar to entry_Section. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Use normal entries in cbfsSimon Glass1-8/+8
This currently uses _cbfs_entries[] to store entries. Since the entries are in fact valid etypes, we may as well use the same name as entry_Section uses, which is _entries. This allows reusing more of the code there (in a future patch). Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Move cbfs.ObtainContents() down a bitSimon Glass1-15/+15
It is easier to understand this file if reading the entries comes before obtaining the contents, since that is the order in which Binman proceeds. Move the function down a bit. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Update the section documentationSimon Glass2-55/+242
Expand this to explain subclassing better and also to tidy up formatting for rST. Fix a few pylint warnings to avoid dropping the score. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Allow control of which entries to readSimon Glass1-6/+7
The ObtainContents() and GetEntryContents() methods in this file read every single entry in the section. This is the common case. However when one of the entries has had its data updated (e.g. with 'binman replace') we don't want to read it again from the file. Allow the entry to be skipped, for this purpose. This is currently done in the CBFS implementation, so adding it here will allow that to use more of the entry_Section code. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Allow overriding BuildSectionData()Simon Glass2-5/+13
This method is currently marked private. However it is useful to be able to subclass it, since much of the entry_Section code can be reused. Rename it. Also document one confusing part of this code, so people can understand how to add a test for this case. Fix up a few pylint warnings to avoid regressing the score. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Drop the filename property in entry_SectionSimon Glass1-4/+1
This is not used and does nothing. Drop it. Add a tweak to avoid reducing the pylint score. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Drop the underscore in _ReadEntries()Simon Glass4-8/+8
This function can be overridden so should not have an underscore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Correct comments for ReadChildData()Simon Glass1-2/+3
The comment here is incomplete. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Correct init of entry in Entry classSimon Glass1-1/+1
This should not have an underscore. Drop it so that derived classes can rely on it being set correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Add a way to obtain the versionSimon Glass3-0/+67
Add a -V option which shows the version number of binman. For now this just uses a local 'version' file. Once the tool is packaged in some way we can figure out an approach that suits. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Tidy up style in cmdlineSimon Glass1-18/+27
Update this file to improve the pylint score a little. The remaining item is: Function name "ParseArgs" doesn't conform to snake_case naming style which needs some binman-wide renaming. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02dtoc: Add support for reading fixed-length bytes propertiesSimon Glass2-0/+37
Add functions to read a sequence of bytes from the devicetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02dtoc: Add support for reading 64-bit intsSimon Glass4-3/+56
Add functions to read a 64-bit integer property from the devicetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02dtoc: Bring in the libfdt module automaticallySimon Glass1-0/+6
Use the same technique as with binman to load this module from the U-Boot tree if available. This allows running tests without having to specify the PYTHONPATH variable. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02tools/netconsole: Add support for socatAndy Shevchenko1-2/+10
socat is a very powerful tool to work with socets (and not only) in UNIX systems. Let's add support for it in netconsole. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Ferry Toth <fntoth@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-11-29Merge tag 'v2022.01-rc3' into nextTom Rini1-3/+17
Prepare v2022.01-rc3 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-28binman: Fix extract command for using non-absolute image pathsJan Kiszka1-0/+1
Otherwise the updated image will end up in the temporary folder that is purged after completion. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-15arm64: relocate-rela: Add support for ld.lldAlistair Delva1-3/+17
Cap end of relocations by the binary size. Linkers like to insert some auxiliary sections between .rela.dyn and .bss_start. These sections don't make their way to the final binary, but reloc_rela still tries to relocate them, resulting in attempted read past the end of file. When linking U-Boot with ld.lld, the STATIC_RELA feature (enabled by default on arm64) breaks the build. After this patch, U-Boot can be linked successfully with and without CONFIG_STATIC_RELA. Originally-from: Elena Petrova <lenaptr@google.com> Signed-off-by: Alistair Delva <adelva@google.com> Cc: David Brazdil <dbrazdil@google.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Tom Rini <trini@konsulko.com>
2021-11-14Dockerfile, CI: Update to latest "focal" tagWIP/14Nov2021Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>