<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/image.h, branch v2021.04</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>image: Avoid -ENODATA in host tools</title>
<updated>2021-03-17T16:50:19+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-24T13:50:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=29cbc4babf0a971986cccd73986908d1b8f07bda'/>
<id>29cbc4babf0a971986cccd73986908d1b8f07bda</id>
<content type='text'>
Unfortunately -ENODATA is not available in OpenBSD. Use -EBADMSG
instead, to indicate a missing timestamp.

Fixes: c5819701a3d image: Adjust the workings of fit_check_format()
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unfortunately -ENODATA is not available in OpenBSD. Use -EBADMSG
instead, to indicate a missing timestamp.

Fixes: c5819701a3d image: Adjust the workings of fit_check_format()
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image: Do not #if guard board_fit_image_post_process() prototype</title>
<updated>2021-02-18T00:46:43+00:00</updated>
<author>
<name>Alexandru Gagniuc</name>
<email>mr.nuke.me@gmail.com</email>
</author>
<published>2021-01-20T16:46:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9e304239785dce3100303bf3dc211cf544247da0'/>
<id>9e304239785dce3100303bf3dc211cf544247da0</id>
<content type='text'>
There's no point in guarding function prototypes with #ifdefs. If a
function is not defined, the linker will notice. Having the prototype
does not affect code size.

What the #if guard takes away is the ability to use IS_ENABLED:

	if (CONFIG_IS ENABLED(FIT_IMAGE_POST_PROCESS))
		board_fit_image_post_process(...)

When the prototype is guarded, the above form cannot be used. This
leads to the proliferation of #ifdefs, and unreadable code. The
opportunity cost of the #if guard outweighs any benefits. Remove it.

Since the original version of this patch, an empty definition was
added by commit f14e6eec6c7f ("image: cleanup pre-processor usage").
The empty definition can cause silent failures, when an implementation
of board_fit_image_post_process() is expected because the linker will
not catch the missing function. Thus this patch removes this empty
inline declaration.

Fixes: f14e6eec6c7f ("image: cleanup pre-processor usage")
Signed-off-by: Alexandru Gagniuc &lt;mr.nuke.me@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no point in guarding function prototypes with #ifdefs. If a
function is not defined, the linker will notice. Having the prototype
does not affect code size.

What the #if guard takes away is the ability to use IS_ENABLED:

	if (CONFIG_IS ENABLED(FIT_IMAGE_POST_PROCESS))
		board_fit_image_post_process(...)

When the prototype is guarded, the above form cannot be used. This
leads to the proliferation of #ifdefs, and unreadable code. The
opportunity cost of the #if guard outweighs any benefits. Remove it.

Since the original version of this patch, an empty definition was
added by commit f14e6eec6c7f ("image: cleanup pre-processor usage").
The empty definition can cause silent failures, when an implementation
of board_fit_image_post_process() is expected because the linker will
not catch the missing function. Thus this patch removes this empty
inline declaration.

Fixes: f14e6eec6c7f ("image: cleanup pre-processor usage")
Signed-off-by: Alexandru Gagniuc &lt;mr.nuke.me@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image: Adjust the workings of fit_check_format()</title>
<updated>2021-02-16T03:31:52+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-16T00:08:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c5819701a3de61e2ba2ef7ad0b616565b32305e5'/>
<id>c5819701a3de61e2ba2ef7ad0b616565b32305e5</id>
<content type='text'>
At present this function does not accept a size for the FIT. This means
that it must be read from the FIT itself, introducing potential security
risk. Update the function to include a size parameter, which can be
invalid, in which case fit_check_format() calculates it.

For now no callers pass the size, but this can be updated later.

Also adjust the return value to an error code so that all the different
types of problems can be distinguished by the user.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Bruce Monroe &lt;bruce.monroe@intel.com&gt;
Reported-by: Arie Haenel &lt;arie.haenel@intel.com&gt;
Reported-by: Julien Lenoir &lt;julien.lenoir@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At present this function does not accept a size for the FIT. This means
that it must be read from the FIT itself, introducing potential security
risk. Update the function to include a size parameter, which can be
invalid, in which case fit_check_format() calculates it.

For now no callers pass the size, but this can be updated later.

Also adjust the return value to an error code so that all the different
types of problems can be distinguished by the user.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Bruce Monroe &lt;bruce.monroe@intel.com&gt;
Reported-by: Arie Haenel &lt;arie.haenel@intel.com&gt;
Reported-by: Julien Lenoir &lt;julien.lenoir@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: mkimage: Add Allwinner eGON support</title>
<updated>2021-01-11T23:19:33+00:00</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2018-12-20T01:15:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6d295099cc96ed39cd2229dad376ab00baba9a5d'/>
<id>6d295099cc96ed39cd2229dad376ab00baba9a5d</id>
<content type='text'>
So far we used the separate mksunxiboot tool for generating a bootable
image for Allwinner SPLs, probably just for historical reasons.

Use the mkimage framework to generate a so called eGON image the
Allwinner BROM expects.
The new image type is called "sunxi_egon", to differentiate it
from the (still to be implemented) secure boot TOC0 image.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Jernej Skrabec &lt;jernej.skrabec@siol.net&gt;
Reviewed-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far we used the separate mksunxiboot tool for generating a bootable
image for Allwinner SPLs, probably just for historical reasons.

Use the mkimage framework to generate a so called eGON image the
Allwinner BROM expects.
The new image type is called "sunxi_egon", to differentiate it
from the (still to be implemented) secure boot TOC0 image.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Jernej Skrabec &lt;jernej.skrabec@siol.net&gt;
Reviewed-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image: cleanup pre-processor usage</title>
<updated>2021-01-05T13:21:48+00:00</updated>
<author>
<name>Sebastian Reichel</name>
<email>sebastian.reichel@collabora.com</email>
</author>
<published>2021-01-04T19:48:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f14e6eec6c7fe5c0a77491bdb62961ae8dacb503'/>
<id>f14e6eec6c7fe5c0a77491bdb62961ae8dacb503</id>
<content type='text'>
Replace most #ifdef checks for USE_HOSTCC and CONFIG_*
with normal if instructions.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace most #ifdef checks for USE_HOSTCC and CONFIG_*
with normal if instructions.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: update: add a generic interface for FIT image</title>
<updated>2020-10-30T13:20:27+00:00</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2020-10-29T04:47:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3149e524fc1e76ec1420cd17588c724d4232a904'/>
<id>3149e524fc1e76ec1420cd17588c724d4232a904</id>
<content type='text'>
The main purpose of this patch is to separate a generic interface for
updating firmware using DFU drivers from "auto-update" via tftp.

This function will also be used in implementing UEFI capsule update
in a later commit.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The main purpose of this patch is to separate a generic interface for
updating firmware using DFU drivers from "auto-update" via tftp.

This function will also be used in implementing UEFI capsule update
in a later commit.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cosmetic: image: Fix comments and the order of definitions</title>
<updated>2020-10-22T13:54:52+00:00</updated>
<author>
<name>Naoki Hayama</name>
<email>naoki.hayama@lineo.co.jp</email>
</author>
<published>2020-10-07T02:22:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=898a0849536381c6a1fb8d6d8ff7d46d9f6769eb'/>
<id>898a0849536381c6a1fb8d6d8ff7d46d9f6769eb</id>
<content type='text'>
Fix some comments about functions.
Move genimg_get_comp_name() above genimg_get_short_name() because
genimg_get_comp_name() is related to get_table_entry_name().

Signed-off-by: Naoki Hayama &lt;naoki.hayama@lineo.co.jp&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix some comments about functions.
Move genimg_get_comp_name() above genimg_get_short_name() because
genimg_get_comp_name() is related to get_table_entry_name().

Signed-off-by: Naoki Hayama &lt;naoki.hayama@lineo.co.jp&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image: Add a function to modify category information</title>
<updated>2020-10-22T13:54:52+00:00</updated>
<author>
<name>Naoki Hayama</name>
<email>naoki.hayama@lineo.co.jp</email>
</author>
<published>2020-10-07T02:21:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=02d41b01bd78dc863614c2919375f366abdeff40'/>
<id>02d41b01bd78dc863614c2919375f366abdeff40</id>
<content type='text'>
Add a generic function which can check whether a category has an
entry ID.

Signed-off-by: Naoki Hayama &lt;naoki.hayama@lineo.co.jp&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a generic function which can check whether a category has an
entry ID.

Signed-off-by: Naoki Hayama &lt;naoki.hayama@lineo.co.jp&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fit: cipher: aes: allow to store the IV in the FIT image</title>
<updated>2020-10-13T01:30:37+00:00</updated>
<author>
<name>Philippe Reynes</name>
<email>philippe.reynes@softathome.com</email>
</author>
<published>2020-09-17T13:01:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a6982a6f768bdcf4bd0848ff4dbe68c2fd6599fb'/>
<id>a6982a6f768bdcf4bd0848ff4dbe68c2fd6599fb</id>
<content type='text'>
Binaries may be encrypted in a FIT image with AES. This
algo needs a key and an IV (Initialization Vector). The
IV is provided in a file (pointer by iv-name-hint in the
ITS file) when building the ITB file.

This commits adds provide an alternative way to manage
the IV. If the property iv-name-hint is not provided in
the ITS file, the tool mkimage will generate an random
IV and store it in the FIT image.

Signed-off-by: Philippe Reynes &lt;philippe.reynes@softathome.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Binaries may be encrypted in a FIT image with AES. This
algo needs a key and an IV (Initialization Vector). The
IV is provided in a file (pointer by iv-name-hint in the
ITS file) when building the ITB file.

This commits adds provide an alternative way to manage
the IV. If the property iv-name-hint is not provided in
the ITS file, the tool mkimage will generate an random
IV and store it in the FIT image.

Signed-off-by: Philippe Reynes &lt;philippe.reynes@softathome.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: convert bd_t to struct bd_info by coccinelle</title>
<updated>2020-07-17T13:30:13+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-06-26T06:13:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b75d8dc5642b71eb029e7cd38031a32029e736cc'/>
<id>b75d8dc5642b71eb029e7cd38031a32029e736cc</id>
<content type='text'>
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include &lt;asm/u-boot.h&gt;

  #include &lt;asm/u-boot.h&gt;
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  &lt;smpl&gt;
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  &lt;/smpl&gt;

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include &lt;asm/u-boot.h&gt;

  #include &lt;asm/u-boot.h&gt;
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  &lt;smpl&gt;
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  &lt;/smpl&gt;

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
