Hello Simon,

Am 24.05.2014 02:04, schrieb Simon Glass:
Hi Heiko,

On 19 May 2014 20:49, Heiko Schocher<h...@denx.de>  wrote:
make the use of legacy image format configurable through
the config define CONFIG_IMAGE_FORMAT_LEGACY.

When relying on signed FIT images with required signature check
the legacy image format should be disabled. Therefore introduce
this new define and enable legacy image format if CONFIG_FIT_SIGNATURE
is not set. If CONFIG_FIT_SIGNATURE is set disable per default
the legacy image format.

Signed-off-by: Heiko Schocher<h...@denx.de>
Cc: Simon Glass<s...@chromium.org>
Cc: Lars Steubesand<lars.steubes...@philips.com>
Cc: Mike Pearce<m...@kaew.be>
Cc: Wolfgang Denk<w...@denx.de>
Cc: Tom Rini<tr...@ti.com>
Cc: Michal Simek<mon...@monstr.eu>

---
- changes for v2:
   - make the legacy image format configurable through
     the define CONFIG_IMAGE_FORMAT_LEGACY.

     Default:
     if not CONFIG_FIT_SIGNATURE is defined it is enabled,
     else disabled.

     Disable it with CONFIG_DISABLE_IMAGE_LEGACY if
     CONFIG_FIT_SIGNATURE is not defined.
- changes for v3:
   - enable legacy image format for zync as default, as Michak
     suggested.

- changes for v4:
   move changes for default settings in include/config_defaults.h
   to include/config_fallbacks.h, so board settings are considered
   as Lars Steubesand suggested.
---
  README                        | 18 ++++++++++++++++++
  common/cmd_bootm.c            | 14 ++++++++++++++
  common/cmd_disk.c             |  4 ++++
  common/cmd_fdc.c              |  4 ++++
  common/cmd_fpga.c             |  2 ++
  common/cmd_nand.c             |  4 ++++
  common/cmd_source.c           |  4 ++++
  common/cmd_ximg.c             |  7 ++++++-
  common/image-fdt.c            | 10 ++++++++--
  common/image.c                | 23 ++++++++++++++++-------
  doc/uImage.FIT/signature.txt  |  3 +++
  include/config_fallbacks.h    |  8 ++++++++
  include/configs/zynq-common.h |  1 +
  include/image.h               |  2 ++
  14 files changed, 94 insertions(+), 10 deletions(-)

It all looks good to me except for one nit below.

diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index 65a8319..813543a 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -32,10 +32,13 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
  {
         ulong           addr = load_addr;
         ulong           dest = 0;
-       ulong           data, len, count;
+       ulong           data, len;
         int             verify;
         int             part = 0;
+#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
+       ulong           count;
         image_header_t  *hdr = NULL;

This is also used with CONFIG_BZIP2 (see lower in this function). This
change causes a build error in sandbox, for example.

Fixed, thanks!

I notice also that it causes a useful reduction in U-Boot size.

Yes.

bye,
Heiko
--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to