<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/mkimage.c, branch v2023.04</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.04</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/tools/mkimage.c?h=v2023.04'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-01-27T17:51:27Z</updated>
<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>
<entry>
<title>mkimage: Document misc options</title>
<updated>2022-05-07T21:17:25Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-04-08T20:08:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=deb2638aa09e23e0ca263a77bde2079dc4bd48df'/>
<id>urn:sha1:deb2638aa09e23e0ca263a77bde2079dc4bd48df</id>
<content type='text'>
Over the years, several options have not made it into the help message.
Document them. Do the same for the man page.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
</content>
</entry>
<entry>
<title>tools: mkimage: Call verify_header after writing image to disk</title>
<updated>2022-04-06T13:21:49Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2022-01-14T17:34:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d3b1ca21e253547599a28002c1ea51348cb75c72'/>
<id>urn:sha1:d3b1ca21e253547599a28002c1ea51348cb75c72</id>
<content type='text'>
If image backend provides verify_header callback then call it after writing
image to disk. This ensures that written image is correct.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>mkimage: add a flag to describe whether -A is specified</title>
<updated>2022-04-04T22:24:17Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>icenowy@aosc.io</email>
</author>
<published>2021-10-15T01:53:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c2d08f01100a13de87f6745250db3a50fc3fbb97'/>
<id>urn:sha1:c2d08f01100a13de87f6745250db3a50fc3fbb97</id>
<content type='text'>
The sunxi_egon type used to take no -A argument (because we assume sunxi
targets are all ARM). However, as Allwinner D1 appears as the first
RISC-V sunxi target, we need to support -A; in addition, as external
projects rely on U-Boot mkimage to generate sunxi eGON.BT0 header, we
need to keep compatibility with command line without -A.

As the default value of arch in mkimage is not proper (IH_ARCH_PPC
instead of IH_ARCH_INVALID), to keep more compatibility, add an Aflag
field to image parameters to describe whether an architecture is
explicitly specified.

Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Icenowy Zheng &lt;icenowy@aosc.io&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
</entry>
<entry>
<title>mkimage: error handling for FIT image</title>
<updated>2022-03-04T20:20:06Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-03-01T07:53:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5017f9b595da6e5c8f064a43fc6cd42cb62c082a'/>
<id>urn:sha1:5017f9b595da6e5c8f064a43fc6cd42cb62c082a</id>
<content type='text'>
If parameter -F is given but FIT support is missing, a NULL pointer might
dereferenced (Coverity CID 350249).

If incorrect parameters are given, provide a message and show usage.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
</feed>
