Commit graph

4024 commits

Author SHA1 Message Date
Lothar Rubusch
e3b13ce84e doc: develop: Fix typos and wording in binman/binman.rst
Fix some typos and duplicate words in binman.rst.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-01-05 02:30:48 +01:00
Jerome Forissier
788b4609db trace: proftool: dump-ftrace should write funcgraph times in ns not us
When converting a U-Boot trace records file to ftrace function graph
format for use by trace-cmd ('proftool -f funcgraph dump-ftrace'), the
time associated to each function is incorrectly saved in microseconds
instead of nanoseconds. Multuply the value by 1000 to fix the issue.

With this change, the trace-cmd output looks consistent. Here is an
example with udelay(25) added to mem_malloc_init() as a test case:

 $ ./tools/proftool -m System.map -t /tmp/trace.bin -f funcgraph \
                    dump-ftrace -o /tmp/trace.dat
 $ trace-cmd report  /tmp/trace.dat >/tmp/trace.log
 $ vi /tmp/trace.log
 [...]
 u-boot-1     [000]     6.719659: funcgraph_entry:                   |    mem_malloc_init() {
 u-boot-1     [000]     6.719659: funcgraph_entry:                   |      udelay() {
 u-boot-1     [000]     6.719660: funcgraph_entry:                   |        schedule() {
 u-boot-1     [000]     6.719660: funcgraph_entry:                   |          cyclic_run() {
 u-boot-1     [000]     6.719660: funcgraph_entry:        1.000 us   |            cyclic_get_list();
 u-boot-1     [000]     6.719661: funcgraph_exit:         1.000 us   |            }
 u-boot-1     [000]     6.719661: funcgraph_exit:         1.000 us   |          }
 u-boot-1     [000]     6.719661: funcgraph_entry:                   |        __udelay() {
 u-boot-1     [000]     6.719662: funcgraph_entry:        0.000 us   |          usec_to_tick();
 u-boot-1     [000]     6.719687: funcgraph_exit:       + 26.000 us  |          }
 u-boot-1     [000]     6.719687: funcgraph_exit:       + 28.000 us  |        }
 u-boot-1     [000]     6.719687: funcgraph_entry:      # 37971.000 us |      memset();
 u-boot-1     [000]     6.757658: funcgraph_exit:       # 37999.000 us |      }
 u-boot-1     [000]     6.757658: funcgraph_exit:       # 38000.000 us |    }

In the above dump, the udelay() call is reported as taking 26 us which
is consistent with the timestamps (6.719687 - 6.719659 = 0.000026).
Without this patch we would have "0.026 us" instead of "+ 26.000 us".

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-31 19:00:37 -06:00
Tom Rini
5cfbf8c364 Prepare v2025.01-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmdqIAsACgkQFHw5/5Y0
 tyxmdAv/a0dUsibc2oyLJzRFioJO6ib0dro5EHiH1oyF3igOTGe1ifxeQyR/0bb8
 /3Qtr19f77INNjgQmRNpLbBfeoIMm3MeVF+zwQzEvUDEHNNQ0nnxu/yNnJB6Ebej
 xF/vdAP4JoV+KFQXMCMjIyFZcjZh4wGn1L1T8y7GQHS+p1zf0EYA7tPbk5rbwk/E
 xAFSymtWvOZVjLgV9YKp/RqS1+vGHaKydwzUZAncXJzeAMFD2Wm7mnDkd828U/eR
 7vs5BCnRwTgj7iWE6KXJUhFz2hrrBMFTEIV4GNW28vBSCoArlWshLbpKRolEoKY9
 i+dfkBDhghw9fVcTBOSP7BkiFwQl02jPB4Vf8G5ykK11CHO8XTpdjE5buGS1zsiW
 dTX9w4pynCl07p0qYsgGPYf2cE1k6dG6XFNUzH3owyNGiF+66VQeG05V79moQp9F
 ZF0/rux475UhZceXDImdecgkBDsc9gRvu0aX9ZYQtaBCgKJnQ8nyYPXGWZ/u0TSl
 1WVADGUq
 =4mOT
 -----END PGP SIGNATURE-----

Merge tag 'v2025.01-rc5' into next

Prepare v2025.01-rc5
2024-12-25 22:31:04 -06:00
Tom Rini
b0f5ae8e5e docker: Update to latest "Jammy" tag
Bring us up to the current Ubuntu "Jammy" tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-21 12:27:46 -06:00
Tom Rini
9a87362962 docker: Prefer the kernelorg toolchains over "root"
We should always look in our downloaded toolchains first and then for
host-provided toolchains.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-21 12:27:46 -06:00
Tom Rini
a18235dd1a docker: Ensure we use the cross toolchain for aarch64 on arm64
We do not want to use the host toolchain for building our platforms in
CI (it is both too old, and would be inconsistent with our CI
practices). To do this we need to set the toolchain-prefix so that we
don't end up guessing "/opt/.../aarch64-linux-aarch64-linux-" as the
prefix.

Link: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/32
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-21 12:27:46 -06:00
Tom Rini
e54796e61f docker: Use ${TCVER} more widely
Remove the rest of the places where we hard-code the version of the
toolchain we're using.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-21 12:27:46 -06:00
Tom Rini
12d7be498a Docker/CI: Only test Xtensa on amd64 hosts
The xtensa architecture is interesting in that the platforms we support
are only valid on the binary-only toolchains as the DC233C instruction
set requires those toolchains (and not the FSF instruction set). Only
install the binary toolchain on amd64 hosts and only run the tests on
them as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-21 12:27:46 -06:00
Tom Rini
9378307136 binman: Regenerate tools/binman/entries.rst
There have been a few changes to the areas that this file documents
without having regenerated the file. Do so now.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-19 10:19:57 -06:00
Paul HENRYS
e7d7d3307c tools: binman: etype: fit: Append DTB directory to the list of input directories
When specifying a directory containing DTBs with 'fit,fdt-list-dir', it can be
handy not to have to also specify this directory to the input directories of
binman with '-I' option and use the method tools.append_input_dirs() append it.
This avoids to have to specify the DTB directory in both the device tree
provided to binman and through '-I' option to binman.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-19 09:10:34 -06:00
Paul HENRYS
c7896b3e48 tools: u_boot_pylib: Allow to append input directories to indir
append_input_dirs() can be used to append a list of input directories to indir
global list.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-19 09:10:34 -06:00
Paul HENRYS
a4345b1934 tools: binman: etype: Allow to replace 'NAME' in node names
This change allows to replace both 'SEQ' and 'NAME' keywords by respectively a
sequence number and the name of the FDT to provide more flexibility in the node
name for the device trees included in the FIT.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-19 09:10:34 -06:00
Paul HENRYS
f5c1b12267 tools: binman: Pass a list of input directory to EnsureCompiled()
Input directories can be passed to binman using the '-I' option and those
input directories are now also passed to 'dtc' when run by binman.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-19 09:10:34 -06:00
Paul HENRYS
9cc36d654c tools: dtoc: Allow passing optional input directories
An optional list of input directories can be passed to EnsureCompiled() which
allows to pass a list of directories where input files can be searched.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-19 09:10:34 -06:00
Paul HENRYS
1a957ff5d4 tools: binman: Add tests for FIT with data encrypted by mkimage
Test the property 'fit,encrypt' to encrypt FIT data.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
2024-12-19 09:10:34 -06:00
Paul HENRYS
e2cc9b4fc1 tools: binman: add 'fit, encrypt' property to pass keys directory to mkimage
mkimage can be used for both signing the FIT or encrypt its content and the
option '-k' can be used to pass a directory where both signing and encryption
keys can be retrieved. Adding 'fit,encrypt' property to the 'fit' node, leads to
try to find keys directory among binman include directories.
_get_priv_keys_dir() is renamed as _get_keys_dir() and adapted to support both
signing and encryption nodes in the FIT.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-19 09:10:34 -06:00
Paul HENRYS
79d7b11102 aes: Allow to store randomly generated IV in the FIT
When the initialisation vector is randomly generated, its value shall be
stored in the FIT together with the encrypted data. The changes allow to
store the IV in the FIT also in the case where the key is not stored in
the DTB but retrieved somewhere else at runtime.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-19 09:10:34 -06:00
Simon Glass
939b29e592 docker: Install toolchains on arm64 host
Refactor the code to support downloading toolchains for arm64 as well as
x86_64

There doesn't seem to be an xtensa toolchain for arm64 at the same
location, so download that only on x86

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Simon Glass
ffbaa6458b docker: Fix LegacyKeyValueFormat warning with PYTHONPATH
Fix a warning due to the syntax used for PYTHONPATH:

   LegacyKeyValueFormat: "ENV key=value" should be used instead of
      legacy "ENV key value" format (line 304)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Simon Glass
6e510606d4 docker: Adjust installed packages slightly
We no longer need to install libc6-i386 so we can drop that. Switch to
installing linux-image-generic as that will be available on all hosts,
to provide the /boot/vmlinu* file that's requires for various tools.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Simon Glass
45b2f9d4fb docker: Support building for multiple architectures
Add instructions on how to build the file for multiple architectures.
Add a message indicating what is happening.

Update the documentation as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Tom Rini
191e145471 docker: Use cache mounts for apt
Instead of deleting /var/lib/apt/lists after each relevant RUN line, use
a cache mount as is the current best practices.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Tom Rini
5fb78e0e2f docker: Build grub for all architectures
For consistency now, and future ease of testing with non-amd64 hosts,
build grub for all architectures rather than relying on host binaries
for i386/x86_64.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Tom Rini
70712a6acb docker: Update to grub-2.12
The current release of grub is 2.12 and it will be good to pick this up
now so that we can update other parts of our stack.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Tom Rini
2fc92695fb docker: Use "make -j$(nproc)" when invoking make
We had a few places that were not using "make -j$(nproc)" but instead
just plain "make" and so slowing down the overall build.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Tom Rini
042b067a5e docker: Add kernel.org x86_64 toolchain
Add in the x86_64 toolchain, but do not enforce using it for sandbox.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02 16:34:30 -06:00
Heiko Schocher
1f70e5a0e8 imx: imx_cntr_image.sh: prevent warning for missing spl
when building U-Boot on imx8qxp and the board port uses
SPL, U-boot build shows

WARNING '.../spl/u-boot-spl.bin' not found, resulting binary is not-functional

This is because U-Boot binary is build first and Makefile
calls script imx_cntr_image.sh which checks if files
exists... but of course as spl is not yet build the
file `spl/u-boot-spl.bin` does not exist yet, so prevent
this warning.

Signed-off-by: Heiko Schocher <hs@denx.de>
2024-11-25 23:07:37 -03:00
Heiko Schocher
dea6fd26b7 tools: imx8image: Improve error message
Improve error message "header tag mismatched"
Add filename to error message to see, which file
is wrong.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
2024-11-25 23:07:37 -03:00
Tom Rini
48380f9b2a Prepare v2025.01-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmdFAVQACgkQFHw5/5Y0
 tyyyfQwAuHAoOJ2Q5KnesduF9tkzeSRoziCNig3D+VItbJSxKqnBxPB9U+AxxsZ8
 JVA1e5qSwcblqybyWHrFUVTYVlI4j9oJIOTQKtEmUnDUNY+vd5eT9+V8kmQqnbU0
 mhE8fuH6wSHQ3K+tdVSJuWxcZJfFOE5dZKAxz0z/LysqNfJ/r/iqg2l0YYozId2s
 Kyyq7K25jNilcWAw4zUbGcdvM+H53KNzQ3WcZ36HwenlXWoQJOKCbEEskYxAaa0e
 hSEAQCNeuD1oVoZH1jc9dP6htLx5gmOaSbIScwfaOMqBQHyWQTjv/sMEy8wGSMdA
 PqDGClxU0GCenhbS6waY9GPMLYV0JtyXsAmjrWUOXStLrGMBCrP6Xu6T2Ol7+7pt
 O+ZPZM5Xhmo0UR2sY4sWjDIC1AHVXaLZlbC7vfjadkZ30UZvwIXgDFJemS3nDW96
 /JJo/6sgdLGJGvNYGb4mitKO5+kIiz6kKeMvzcfBj+PWybfYhUbqc/AARtlf9Hzp
 +gvtFlCF
 =Q9hw
 -----END PGP SIGNATURE-----

Merge tag 'v2025.01-rc3' into next

Prepare v2025.01-rc3
2024-11-25 17:34:08 -06:00
Tom Rini
dc1859f8d2 Merge patch series "buildman: Add initial support for config fragments"
Simon Glass <sjg@chromium.org> says:

This series updates buildman to process #include lines in defconfig
files. With this, it is no-longer necessary to duplicate lines certain
lines from the include-file in the defconfig, e.g. CONFIG_ARM and
CONFIG_SOC_...

Link: https://lore.kernel.org/r/20241108152350.3686274-1-sjg@chromium.org
2024-11-19 10:04:57 -06:00
Simon Glass
e2ca257287 buildman: Support a tilde to represent the home directory
It is convenient to use ~ to represent the home directory in the
settings file. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19 10:04:47 -06:00
Simon Glass
eae1eb0e86 buildman: Correct logic for adding a toolchain
If the toolchain is bad, it should not be added. Correct the logic for
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19 10:04:47 -06:00
Simon Glass
a79a9ebee0 buildman: Document the toolchain-prefix section
This is mentioned in examples but should have its own mention in the
'settings' documentation. Add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19 10:04:47 -06:00
Simon Glass
d6ebe17d9d buildman: Correct the indentation in the setting-up section
The example settings file should be indented so that it shows correctly
in the output. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19 10:04:47 -06:00
Simon Glass
6bf74a2e0b buildman: Support #include files in defconfigs
This is used by some boards in U-Boot and is a convenient way to deal
with common settings where using a Kconfig files is not desirable.

Detect #include files and process them as if they were part of the
original file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/30
2024-11-19 10:04:47 -06:00
Simon Glass
6d66ded18e buildman: Set up the tout library
Use this to control info and debugging messages. Enable them if -v is
given.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19 10:04:47 -06:00
Simon Glass
a63fcdb9a4 buildman: Add a lower-level test for KconfigScanner
This code is tested by test_scan_defconfigs() but it is useful to have
some specific tests for the KconfigScanner's operation in U-Boot. Add
a test which checks that the values are obtained correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-19 10:04:47 -06:00
Fabio Estevam
3c417c79e0 tools: imx8image: Add missing break for CMD_DCD_SKIP
The CMD_DCD_SKIP case misses a break statement.

Add it.

Fixes: 254c00803b ("tools: imx8image: add possibility to skip dcd")
Addresses-Coverity-ID: 514648: Control flow issues (MISSING_BREAK)
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
2024-11-15 14:36:33 -03:00
Tom Rini
9c25cd5631 Merge tag 'u-boot-imx-master-20241105' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23262

- Improve imx9 boot medium autodection.
- Add possibility to skip DCD on i.MX8.
- Switch to using upstream DT on DH i.MX6 DHCOM.
- Add support for i.MX6DL DHCOM SoM on PDK2 carrier board.
- Handle FIELD_RETURN on i.MX HAB.
2024-11-09 11:26:14 -06:00
Heiko Schocher
254c00803b tools: imx8image: add possibility to skip dcd
Currently U-Boot always adds DCD Image to boot container.
On imx8qxp SoC it is possible to init RAM from within SCFW,
and adding a DCD image type to the boot container in this case
breaks booting (No debug output anymore from SCFW! Nor any
output from SPL), so we need to configure a dcd skip somehow.

This patch adds a new imx8image_cmd entry CMD_DCD_SKIP and a
new entry in imximage.cfg "DCD_SKIP". If set to "true"
no DCD image type will be added to the container.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2024-11-09 08:54:19 -03:00
Heinrich Schuchardt
ac425307f7 tools: mkeficapsule: use %zd to print ssize_t.
For printing a ssize_t variable we must use %zd and not %ld to avoid
a -Wformat error on 32-bit systems.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-11-09 09:56:45 +01:00
Rasmus Villemoes
bfbbd8472e imx: hab: fix size of IVT+CSF blob tacked on to u-boot.itb
Loading flash.bin using uuu fails when flash.bin does not have the
right size.

When flash.bin is loaded from some storage medium (sd card/emmc), SPL
just loads some random garbage bytes from beyond what has been
populated when flash.bin was written, but when loaded via uuu, SPL
hangs waiting for the host to send the expected number of bytes. Which
is (size of FIT image aligned to 0x1000)+CONFIG_CSF_SIZE. The
alignment to 0x1000 is already done and is necessary in all cases
because that's the exact expected location of the 32 byte IVT
header. But the IVT+CSF blob tacked onto the end must be a total of
CONFIG_CSF_SIZE.

This is exactly the same fix as 89f19f45d6, except that this time
around I don't know how to cleanly get CONFIG_CSF_SIZE.

Fixes: bc6beae7c5 (binman: Add nxp_imx8mcst etype for i.MX8M flash.bin signing)
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Tested-by: Heiko Schocher <hs@denx.de>
2024-10-29 16:25:25 -03:00
Rasmus Villemoes
6606a6adfa envtools: make them build again
In v2024.10, "make envtools" is broken for at least these defconfigs:

   am335x_evm_defconfig
   rpi_3_defconfig
   rpi_4_defconfig
   mx7dsabresd_defconfig
   wandboard_defconfig
   imx8mp_evk_defconfig

The only defconfig we use for which it is not broken is
stm32mp13_defconfig. They all work just fine in v2024.07.

The symptoms are slightly different, but all related to the fact that
some transitively included header uses IS_ENABLED or CONFIG_IS_ENABLED
without linux/kconfig.h having already been included.

A simple git bisect doesn't produce anything sensible, it ends up at
3a9f642ca9 (crypto: nuvoton: npcm_sha: Support SHA 384/512) which
clearly has nothing to do with this. But digging deeper, one
eventually finds 0f92fa4560 ("env: Remove <common.h> and add needed
includes").

So at first I tried adding "#include <linux/kconfig.h>" in
include/env_default.h and include/env_flags.h. That fixes it for some,
but not all, of the above. For example rpi_3_defconfig still fails,
then in log.h complaining about BIT() and u8 not being defined. At
least BIT() is should have gotten from bitops.h, except that that's
behind ifdef __KERNEL__, so not set for the envtools build.

It turns out that the envtools source code in fw_env_private.h already
has some hackery to deal with all this, in the form of the __ASSEMBLY__
games it plays before including config.h. It seems that if we just
make sure to do that include early enough, so that config.h is indeed
parsed with that __ASSEMBLY__ hackery in place, everything builds
fine.

Fixes: 0f92fa4560 ("env: Remove <common.h> and add needed includes")
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2024-10-21 20:51:23 -06:00
Tom Rini
a3709638ec Merge patch series "aspeed: ast2700: Add Caliptra ECDSA driver"
Chia-Wei Wang <chiawei_wang@aspeedtech.com> says:

Aspeed AST2700 SoCs integrates the Caliptra secure IP, where an ECDSA384
signature verification HW interface is exported for SoC crypto needs.

This patch series firstly extends the FIT image signing/verify common
code to support the ECDSA384 algorithm. For better convenience, the
device tree for ECDSA public key storage is also revised by referring
to RSA implementations.

After the FIT common code revision, the driver is implemented for
AST2700 to leverage the Caliptra ECDSA384 signature verification.

These are verified by signed FIT images with the algorithm "sha384,ecdsa384".

Link: https://lore.kernel.org/r/20241014095620.216936-1-chiawei_wang@aspeedtech.com
2024-10-21 17:53:11 -06:00
Chia-Wei Wang
75068b1a2d lib: ecdsa: Add ECDSA384 support
Add ECDSA384 algorithm support for image signing and verification.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-21 17:52:52 -06:00
Simon Glass
1903aa72ec docker: Update coreboot
Update to a newer version which supports settings in CMOS RAM and
linear framebuffer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-18 14:10:22 -06:00
Simon Glass
d8ff97ce91 expo: Use standard numbering for save and discard
Set aside some expo IDs for 'save' and 'discard' buttons. This avoids
needing to store the IDs for these. Adjust the documentation and expo
tool for the new EXPOID_BASE_ID value.

Ignore these objects when saving and loading the cedit, since they do
not contain real data.

Adjust 'cedit run' to return failure when the user exits the expo
without saving. Update the test for this change as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18 14:10:22 -06:00
Simon Glass
7f4e1ea00b binman: Add a tutorial on resolving test-coverage bugs
Provide a short description of how tests work, why they are so critical
and how to resolve gaps in Binman's test coverage.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-10-18 14:10:22 -06:00
Simon Glass
3473e1779c binman: Support getting test-coverage on just one test
Pass the arguments through to test_util so that a single test can be
used.

Update the docs and add some missing backquotes in the same section.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18 14:10:22 -06:00
Simon Glass
c95a3c8890 u_boot_pylib: Support running coverage on selected functions
At present run_test_coverage() assumes you want code coverage for the
entire code base. This is the normal situation, but sometimes it is
useful to see the coverage provided by just a single test. Add support
for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-18 14:10:22 -06:00