public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/4] bootm: make use of legacy image format configurable
Date: Mon, 26 May 2014 07:30:07 +0200	[thread overview]
Message-ID: <5382D15F.1030204@denx.de> (raw)
In-Reply-To: <CAPnjgZ20etVS9RehUGq4m0PeRnyM+u8E13Ym_bQAsyMTFz9-Jw@mail.gmail.com>

Hello Simon,

Am 24.05.2014 02:04, schrieb Simon Glass:
> Hi Heiko,
>
> On 19 May 2014 20:49, Heiko Schocher<hs@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<hs@denx.de>
>> Cc: Simon Glass<sjg@chromium.org>
>> Cc: Lars Steubesand<lars.steubesand@philips.com>
>> Cc: Mike Pearce<mike@kaew.be>
>> Cc: Wolfgang Denk<wd@denx.de>
>> Cc: Tom Rini<trini@ti.com>
>> Cc: Michal Simek<monstr@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

  reply	other threads:[~2014-05-26  5:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20  6:49 [U-Boot] [PATCH v4 0/4] mpc8313: ids8313 board updates Heiko Schocher
2014-05-20  6:49 ` [U-Boot] [PATCH v4 1/4] bootm: make use of legacy image format configurable Heiko Schocher
2014-05-24  0:04   ` Simon Glass
2014-05-26  5:30     ` Heiko Schocher [this message]
2014-05-20  6:49 ` [U-Boot] [PATCH v4 2/4] mpc8313, signed fit: enable legacy image format on ids8313 board Heiko Schocher
2014-05-20  6:49 ` [U-Boot] [PATCH v4 3/4] lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c Heiko Schocher
2014-05-20  6:49 ` [U-Boot] [PATCH v4 4/4] mpc8313: add CONFIG_SYS_GENERIC_BOARD to ids8313 board Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5382D15F.1030204@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox