u-boot/test/py
Massimo Pegorer b93a65209c mkimage: fit: Support signed configurations in 'auto' FITs
Extend support for signing in auto-generated (-f auto) FIT. Previously,
it was possible to get signed 'images' subnodes in the FIT using
options -g and -o together with -f auto. This patch allows signing
'configurations' subnodes instead of 'images' ones (which are hashed),
using option -f auto-conf instead of -f auto. Adding also -K <dtb> and
-r options, will add public key to <dtb> file with required = "conf"
property.

Summary:
    -f auto => FIT with crc32 images
    -f auto -g ... -o ... => FIT with signed images
    -f auto-conf -g ... -o ... => FIT with sha1 images and signed confs

Example: FIT with kernel, two device tree files, and signed
configurations; public key (needed to verify signatures) is
added to u-boot.dtb with required = "conf" property.

mkimage -f auto-conf -A arm -O linux -T kernel -C none -a 43e00000 \
        -e 0 -d vmlinuz -b /path/to/first.dtb -b /path/to/second.dtb \
        -k /folder/with/key-files -g keyname -o sha256,rsa4096 \
        -K u-boot.dtb -r kernel.itb

Example: Add public key with required = "conf" property to u-boot.dtb
without needing to sign anything. This will also create a useless FIT
named unused.itb.

mkimage -f auto-conf -d /dev/null -k /folder/with/key-files \
        -g keyname -o sha256,rsa4096 -K u-boot.dtb -r unused.itb

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27 12:51:27 -05:00
..
tests mkimage: fit: Support signed configurations in 'auto' FITs 2023-01-27 12:51:27 -05:00
.gitignore test/py: Implement pytest infrastructure 2016-01-20 19:06:23 -07:00
conftest.py test: Support tests which can only be run manually 2022-10-31 11:02:44 -04:00
multiplexed_log.css SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
multiplexed_log.py Prepare v2022.01-rc3 2021-11-29 12:00:57 -05:00
pytest.ini test/py: Allow tests to be marked single-threaded only 2022-09-12 18:06:36 -04:00
requirements.txt test: Move to a working version of setuptools 2022-10-26 15:21:11 -04:00
test.py pytest: Shorten traceback length by default 2021-10-14 19:45:07 -04:00
u_boot_console_base.py test/py: Reset the console timeout value 2022-05-26 10:27:14 -04:00
u_boot_console_exec_attach.py test: fix pylint error in u_boot_console_exec_attach.py 2021-11-26 22:02:37 +01:00
u_boot_console_sandbox.py test/py: Add a way to start sandbox without a device tree 2022-05-05 09:28:48 -04:00
u_boot_spawn.py test: fix pylint errors in u_boot_spawn.py 2021-11-26 22:02:37 +01:00
u_boot_utils.py Prepare v2022.01-rc3 2021-11-29 12:00:57 -05:00