<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/imximage.c, branch v2019.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/tools/imximage.c?h=v2019.04</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/tools/imximage.c?h=v2019.04'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2018-07-23T09:04:22Z</updated>
<entry>
<title>tools/imximage: get HAB information from header</title>
<updated>2018-07-23T09:04:22Z</updated>
<author>
<name>Holger Dengler</name>
<email>dengler@linutronix.de</email>
</author>
<published>2018-07-06T14:10:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7e1a0483c36a8a53c207123262a1d108588517ad'/>
<id>urn:sha1:7e1a0483c36a8a53c207123262a1d108588517ad</id>
<content type='text'>
Signing parts of a u-boot imximage for image verification in High
Assurance Boot (HAB) in a post-build process, requires some
information from the imximage header. Currently, this information is
only provided during the image build, which makes the transfer of this
information to the post-build process harder than necessary.

The i.MX HAB information (start and length) can be calculated either
by using information from the image-configuration file, or from the
information in the flash header of the imximage.
The advantage of using information from flash header is, that they are
not only available during image creation, but also available if
existing images are processed.

Example:
$ tools/mkimage -l u-boot.imx
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    483328 Bytes = 472.00 KiB = 0.46 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00071c00
DCD Blocks:   0x00910000 0x0000002c 0x00000208

Signed-off-by: Holger Dengler &lt;dengler@linutronix.de&gt;
Tested-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
</content>
</entry>
<entry>
<title>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-06T21:58:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>urn:sha1:83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>Revert "imximage: Remove failure when no IVT offset is found"</title>
<updated>2018-04-26T07:00:44Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2018-04-15T10:37:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f3c326287e3e32f7ffcf2286462793a554b158c4'/>
<id>urn:sha1:f3c326287e3e32f7ffcf2286462793a554b158c4</id>
<content type='text'>
This reverts commit b5b0e4e351e20a606de22db6a56ad6bc1e2aa8fd.

Commit f916757300c1 ("imx: Create distinct pre-processed mkimage
config files") provided a proper fix for the parallel mkimage
config files build failure, so the original workaround can be
safely reverted now.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Reviewed-by: Stefano Babic &lt;sbabic@denx.de&gt;
</content>
</entry>
<entry>
<title>tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks</title>
<updated>2018-04-26T06:52:51Z</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2018-04-24T17:46:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=af1b492dfafc033e06da49ba05fce98504221d6c'/>
<id>urn:sha1:af1b492dfafc033e06da49ba05fce98504221d6c</id>
<content type='text'>
commit 8519c9c98ad6 ("tools/imximage: use 0x prefix in HAB Blocks line")
adds an 0x prefix to each HAB Block number to make it easier for host tools
to process the HAB Block output, however it neglects to apply the same
prefix to the DCD Blocks directive. You need the DCD Blocks directive if
you are making a u-boot recovery image which the BootROM will accept via
the USB upload utility.

This disparity results in a fruity output like this with HAB Blocks
prefixed but DCD Blocks not prefixed - which is pretty inconsistent.

This patch fixes the difference assuming the original commit was a
legitimate change.

Old:
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00066c00
DCD Blocks:   00910000 0000002c 000001d4

New:
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00066c00
DCD Blocks:   0x00910000 0x0000002c 0x000001d4

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Cc: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Cc: Breno Lima &lt;breno.lima@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Reviewed-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
</content>
</entry>
<entry>
<title>tools/imximage: use 0x prefix in HAB Blocks line</title>
<updated>2018-04-15T09:35:21Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2018-03-23T11:08:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8519c9c98ad60e9eb6f655bfa8214f53407d86fb'/>
<id>urn:sha1:8519c9c98ad60e9eb6f655bfa8214f53407d86fb</id>
<content type='text'>
The u-boot-ivt.img.log file contains 0x prefixes in the HAB Blocks line,
while the SPL.log does not. For consistency, and to make it easier to
extract and put into a .csf file for use with NXP's code signing tool,
add 0x prefixes here.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Reviewed-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Tested-by: Breno Lima &lt;breno.lima@nxp.com&gt;
</content>
</entry>
<entry>
<title>imximage: Remove failure when no IVT offset is found</title>
<updated>2018-03-09T12:04:02Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2018-03-09T11:25:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b5b0e4e351e20a606de22db6a56ad6bc1e2aa8fd'/>
<id>urn:sha1:b5b0e4e351e20a606de22db6a56ad6bc1e2aa8fd</id>
<content type='text'>
Sometimes imximage throws the following error:

  CFGS    board/freescale/vf610twr/imximage.cfg.cfgtmp
  CFGS    board/freescale/vf610twr/imximage.cfg.cfgtmp
  MKIMAGE u-boot-dtb.imx
Error: No BOOT_FROM tag in board/freescale/vf610twr/imximage.cfg.cfgtmp
arch/arm/mach-imx/Makefile:100: recipe for target 'u-boot-dtb.imx' failed

Later on, when running mkimage for the u-boot.imx it will succeed in
finding the IVT offset.

Looks like some race condition happening during parallel build when
processing mkimage for u-boot-dtb.imx and u-boot.imx.

A proper fix still needs to be implemented, but as a workaround let's
remove the error when the IVT offset is not found.

It is useful to have such message, especially during bring-up phase,
but the build error that it causes is severe, so better avoid the
build error for now.

The error checking can be re-implemented later when we have a proper
fix.

Reported-by: Breno Lima &lt;breno.lima@nxp.com&gt;
Reported-by: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
</content>
</entry>
<entry>
<title>tools: imximage: add set bit command</title>
<updated>2017-03-19T16:30:15Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2017-03-16T06:35:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3e0a71c157951c0f88a31182a6f3159cd3e12e23'/>
<id>urn:sha1:3e0a71c157951c0f88a31182a6f3159cd3e12e23</id>
<content type='text'>
Add set bit command support.
Usage: SET_BIT 4 [address] [bitmask]

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Reviewed-by: Stefano Babic &lt;sbabic@denx.de&gt;
</content>
</entry>
<entry>
<title>tools: imximage: refactor header length calculations for imximage v1</title>
<updated>2017-01-27T09:27:32Z</updated>
<author>
<name>Martin Kaiser</name>
<email>martin@kaiser.cx</email>
</author>
<published>2017-01-02T21:24:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=97f17fa6278747d059fccb8eef7f79ec3dfc9502'/>
<id>urn:sha1:97f17fa6278747d059fccb8eef7f79ec3dfc9502</id>
<content type='text'>
We can use the same header length calculations for both imximage v1 and
v2. This addresses TODO comments about imximage v1 in the current code.

With this patch applied, *header_size_ptr in imximage_set_header() will
have the correct value for both imximage v1 and v2. This is necessary
for people wanting to add proprietary data behind the created imximage.

Signed-off-by: Martin Kaiser &lt;martin@kaiser.cx&gt;
Cc: sbabic@denx.de
</content>
</entry>
<entry>
<title>tools: imximage: display DCD block offset, length</title>
<updated>2016-11-29T15:37:37Z</updated>
<author>
<name>Eric Nelson</name>
<email>eric@nelint.com</email>
</author>
<published>2016-11-17T00:13:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e5491f3ef5aa4b38067bd10dbdded9520305670f'/>
<id>urn:sha1:e5491f3ef5aa4b38067bd10dbdded9520305670f</id>
<content type='text'>
These values can be used to sign a U-Boot image for use when
loading an image through the Serial Download Protocol (SDP).

Note that the address of 0x910000 is usable with the stock
configuration of imx_usb_loader on i.MX6 and i.MX7 SOCs:

https://github.com/boundarydevices/imx_usb_loader/blob/master/mx6_usb_work.conf#L3

Refer to the section on imx_usb_loader in this post for more
details:

https://boundarydevices.com/high-assurance-boot-hab-dummies/

Signed-off-by: Eric Nelson &lt;eric@nelint.com&gt;
</content>
</entry>
<entry>
<title>tools: imximage: check return value when open the plugin file</title>
<updated>2016-11-05T11:27:44Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2016-11-04T02:33:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2a380cccc27e3964621f74f935cdcafbc21bbe35'/>
<id>urn:sha1:2a380cccc27e3964621f74f935cdcafbc21bbe35</id>
<content type='text'>
Check return value when open the plugin file.

Coverity report:
** CID 153926:  Error handling issues  (NEGATIVE_RETURNS)
/tools/imximage.c: 542 in copy_plugin_code()

   ifd = open(plugin_file, O_RDONLY|O_BINARY);
&gt;&gt;&gt;  CID 153926:  Error handling issues  (NEGATIVE_RETURNS)
&gt;&gt;&gt; "ifd" is passed to a parameter that cannot be negative.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Reported-by: Coverity (CID: 153926)
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
</feed>
