<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/u-boot.git/tools/kwbimage.c, branch rtthread_AMP</title>
<subtitle>StarFive Tech U-Boot for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=rtthread_AMP</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=rtthread_AMP'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/'/>
<updated>2021-09-01T06:09:24+00:00</updated>
<entry>
<title>tools: kwbimage: Remove comment about unimplemented register headers in v1 images</title>
<updated>2021-09-01T06:09:24+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-22T10:31:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=4116a0f38a8ba6bc5e762cd291a65df4946216e7'/>
<id>urn:sha1:4116a0f38a8ba6bc5e762cd291a65df4946216e7</id>
<content type='text'>
Support for register headers in v1 images was implemented in commit
02ba70ad6822 ("tools: kwbimage: Add support for DATA command also for v1
images"). So remove old comment.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Fixes: 02ba70ad6822 ("tools: kwbimage: Add support for DATA command also for v1 images")
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>kwbimage: check return value of image_get_csk_index</title>
<updated>2021-09-01T06:09:24+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-08-17T05:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=f0317d788221828089fe54433cf5c502d748ef77'/>
<id>urn:sha1:f0317d788221828089fe54433cf5c502d748ef77</id>
<content type='text'>
image_get_csk_index() may return -1 in case of an error. Don't use this
value as index.

This resolves Coverity CID 338488
Memory - illegal accesses  (NEGATIVE_RETURNS)

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
</entry>
<entry>
<title>kwbimage: check fopen() return value</title>
<updated>2021-09-01T06:09:24+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-08-17T05:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=f858bb2e6c191da3981838937950cb3c98e488fe'/>
<id>urn:sha1:f858bb2e6c191da3981838937950cb3c98e488fe</id>
<content type='text'>
Always check the return value of fopen().

This resolves Coverity CID 338491:
Null pointer dereferences (NULL_RETURNS)

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools: kwbimage: Use IBR_HDR_* constants instead of raw numbers</title>
<updated>2021-09-01T06:07:04+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-11T08:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=e515a33040af6c637f8f17d9bd4166b0c3bba22d'/>
<id>urn:sha1:e515a33040af6c637f8f17d9bd4166b0c3bba22d</id>
<content type='text'>
There are already IBR_HDR_* constants for these numbers, so use them.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>tools: kwbimage: Verify size of image data</title>
<updated>2021-09-01T06:07:04+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-11T08:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=a008dbaa8ce2d4142e17780177faa381fd59bb4e'/>
<id>urn:sha1:a008dbaa8ce2d4142e17780177faa381fd59bb4e</id>
<content type='text'>
Part of image data is 4 byte checksum, so every image must contain at least
4 bytes. Verify it to prevent memory corruptions.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>tools: kwbimage: Verify size of v0 image header</title>
<updated>2021-09-01T06:07:04+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-11T08:14:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=33a0af2d8041b027cfbf6ab23c93026339aff142'/>
<id>urn:sha1:33a0af2d8041b027cfbf6ab23c93026339aff142</id>
<content type='text'>
Check that extended image header size is not larger than file size.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>tools: kwbimage: Verify supported image version</title>
<updated>2021-09-01T06:07:04+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-11T08:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=b984056fa696e795625a2f5292859b73176f7713'/>
<id>urn:sha1:b984056fa696e795625a2f5292859b73176f7713</id>
<content type='text'>
Only image versions 0 and 1 are supported. Verify it in
kwbimage_verify_header() function.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>kwbimage: Update help message about how to extract from an existing image</title>
<updated>2021-07-31T07:59:58+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-07-23T09:14:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=3d7b93d51c26092010626708ba9adaf9a65a764f'/>
<id>urn:sha1:3d7b93d51c26092010626708ba9adaf9a65a764f</id>
<content type='text'>
Extracting is now supported by dumpimage, so mention it in help instead
of `kwbimage -x`.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>kwbimage: Add support for extracting images via dumpimage tool</title>
<updated>2021-07-31T07:59:58+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-07-23T09:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=aa6943ca3122db7ea0063684f94b5dbdf9c5cf51'/>
<id>urn:sha1:aa6943ca3122db7ea0063684f94b5dbdf9c5cf51</id>
<content type='text'>
The kwbimage library does not support extracting subimages. Implement it.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes</title>
<updated>2021-07-31T07:59:58+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-07-23T09:14:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=ad906753c20a5bafbb6b4f34d454ed8355fa22e7'/>
<id>urn:sha1:ad906753c20a5bafbb6b4f34d454ed8355fa22e7</id>
<content type='text'>
This padding depends on board config file and therefore it makes the
mkimage binary tool board specific, which is not correct. One cannot use
mkimage tool built as a result for board A to generate images for board
B, even if both A and B are on the same platform.

This CONFIG_SYS_U_BOOT_OFFS padding was needed when kwbimage v1 contained
SPL code which loaded U-Boot proper based on CONFIG_SYS_U_BOOT_OFFS,
instead of reading correct offset from kwbimage header.

Now that SPL code parses kwbimage header and deterinate correct offset,
there is no need for this CONFIG_SYS_U_BOOT_OFFS padding anymore.

By removing it we also reduce the size of SPL code and therefore also
decrease the final size of v1 kwbimage. This means there is more space
for U-Boot proper binary.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Chris Packham &lt;judge.packham@gmail.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
</feed>
