<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/mkimage.c, branch v2022.10</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=v2022.10</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/tools/mkimage.c?h=v2022.10'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2022-07-13T18:05:49Z</updated>
<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>
<entry>
<title>tools: mkimage/dumpimage: Allow to use -l with -T</title>
<updated>2022-02-28T15:33:11Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2022-02-13T00:09:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=11f29d443622070c9423ed5fda74b9564570aac7'/>
<id>urn:sha1:11f29d443622070c9423ed5fda74b9564570aac7</id>
<content type='text'>
Currently -l option for mkimage and dumpimage ignores option -T and always
tries to autodetect image type.

With this change it is possible to tell mkimage and dumpimage to parse
image file as specific type (and not random autodetected type). This allows
to use mkimage -l or dumpimage -l as tool for validating image.

params.type for -l option is now by default initialized to zero
(IH_TYPE_INVALID) instead of IH_TYPE_KERNEL. imagetool_get_type() for
IH_TYPE_INVALID returns NULL, which is assigned to tparams. mkimage and
dumpimage code is extended to handle tparams with NULL for -l option. And
imagetool_verify_print_header() is extended to do validation via tparams if
is not NULL.

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: Show where signatures/keys are written</title>
<updated>2022-01-26T15:50:44Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-11-12T19:28:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2d2384bbaff0ab84c868b553c74048a5f6acc9e3'/>
<id>urn:sha1:2d2384bbaff0ab84c868b553c74048a5f6acc9e3</id>
<content type='text'>
At present mkimage displays the node information but it is not clear what
signing action was taken. Add a message that shows it. For now it only
supports showing a single signing action, since that is the common case.

Sample:

   Signature written to 'sha1-basic/test.fit',
       node '/configurations/conf-1/signature'
   Public key written to 'sha1-basic/sandbox-u-boot.dtb',
       node '/signature/key-dev'

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>mkimage: struct stat.st_size may not be long</title>
<updated>2022-01-24T15:35:10Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-15T19:12:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c28f2499952a78609e80d3b1f7aca9b0aab8d6d6'/>
<id>urn:sha1:c28f2499952a78609e80d3b1f7aca9b0aab8d6d6</id>
<content type='text'>
The component st_size of struct stat is of type off_t. Depending on the
system printing it using %ld leads to a warning:

tools/mkimage.c:438:54: warning: format '%ld' expects argument of type
'long int', but argument 5 has type
'off_t' {aka 'long long int'} [-Wformat=]
  438 |     "%s: Bad size: \"%s\" is not valid image: size %ld &lt; %u\n",
      |                                                    ~~^
      |                                                      |
      |                                                      long int
      |                                                    %lld

When comparing an off_t value to a 32bit integer we should not convert to
uint32_t but to off_t which may be wider.

Reported-by: Milan P. Stanić &lt;mps@arvanta.net&gt;
Fixes: 331f0800f1a3 ("mkimage: allow -l to work on block devices on Linux")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
</content>
</entry>
<entry>
<title>mkimage: Allow to specify the signature algorithm on the command line</title>
<updated>2022-01-24T15:35:10Z</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2022-01-14T09:21:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5902a397d029008a98e8e83b7627635ed3a2cd06'/>
<id>urn:sha1:5902a397d029008a98e8e83b7627635ed3a2cd06</id>
<content type='text'>
This permits to prepare FIT image description that do not hard-code the
final choice of the signature algorithm, possibly requiring the user to
patch the sources.

When -o &lt;algo&gt; is specified, this information is used in favor of the
'algo' property in the signature node. Furthermore, that property is set
accordingly when writing the image.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
</content>
</entry>
</feed>
