From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 26 May 2014 07:30:07 +0200 Subject: [U-Boot] [PATCH v4 1/4] bootm: make use of legacy image format configurable In-Reply-To: References: <1400568547-22681-1-git-send-email-hs@denx.de> <1400568547-22681-2-git-send-email-hs@denx.de> Message-ID: <5382D15F.1030204@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, Am 24.05.2014 02:04, schrieb Simon Glass: > Hi Heiko, > > On 19 May 2014 20:49, Heiko Schocher 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 >> Cc: Simon Glass >> Cc: Lars Steubesand >> Cc: Mike Pearce >> Cc: Wolfgang Denk >> Cc: Tom Rini >> Cc: Michal Simek >> >> --- >> - 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