summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2024-03-21binman: etype: ti_secure_rom.py: remove unused fsstubDhruva Gole
fsstub seems to be unused and should be removed. Suggested-by: Neha Malcom Francis <n-francis@ti.com> Signed-off-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-03-21binman: etype: dm: Add entry type for TI DMNeha Malcom Francis
commit 23d2ef91efa40d525a4a5557704184bcfd64ca16 upstream 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>
2023-12-01Merge tag '09.01.00.006' into toradex_ti-09.01.00.006Emanuele Ghidoli
RC Release 09.01.00.006
2023-11-24tools/fdtgrep: Include __symbols__ tableRoger Quadros
This is required for overlays to work at SPL. Loading of symbol table depends on DT Overlay support in SPL so make it compile-time dependent. Without this SPL fails to boot some platforms where this feature is not enabled (e.g. dra71-evm.) Without including the <linux/kconfig.h> file, the symbol CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY will not be visible and we will never include the symbol table. So include <linux/kconfig.h> Due to some reason it needs to be included after [#include "fdt_host.h"] otherwise it causes a build error. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-10-12binman: openssl: x509: Support bootcore_optsNeha Malcom Francis
Support bootcore_opts field in x509 template. The bootcore_opts argument had been defined earlier but not utilised into the final certificate. Fixes: d43c636437d1 ("binman: openssl: x509: ti_secure_rom: Add support for bootcore_opts") Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-10-12binman: ftest: Add test for ti-secure firewall nodeManorit Chawdhry
Add test for TI firewalling node in ti-secure. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-10-12binman: ti-secure: Add support for firewalling entitiesManorit Chawdhry
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. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-10-07binman: openssl: x509: ti_secure_rom: Add support for bootcore_optsNeha Malcom Francis
According to the TRMs of K3 platform of devices, the ROM boot image format specifies a "Core Options Field" that provides the capability to set the boot core in lockstep when set to 0 or to split mode when set to 2. Add support for providing the same from the binman DTS. Also modify existing test case for ensuring future coverage. Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-09-06buildman: Create a requirements.txt fileTom Rini
At this point, buildman requires a few different modules and so we need a requirements.txt to track what modules are needed. Upstream-Status: Backport [e381b12210aef7acc77253d3ad36d04157aa593b] Cc: Simon Glass <sjg@chromium.org> Cc: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-03HACK: binman: etype: ti_secure*.py: Don't regenerate certificatesVignesh Raghavendra
ObtainContents and ProcessContents are called multiple times during image packing in a multi pass assembly, dont regenerate cert data every-time, else we end up creating racy updates that can mess up already packed partial images. This can easily be observed with export BINMAN_DEBUG=1 export BINMAN_VERBOSE=5 where openssl x509 cert generation happens multiple times per image. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-06-14tools: logos: Rename TI logo filesNikhil M Jain
Change the file name from ti.gz and ti.bmp to ti_logos_414x97_32bpp to help user understand the resolution and identify the logo files when placed in the boot partition and update the splashfile name with the same in .env file. Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
2023-06-12binman: ti-secure: Add support for FSSTUB signingKamlesh Gurudasani
Add Support for signing of FSSTUB images, which is very similar to signing of non-combined images from legacy boot flow. Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-05-31binman: Overwrite symlink if it already existsAndrew Davis
Without this re-building will fail with an error when trying to create the symlink for the second time with an already exists error. Signed-off-by: Andrew Davis <afd@ti.com>
2023-05-25k3: tools: config.mk: Update makefile and remove scriptsNeha Malcom Francis
Since binman is used to package bootloader images for all K3 devices, we do not have to rely on the earlier methods to package them. Scripts that were used to generate x509 certificate for tiboot3.bin and generate tispl.bin, u-boot.img have been removed. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-25binman: ti-secure: Add support for TI signingNeha Malcom Francis
The ti-secure entry contains certificate for binaries that will be loaded or booted by system firmware whereas the ti-secure-rom entry contains certificate for binaries that will be booted by ROM. Support for both these types of certificates is necessary for booting of K3 devices. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-25binman: ti-board-config: Add support for TI board config binariesNeha Malcom Francis
The ti-board-config entry loads and validates a given YAML config file against a given schema, and generates the board config binary. K3 devices require these binaries to be packed into the final system firmware images. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-25binman: Use unsigned long over typedef ulongAndrew Davis
The header binman_sym.h depends on ulong typedef but does not include types.h. This means the header must be included after including types.h or a header that includes it. We could include types.h but instead let's just switch from ulong to directly using unsigned long. This removes the need for typedef'ing it in some of the tests, so also remove those. Link: https://lists.denx.de/pipermail/u-boot/2023-April/514400.html Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-05-25patman: Move library functions into a library directorySimon Glass
commit 4583c00236efd4ee768ff874f92526c229891a05 upstream The patman directory has a number of modules which are used by other tools in U-Boot. This makes it hard to package the tools using pypi since the common files must be copied along with the tool that uses them. To address this, move these files into a new u_boot_pylib library. This can be packaged separately and listed as a dependency of each tool. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-05-25binman: Support generation of x509 certificatesSimon Glass
commit 953d4177afa0bee0ba0db4b81036d3197595b997 upstream And a new entry type which supports generation of x509 certificates. This uses a new 'openssl' btool with just one operation so far. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-04-12checkpatch: Add a warning for pre-schema driver model tagsSimon Glass
Help ensure that these don't creep into development by adding a check in checkpatch for them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-04-12dm: doc: Move to new driver model schemaSimon Glass
Now that Linux has accepted these tags, update the dtoc tool to use them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-04-12dm: treewide: Complete migration to new driver model schemaSimon Glass
Update various build and test components to use the new schema. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-04-05Dockerfile: add mkbootimg toolSafae Ouajih
commit f4449397551a82f0c1d9714d648f1efb90d56962 upstream. mkbootimg tool is part of the Android project and it is used to pack Android boot images such as boot image and vendor_boot image. Use the following command to run mkbootimg: $ python3 -m mkbootimg Add mkbootimg to the docker file Signed-off-by: Safae Ouajih <souajih@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-03-31buildman: Correct overwriting of settings fileSimon Glass
The toolchain test causes the settings file to be overwritten, which is annoying for local development. Fix it by passing None as the filename. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-01tools: binman: minor formatting fix in docsRalph Siemsen
This should fix a rendering oddity when viewing the docs online at https://u-boot.readthedocs.io/en/latest/develop/package/binman.html Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-28rockchip: mkimage: Add rk3588 supportJagan Teki
Add support for rk3588 package header in mkimage tool. Signed-off-by: Jagan Teki <jagan@edgeble.ai> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-02-28binman: Mark mkimage entry missing when its subnodes is missingJonas Karlman
Using the mkimage entry with the multiple-data-files prop and having a missing external blob result in an unexpected ValueError exception using the --allow-missing flag. ValueError: Filename 'missing.bin' not found in input path (...) Fix this by using _pathname that is resolved by ObtainContents for blob entries, ObtainContents also handles allow missing for external blobs. Mark mkimage entry as missing and return without running mkimage when missing entries is reported by CheckMissing. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-02-28rockchip: mkimage: Update init size limit for RK3568Jonas Karlman
The current init size limit of 76KiB is too big to fit in the 64KiB SRAM on RK3568, sync init size limit from vendor u-boot to fix this. Set init size limit to 60KiB (-16KiB) for RK3568. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-02-28rockchip: mkimage: Update init size limit for RK3328Jonas Karlman
Latest vendor TPL for RK3328 has grown past the current init size limit of 28KiB, sync the init size limit from vendor u-boot to fix this. Set init size limit to 30KiB (+2KiB) for RK3328. This makes it possible to use latest vendor TPL on RK3328 without getting a size limit error running the mkimage command. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-02-28binman: Add support for a rockchip-tpl entryJonas Karlman
The rockchip-tpl entry can be used when an external TPL binary should be used instead of the normal U-Boot TPL. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-02-17riscv: binman: Add help message for missing blobsRick Chen
Add the 'missing-msg' for more detailed output on missing system firmware. Signed-off-by: Rick Chen <rick@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
2023-02-12binman: Show the image name for the top-level sectionSimon Glass
At present we show 'main section' as the top-level section name. It may be more helpful to show the actual image name. This is tricky because Image is a parent class of Entry_section, so there is no distinction between an image and a section. Update it to show the image name. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11CI, Docker: Update to Jammy 2023016 tagTom Rini
Move to the latest tag for "Jammy" and rebuild the containers. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-11Docker: Support trace-cmdSimon Glass
Build trace-cmd as part of the docker image, so that trace tests can be used. Unfortunately the version provided by distributions is a little old and has bugs. It also does not support specifying the time base for the trace, which is required to convert microseconds to nanaseconds. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11trace: Provide a flamegraph that uses timingSimon Glass
Add a second variant of the flame graph that shows records in terms of the number of microseconds used by each call stack. This is a useful way of seeing where time is going within the execution of U-Boot. This requires a call stack that records the start time of each function, as well as a way of subtracting all time consumed by child functions, so that this time is not counted twice by the flamegraph. The time values in the output are just for the function itself, not for its children. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11trace: Support output of a flamegraphSimon Glass
It is useful to see how many times each function is called, particularly in the context of its callers. A flamegraph is a way of showing this. Support output in this format which can be used by the flamegraph.pl script, to generate an SVG image for browsing. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11trace: Support output of funcgraph recordsSimon Glass
Add support for writing ftrace records in the 'funcgraph' format, which shows function entry and exit points as well as the time taken by each function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11trace: Use text_base from the trace headerSimon Glass
Use the information in the trace header instead of reading it from the trace records. Add debugging to check that System.map and the trace header agree on this value. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11trace: Drop use of objsectionSimon Glass
This feature was only partly implemented and serves no current purpose. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11trace: Update proftool to use new binary formatSimon Glass
The old text format is not much used anymore. Instead a new trace-cmd tool has introduced a binary format for trace records. Add support for generating this format. This involves removing the old text format, adding various helpers for the new format and adjusting the code to use an output file instead of stdout. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11trace: Rename prof to trace and improve commentsSimon Glass
The current use of 'profile' in some places is confusing. Update the code to use the word 'trace' consistently. Change the flags to better match their meaning and add some more comments. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-11Dockerfile: Update QEMU git locationTom Rini
Per https://www.qemu.org/contribute/ the official location of the QEMU sources are https://gitlab.com/qemu-project/qemu.git Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-02-10buildman: invalid reference to READMEHeinrich Schuchardt
The readme file for buildman is called buildman.rst. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-07tools: Drop xway-swap-bytes toolSimon Glass
This is very old and does not appear to be used. The CONFIG option enabling it is no-longer present. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-07Drop ubsha1 toolSimon Glass
This seems to have been used by ppc4xx which was removed a while back. The Kconfig does not exist so it is never built. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-07imx: Rename CONFIG_MXS to CFG_MXSSimon Glass
This is not a Kconfig option so we should not be setting it in the Makefile. Rename it to use a CFS_ prefix, since this is still used in mxsimage.c In general tools should support all the features without reference to CONFIG options, but this is left to the maintainer to look at. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-07moveconfig: Add an option to compare Kconfig against sourceSimon Glass
Sometimes the Makefile rules or source code refers to Kconfig options which don't exist. Update the moveconfig tool to check this and produce a series of reports about inconsistencies. This can then be used to generate patches to correct the problems. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06tools: default_image: Accept images with paddingPali Rohár
If image file is stored on flash partition then it contains padding, which is not part of the image itself. Image data size is stored in the image header. So use image size from the header instead of expecting that total image file size is size of the header plus size of the image data. This allows dumpimage to parse image files with padding (e.g. dumped from flash partition). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-06tools: default_image: Verify header sizePali Rohár
Before reading image header, verify that image size is at least size of the image header. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-06tools: imagetool: Skip autodetection of gpimage typePali Rohár
gpimage type requires only that two first 32-bit words of data file are non-zero. So basically every random data file can be guessed and verified as gpimage. So completely skip gpimage type from image autodetection code to prevent lot of false positive results. Data file with gpimage type can be still verified and parsed by explicitly specifying -T gpimage. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>