<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/mkimage.c, branch v2023.07.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/tools/mkimage.c?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/tools/mkimage.c?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-04-13T09:34:47Z</updated>
<entry>
<title>tools: imagetool: Extend print_header() by params argument</title>
<updated>2023-04-13T09:34:47Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2023-03-29T19:25:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2972d7d62f8f177bf2186c7a38bdae53dff99a7a'/>
<id>urn:sha1:2972d7d62f8f177bf2186c7a38bdae53dff99a7a</id>
<content type='text'>
This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tools: mkimage: Do not try to open datafile when it is skipped</title>
<updated>2023-03-01T05:39:17Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2023-01-21T19:09:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b07965b8a9a9887a37f41254d6155f8fc38ad006'/>
<id>urn:sha1:b07965b8a9a9887a37f41254d6155f8fc38ad006</id>
<content type='text'>
When mkimage was instructed to skip datafile via option -s then do not try
to validate or open datafile as it does not have to exist or to be
specified via -d option.

This change allows to use -s option for skipping datafile when -d option
for datafile was not specified.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: mkimage: Print human readable error when -d is not specified</title>
<updated>2023-03-01T05:39:17Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2023-01-08T22:28:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2f6855a6aa8d55d8341f454f87cabc784a890193'/>
<id>urn:sha1:2f6855a6aa8d55d8341f454f87cabc784a890193</id>
<content type='text'>
When asking mkimage to create a new image file and option -d is not
specified then mkimage show human unfriendly error message:

  mkimage: Can't open (null): Bad address

Without debugger it is hard to debug what is the issue. Function open() is
being called with file name set to NULL. So add a check for this and if it
happens then show human readable message that option -d was not specified.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: mkimage: Do not fill legacy_img_hdr for non-legacy XIP images</title>
<updated>2023-03-01T05:39:17Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2023-01-21T19:05:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=27670acaac82f370b635f1af103594a335322bcf'/>
<id>urn:sha1:27670acaac82f370b635f1af103594a335322bcf</id>
<content type='text'>
Skip filling legacy_img_hdr structure for XIP images which do not use
legacy_img_hdr structure header. Adding unwanted header to other image
formats, like kwbimage cause generation of broken image.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
</entry>
<entry>
<title>mkimage: fit: Support signed configurations in 'auto' FITs</title>
<updated>2023-01-27T17:51:27Z</updated>
<author>
<name>Massimo Pegorer</name>
<email>massimo.pegorer@vimar.com</email>
</author>
<published>2023-01-05T09:31:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b93a65209c4afae3f929262761b48b228ef58828'/>
<id>urn:sha1:b93a65209c4afae3f929262761b48b228ef58828</id>
<content type='text'>
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 &lt;dtb&gt; and
-r options, will add public key to &lt;dtb&gt; file with required = "conf"
property.

Summary:
    -f auto =&gt; FIT with crc32 images
    -f auto -g ... -o ... =&gt; FIT with signed images
    -f auto-conf -g ... -o ... =&gt; 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 &lt;massimo.pegorer@vimar.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tools: mkimage: don't print error message "Success" in case of failure</title>
<updated>2022-12-08T14:29:02Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2022-11-23T11:55:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=72c3f5dbd9545259a7eb04a7d21dff9b318de77e'/>
<id>urn:sha1:72c3f5dbd9545259a7eb04a7d21dff9b318de77e</id>
<content type='text'>
In case there's no struct image_type_params::set_header callback, no
"errno" will be set. Don't fail with an error message, followed by
"Success". Remove the printing of the human readable "errno" value.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tools: mkimage: Fix nullptr at strchr()</title>
<updated>2022-12-08T14:29:01Z</updated>
<author>
<name>Mikhail Ilin</name>
<email>ilin.mikhail.ol@gmail.com</email>
</author>
<published>2022-11-23T09:39:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=17f8a7487689ad727aadc00c14cd3315cd880e4a'/>
<id>urn:sha1:17f8a7487689ad727aadc00c14cd3315cd880e4a</id>
<content type='text'>
The copy_datafile(ifd, params.datafile) function has been
 implemented to copy data by reducing the number of lines in the main
 function.

Signed-off-by: Mikhail Ilin &lt;ilin.mikhail.ol@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: Drop image_header_t typedef</title>
<updated>2022-09-29T20:07:57Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-09-07T02:26:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f3543e69442ca393e52df253d9c5d45bc189d471'/>
<id>urn:sha1:f3543e69442ca393e52df253d9c5d45bc189d471</id>
<content type='text'>
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 &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>mkimage: Add long options</title>
<updated>2022-07-13T18:05:49Z</updated>
<author>
<name>Sean Anderson</name>
<email>seanga2@gmail.com</email>
</author>
<published>2022-06-25T17:12:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dc3a923ed66e136bb3641940732b2f8c52a6f02a'/>
<id>urn:sha1:dc3a923ed66e136bb3641940732b2f8c52a6f02a</id>
<content type='text'>
The mkimage command has had many options added over the years.
Unfortunately, we are starting to run out of short options. Recent options
don't have any obvious relation to their meaning (e.g. -o/-g). Fortunately,
long options exist. Add long options for each current short option.

For the curious, the remaining short options are HIkLmMPQSuUwWXyYzZ.

Signed-off-by: Sean Anderson &lt;seanga2@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>mkimage: Support signing 'auto' FITs</title>
<updated>2022-06-06T22:01:20Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-05-16T20:11:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=87b0af9317cb4105f3f29cb0a4c28c7cd87ea65f'/>
<id>urn:sha1:87b0af9317cb4105f3f29cb0a4c28c7cd87ea65f</id>
<content type='text'>
This adds support for signing images in auto-generated FITs. To do this,
we need to add a signature node. The algorithm name property already has
its own option, but we need one for the key name hint. We could have
gone the -G route and added an explicit name for the public key (like
what is done for the private key). However, many places assume the
public key can be constructed from the key dir and hint, and I don't
want to do the refactoring necessary.

As a consequence of this, it is now easier to add public keys to an
existing image without signing something. This could be done all along,
but now you don't have to create an its just to do it. Ideally, we
wouldn't create a FIT at the end. This could be done by calling
fit_image_setup_sig/info.crypto-&gt;add_verify_data directly.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
</content>
</entry>
</feed>
