<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/tools/imagetool.c, branch v2015.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>tools/imagetool: remove linker script</title>
<updated>2015-02-16T17:41:41+00:00</updated>
<author>
<name>Andreas Bießmann</name>
<email>andreas.devel@googlemail.com</email>
</author>
<published>2015-02-08T23:06:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1fddd7b63c69b8da40b5dc737db0382f473f9644'/>
<id>1fddd7b63c69b8da40b5dc737db0382f473f9644</id>
<content type='text'>
Commit a93648d197df48fa46dd55f925ff70468bd81c71 introduced linker generated
lists for imagetool which is the base for some host tools (mkimage, dumpimage,
et al.).  Unfortunately some host tool chains do not support the used type of
linker scripts. Therefore this commit broke these host-tools for them, namely
FreeBSD and Darwin (OS/X).

This commit tries to fix this. In order to have a clean distinction between host
and embedded code space we need to introduce our own linker generated list
instead of re-using the available linker_lists.h provided functionality.  So we
copy the implementation used in linux kernel script/mod/file2alias.c which has
the very same problem (cause it is a host tool). This code also comes with an
abstraction for Mach-O binary format used in Darwin systems.

Signed-off-by: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Cc: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit a93648d197df48fa46dd55f925ff70468bd81c71 introduced linker generated
lists for imagetool which is the base for some host tools (mkimage, dumpimage,
et al.).  Unfortunately some host tool chains do not support the used type of
linker scripts. Therefore this commit broke these host-tools for them, namely
FreeBSD and Darwin (OS/X).

This commit tries to fix this. In order to have a clean distinction between host
and embedded code space we need to introduce our own linker generated list
instead of re-using the available linker_lists.h provided functionality.  So we
copy the implementation used in linux kernel script/mod/file2alias.c which has
the very same problem (cause it is a host tool). This code also comes with an
abstraction for Mach-O binary format used in Darwin systems.

Signed-off-by: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Cc: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dumpimage: replace the term "datafile" by "subimage"</title>
<updated>2015-01-29T18:38:41+00:00</updated>
<author>
<name>Guilherme Maciel Ferreira</name>
<email>guilherme.maciel.ferreira@gmail.com</email>
</author>
<published>2015-01-15T04:54:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67f946cd18ce56a7caf6195834334a585a669056'/>
<id>67f946cd18ce56a7caf6195834334a585a669056</id>
<content type='text'>
Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>imagetool: replace image registration function by linker_lists feature</title>
<updated>2015-01-29T18:38:41+00:00</updated>
<author>
<name>Guilherme Maciel Ferreira</name>
<email>guilherme.maciel.ferreira@gmail.com</email>
</author>
<published>2015-01-15T04:48:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a93648d197df48fa46dd55f925ff70468bd81c71'/>
<id>a93648d197df48fa46dd55f925ff70468bd81c71</id>
<content type='text'>
The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c

This commit also removes all registration functions, and the member "next"
from image_type_params struct

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c

This commit also removes all registration functions, and the member "next"
from image_type_params struct

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>imagetool: make the image_save_datafile() available to all image types</title>
<updated>2015-01-29T18:38:41+00:00</updated>
<author>
<name>Guilherme Maciel Ferreira</name>
<email>guilherme.maciel.ferreira@gmail.com</email>
</author>
<published>2015-01-15T04:48:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=067d15607598884e270f3076c721f56d3c4f65e6'/>
<id>067d15607598884e270f3076c721f56d3c4f65e6</id>
<content type='text'>
Move the image_save_datafile() function from an U-Multi specific file
(default_image.c) to a file common to all image types (image.c). And rename it
to genimg_save_datafile(), to make clear it is useful for any image type.

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the image_save_datafile() function from an U-Multi specific file
(default_image.c) to a file common to all image types (image.c). And rename it
to genimg_save_datafile(), to make clear it is useful for any image type.

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>imagetool: move common code to imagetool module</title>
<updated>2015-01-29T18:38:41+00:00</updated>
<author>
<name>Guilherme Maciel Ferreira</name>
<email>guilherme.maciel.ferreira@gmail.com</email>
</author>
<published>2015-01-15T04:48:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0ca6691c2ec20ff264d882854c339795579991f5'/>
<id>0ca6691c2ec20ff264d882854c339795579991f5</id>
<content type='text'>
The get_type() and verify_print_header() functions have the
same code on both dumpimage.c and mkimage.c modules.

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The get_type() and verify_print_header() functions have the
same code on both dumpimage.c and mkimage.c modules.

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: socfpga: Add socfpga preloader signing to mkimage</title>
<updated>2014-10-06T15:38:17+00:00</updated>
<author>
<name>Charles Manning</name>
<email>cdhmanning@gmail.com</email>
</author>
<published>2014-03-06T02:40:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=832472a94d1adb4f1f86e491a2387c43c960b4e2'/>
<id>832472a94d1adb4f1f86e491a2387c43c960b4e2</id>
<content type='text'>
Like many platforms, the Altera socfpga platform requires that the
preloader be "signed" in a certain way or the built-in boot ROM will
not boot the code.

This change automatically creates an appropriately signed preloader
from an SPL image.

The signed image includes a CRC which must, of course, be generated
with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
the boot ROM will reject the image.

Unfortunately the CRC used in this boot ROM is not the same as the
Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
CRC but is more correctly described as a checksum.

Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.

Signed-off-by: Charles Manning &lt;cdhmanning@gmail.com&gt;
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Chin Liang See &lt;clsee@altera.com&gt;
Cc: Dinh Nguyen &lt;dinguyen@altera.com&gt;
Cc: Albert Aribaud &lt;albert.u.boot@aribaud.net&gt;
Cc: Tom Rini &lt;trini@ti.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Pavel Machek &lt;pavel@denx.de&gt;
Acked-by: Pavel Machek &lt;pavel@denx.de&gt;

V2: - Zap unused constant
    - Explicitly print an error message in case of error
    - Rework the hdr_checksum() function to take the *header directly
      instead of a plan buffer pointer
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like many platforms, the Altera socfpga platform requires that the
preloader be "signed" in a certain way or the built-in boot ROM will
not boot the code.

This change automatically creates an appropriately signed preloader
from an SPL image.

The signed image includes a CRC which must, of course, be generated
with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
the boot ROM will reject the image.

Unfortunately the CRC used in this boot ROM is not the same as the
Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
CRC but is more correctly described as a checksum.

Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.

Signed-off-by: Charles Manning &lt;cdhmanning@gmail.com&gt;
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Chin Liang See &lt;clsee@altera.com&gt;
Cc: Dinh Nguyen &lt;dinguyen@altera.com&gt;
Cc: Albert Aribaud &lt;albert.u.boot@aribaud.net&gt;
Cc: Tom Rini &lt;trini@ti.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Pavel Machek &lt;pavel@denx.de&gt;
Acked-by: Pavel Machek &lt;pavel@denx.de&gt;

V2: - Zap unused constant
    - Explicitly print an error message in case of error
    - Rework the hdr_checksum() function to take the *header directly
      instead of a plan buffer pointer
</pre>
</div>
</content>
</entry>
<entry>
<title>mkimage: add atmelimage</title>
<updated>2014-05-26T22:10:48+00:00</updated>
<author>
<name>Andreas Bießmann</name>
<email>andreas.devel@googlemail.com</email>
</author>
<published>2014-05-19T12:23:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7b1a411743db47648b2955c414a71836823acfd9'/>
<id>7b1a411743db47648b2955c414a71836823acfd9</id>
<content type='text'>
The new atmelimage converts a machine code BLOB to bootable ROM image. Atmel
ROM has no sophisticated image format, it only checks the first 7 ARM vectors.
The vectors can contain valid B or LDR opcodes, the 6'th vector contains the
image size to load.

Additionally the PMECC header can be written by the atmelimage target. The
parameters must be given via the -n switch as a coma separated list. For
example:

mkimage -T atmelimage \
 -n usePmecc=1,sectorPerPage=4,sectorSize=512,spareSize=64,eccBits=4,eccOffset=36 \
 -d spl/u-boot-spl.bin boot.bin

A provided image can be checked for correct header setup. It prints out the
PMECC header parameters if it has one and the 6'th interrupt vector content.

---8&lt;---
Image Type:	ATMEL ROM-Boot Image with PMECC Header
		PMECC header
		====================
		eccOffset:        36
		sectorSize:      512
		eccBitReq:         4
		spareSize:        64
		nbSectorPerPage:   4
		usePmecc:          1
		====================
		6'th vector has 17044 set
---&gt;8---

A SPL binary modified with the atmelimage mkimage target was succesfully
booted on a sama5d34ek via MMC and NAND.

Signed-off-by: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Cc: Bo Shen &lt;voice.shen@atmel.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Tested-by: Bo Shen &lt;voice.shen@atmel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new atmelimage converts a machine code BLOB to bootable ROM image. Atmel
ROM has no sophisticated image format, it only checks the first 7 ARM vectors.
The vectors can contain valid B or LDR opcodes, the 6'th vector contains the
image size to load.

Additionally the PMECC header can be written by the atmelimage target. The
parameters must be given via the -n switch as a coma separated list. For
example:

mkimage -T atmelimage \
 -n usePmecc=1,sectorPerPage=4,sectorSize=512,spareSize=64,eccBits=4,eccOffset=36 \
 -d spl/u-boot-spl.bin boot.bin

A provided image can be checked for correct header setup. It prints out the
PMECC header parameters if it has one and the 6'th interrupt vector content.

---8&lt;---
Image Type:	ATMEL ROM-Boot Image with PMECC Header
		PMECC header
		====================
		eccOffset:        36
		sectorSize:      512
		eccBitReq:         4
		spareSize:        64
		nbSectorPerPage:   4
		usePmecc:          1
		====================
		6'th vector has 17044 set
---&gt;8---

A SPL binary modified with the atmelimage mkimage target was succesfully
booted on a sama5d34ek via MMC and NAND.

Signed-off-by: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Cc: Bo Shen &lt;voice.shen@atmel.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Tested-by: Bo Shen &lt;voice.shen@atmel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: mkimage: add support for gpimage format</title>
<updated>2014-04-17T21:24:38+00:00</updated>
<author>
<name>Karicheri, Muralidharan</name>
<email>m-karicheri2@ti.com</email>
</author>
<published>2014-04-04T17:16:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bf411ea9f11a757cb3916f3a2e9753f4e0208672'/>
<id>bf411ea9f11a757cb3916f3a2e9753f4e0208672</id>
<content type='text'>
This patch add support for gpimage format as a preparatory
patch for porting u-boot for keystone2 devices and is
based on omapimage format. It re-uses gph header to store the
size and loadaddr as done in omapimage.c

Signed-off-by: Vitaly Andrianov &lt;vitalya@ti.com&gt;
Signed-off-by: Murali Karicheri &lt;m-karicheri2@ti.com&gt;
Acked-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch add support for gpimage format as a preparatory
patch for porting u-boot for keystone2 devices and is
based on omapimage format. It re-uses gph header to store the
size and loadaddr as done in omapimage.c

Signed-off-by: Vitaly Andrianov &lt;vitalya@ti.com&gt;
Signed-off-by: Murali Karicheri &lt;m-karicheri2@ti.com&gt;
Acked-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: moved code common to all image tools to a separated module.</title>
<updated>2013-12-13T14:15:32+00:00</updated>
<author>
<name>Guilherme Maciel Ferreira</name>
<email>guilherme.maciel.ferreira@gmail.com</email>
</author>
<published>2013-12-01T19:43:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f86ed6a8d52c99bb2d17d3cac1647edca0c4399c'/>
<id>f86ed6a8d52c99bb2d17d3cac1647edca0c4399c</id>
<content type='text'>
In order to avoid duplicating code and keep only one point of modification,
the functions, structs and defines useful for "dumpimage" were moved from
"mkimage" to a common module called "imagetool".

This modification also weakens the coupling between image types (FIT, IMX, MXS,
and so on) and image tools (mkimage and dumpimage). Any tool may initialize the
"imagetool" through register_image_tool() function, while the image types
register themselves within an image tool using the register_image_type()
function:

                                                      +---------------+
                                               +------|   fit_image   |
 +--------------+          +-----------+       |      +---------------+
 |    mkimage   |--------&gt; |           | &lt;-----+
 +--------------+          |           |              +---------------+
                           | imagetool | &lt;------------|    imximage   |
 +--------------+          |           |              +---------------+
 |  dumpimage   |--------&gt; |           | &lt;-----+
 +--------------+          +-----------+       |      +---------------+
                                               +------| default_image |
                                                      +---------------+

          register_image_tool()           register_image_type()

Also, the struct "mkimage_params" was renamed to "image_tool_params" to make
clear its general purpose.

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to avoid duplicating code and keep only one point of modification,
the functions, structs and defines useful for "dumpimage" were moved from
"mkimage" to a common module called "imagetool".

This modification also weakens the coupling between image types (FIT, IMX, MXS,
and so on) and image tools (mkimage and dumpimage). Any tool may initialize the
"imagetool" through register_image_tool() function, while the image types
register themselves within an image tool using the register_image_type()
function:

                                                      +---------------+
                                               +------|   fit_image   |
 +--------------+          +-----------+       |      +---------------+
 |    mkimage   |--------&gt; |           | &lt;-----+
 +--------------+          |           |              +---------------+
                           | imagetool | &lt;------------|    imximage   |
 +--------------+          |           |              +---------------+
 |  dumpimage   |--------&gt; |           | &lt;-----+
 +--------------+          +-----------+       |      +---------------+
                                               +------| default_image |
                                                      +---------------+

          register_image_tool()           register_image_type()

Also, the struct "mkimage_params" was renamed to "image_tool_params" to make
clear its general purpose.

Signed-off-by: Guilherme Maciel Ferreira &lt;guilherme.maciel.ferreira@gmail.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
