From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45218ECAAA1 for ; Mon, 31 Oct 2022 14:21:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E240984F5B; Mon, 31 Oct 2022 15:21:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ehYSBMJS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 147C285267; Mon, 31 Oct 2022 15:21:05 +0100 (CET) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7FA4B84F5B for ; Mon, 31 Oct 2022 15:20:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x732.google.com with SMTP id k26so3130845qkg.2 for ; Mon, 31 Oct 2022 07:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=50vbz9WfvKx5CU40RGEJEwwrD8reetZaLUh6sfGg1mM=; b=ehYSBMJSKZn0q17orz8DjgV/SFruK4LaEoWGD5KKmKPfELCnvtbqVFSQuM5W3knrmE J7rcelDI9O877Lw3hUYzTS9yE8068yjmcllwKa6LRZNn9f7g8vMV/TgNaFg6l47jq1aY 7MHR2ItSmybsszM55om+htJrdcPIRRhbZwr/KOqnIPEcAO+3ssV8AaPw5dLKr67eDsRN VU6AFtCRMkEsLTlmCOwKPfV/VZZEk/qJw1Ba77oDoRcXR5Bjri6BfBQT2M3sFgBB+a8L 8Q14LhCEgURjIXzSe2Ryjgy3v8YbsCx2zboCRyFkZgg5iZPQbX22ST/bYz1iFL8HAZDa XGgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=50vbz9WfvKx5CU40RGEJEwwrD8reetZaLUh6sfGg1mM=; b=ViDzmbgkmGF+3GJWGgJfsnHFlnQLkAdGQQSvhX4lTYthpUZaoSfzcTqOniRHp8TZQZ XwEWZ2Dszun8vxXlXzSyqTt9EXjYi6bnDfogQRZhshpBs3FejepklQmsbKIufP7C10XF MzFagNw+iJuW3wpfET2yFlACXtcFCCjkYnYxk33czprD0rwgNHeg1FnkF/pzb+XyGSbM 4qQU/5w086wyJuskeQN73HpzqJb4OUuj2NVkOK4JJDEZ1Qscug850M4nBizheLni5GwR yFe5a2y4Ere0X2HwsIy+eXBnmbk5hc9WM3U9M6ErhgmdiUKRvMIwNn2xz/F72zA2l5TX 9y2Q== X-Gm-Message-State: ACrzQf1/WG6dPHYC/KCk65Pacty7ZSBXxoEUaMiBkQ7OaY/BLanyhNYa 8i2CTzQaV7aNlyMNwl64hAc= X-Google-Smtp-Source: AMsMyM5mJj+fl5TpphctzoC3GtBlx4HlHirqGdEWJazYoDvuSwiaeKDeTHsoes7xMpYkDLp3jpnmwA== X-Received: by 2002:a05:620a:4008:b0:6ee:afac:8e9a with SMTP id h8-20020a05620a400800b006eeafac8e9amr9122844qko.317.1667226057945; Mon, 31 Oct 2022 07:20:57 -0700 (PDT) Received: from [192.168.1.201] (pool-173-73-95-180.washdc.fios.verizon.net. [173.73.95.180]) by smtp.gmail.com with ESMTPSA id i3-20020a05620a404300b006cbc6e1478csm4650528qko.57.2022.10.31.07.20.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 07:20:57 -0700 (PDT) Message-ID: Date: Mon, 31 Oct 2022 10:20:56 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 2/3] tools: mkimage: pass legacy image option to struct image_type_params::check_image_type handlers Content-Language: en-US To: Marc Kleine-Budde , u-boot@lists.denx.de Cc: embedded@vivavis.com References: <20221031141344.227865-1-mkl@pengutronix.de> <20221031141344.227865-3-mkl@pengutronix.de> From: Sean Anderson In-Reply-To: <20221031141344.227865-3-mkl@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 10/31/22 10:13, Marc Kleine-Budde wrote: > This is a preparation patch to allow legacy images with the > IH_TYPE_FLATDT ("flat_dt") image type. > > Signed-off-by: Marc Kleine-Budde > --- > tools/aisimage.c | 2 +- > tools/atmelimage.c | 2 +- > tools/default_image.c | 2 +- > tools/dumpimage.c | 2 +- > tools/fit_common.c | 2 +- > tools/fit_common.h | 2 +- > tools/gpimage.c | 2 +- > tools/imagetool.c | 4 ++-- > tools/imagetool.h | 5 +++-- > tools/imx8image.c | 2 +- > tools/imx8mimage.c | 2 +- > tools/imximage.c | 2 +- > tools/kwbimage.c | 2 +- > tools/lpc32xximage.c | 2 +- > tools/mkimage.c | 4 ++-- > tools/mtk_image.c | 2 +- > tools/mxsimage.c | 2 +- > tools/omapimage.c | 2 +- > tools/pblimage.c | 2 +- > tools/rkimage.c | 2 +- > tools/rksd.c | 2 +- > tools/rkspi.c | 2 +- > tools/socfpgaimage.c | 4 ++-- > tools/stm32image.c | 2 +- > tools/sunxi_egon.c | 2 +- > tools/sunxi_toc0.c | 2 +- > tools/ublimage.c | 2 +- > tools/vybridimage.c | 2 +- > tools/zynqimage.c | 2 +- > tools/zynqmpbif.c | 2 +- > tools/zynqmpimage.c | 2 +- > 31 files changed, 36 insertions(+), 35 deletions(-) > > diff --git a/tools/aisimage.c b/tools/aisimage.c > index b8b3ee32070f..21e5a8df8aad 100644 > --- a/tools/aisimage.c > +++ b/tools/aisimage.c > @@ -360,7 +360,7 @@ static int aisimage_generate(struct image_tool_params *params, > return 0; > } > > -static int aisimage_check_image_types(uint8_t type) > +static int aisimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_AISIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/atmelimage.c b/tools/atmelimage.c > index 7b3b243d58b7..3c084ba8b48d 100644 > --- a/tools/atmelimage.c > +++ b/tools/atmelimage.c > @@ -11,7 +11,7 @@ > > #define pr_err(fmt, args...) fprintf(stderr, "atmelimage Error: " fmt, ##args) > > -static int atmel_check_image_type(uint8_t type) > +static int atmel_check_image_type(uint8_t type, bool legacy) > { > if (type == IH_TYPE_ATMELIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/default_image.c b/tools/default_image.c > index 4a067e65862e..9a6b50a946ba 100644 > --- a/tools/default_image.c > +++ b/tools/default_image.c > @@ -24,7 +24,7 @@ > > static struct legacy_img_hdr header; > > -static int image_check_image_types(uint8_t type) > +static int image_check_image_types(uint8_t type, bool legacy) > { > if (((type > IH_TYPE_INVALID) && (type < IH_TYPE_FLATDT)) || > (type == IH_TYPE_KERNEL_NOLOAD) || (type == IH_TYPE_FIRMWARE_IVT)) > diff --git a/tools/dumpimage.c b/tools/dumpimage.c > index 4791dd0dfe18..3c840985f2fe 100644 > --- a/tools/dumpimage.c > +++ b/tools/dumpimage.c > @@ -119,7 +119,7 @@ int main(int argc, char **argv) > params.imagefile = argv[optind]; > > /* set tparams as per input type_id */ > - tparams = imagetool_get_type(params.type); > + tparams = imagetool_get_type(¶ms); > if (!params.lflag && tparams == NULL) { > fprintf(stderr, "%s: unsupported type: %s\n", > params.cmdname, genimg_get_type_name(params.type)); > diff --git a/tools/fit_common.c b/tools/fit_common.c > index 01649760ac00..b4aa89b53577 100644 > --- a/tools/fit_common.c > +++ b/tools/fit_common.c > @@ -41,7 +41,7 @@ int fit_verify_header(unsigned char *ptr, int image_size, > return EXIT_SUCCESS; > } > > -int fit_check_image_types(uint8_t type) > +int fit_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_FLATDT) > return EXIT_SUCCESS; > diff --git a/tools/fit_common.h b/tools/fit_common.h > index 920a16acfdb2..0fd7a504cf05 100644 > --- a/tools/fit_common.h > +++ b/tools/fit_common.h > @@ -21,7 +21,7 @@ > int fit_verify_header(unsigned char *ptr, int image_size, > struct image_tool_params *params); > > -int fit_check_image_types(uint8_t type); > +int fit_check_image_types(uint8_t type, bool legacy); > > /** > * Map an FDT into memory, optionally increasing its size > diff --git a/tools/gpimage.c b/tools/gpimage.c > index 27de4cfaed77..eda2532ac87a 100644 > --- a/tools/gpimage.c > +++ b/tools/gpimage.c > @@ -26,7 +26,7 @@ > static uint8_t gpimage_header[GPIMAGE_HDR_SIZE]; > > /* to be in keystone gpimage */ > -static int gpimage_check_image_types(uint8_t type) > +static int gpimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_GPIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/imagetool.c b/tools/imagetool.c > index f14ca2fb979f..ff8a293f8a50 100644 > --- a/tools/imagetool.c > +++ b/tools/imagetool.c > @@ -9,7 +9,7 @@ > > #include > > -struct image_type_params *imagetool_get_type(int type) > +struct image_type_params *imagetool_get_type(const struct image_tool_params *params) > { > struct image_type_params **curr; > INIT_SECTION(image_type); > @@ -19,7 +19,7 @@ struct image_type_params *imagetool_get_type(int type) > > for (curr = start; curr != end; curr++) { > if ((*curr)->check_image_type) { > - if (!(*curr)->check_image_type(type)) > + if (!(*curr)->check_image_type(params->type, params->Lflag)) > return *curr; > } > } > diff --git a/tools/imagetool.h b/tools/imagetool.h > index ca7c2e48ba91..a64780e16d2d 100644 > --- a/tools/imagetool.h > +++ b/tools/imagetool.h > @@ -50,6 +50,7 @@ struct image_tool_params { > int fflag; > int iflag; > int lflag; > + int Lflag; > int pflag; > int vflag; > int xflag; > @@ -149,7 +150,7 @@ struct image_type_params { > * whether input (-T ) is supported by registered image > * generation/list low level code > */ > - int (*check_image_type) (uint8_t); > + int (*check_image_type) (uint8_t, bool); > /* This callback function will be executed if fflag is defined */ > int (*fflag_handle) (struct image_tool_params *); > /* > @@ -175,7 +176,7 @@ struct image_type_params { > * if input type_id is not supported by any of image_type_support > * returns NULL > */ > -struct image_type_params *imagetool_get_type(int type); > +struct image_type_params *imagetool_get_type(const struct image_tool_params *params); > > /* > * imagetool_verify_print_header() - verifies the image header > diff --git a/tools/imx8image.c b/tools/imx8image.c > index 01e14869114f..77f8d11f5c85 100644 > --- a/tools/imx8image.c > +++ b/tools/imx8image.c > @@ -34,7 +34,7 @@ static void imx8image_print_header(const void *ptr) > { > } > > -static int imx8image_check_image_types(uint8_t type) > +static int imx8image_check_image_types(uint8_t type, bool legacy) > { > return (type == IH_TYPE_IMX8IMAGE) ? EXIT_SUCCESS : EXIT_FAILURE; > } > diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c > index 35d0a92bfdf0..9316445400ed 100644 > --- a/tools/imx8mimage.c > +++ b/tools/imx8mimage.c > @@ -64,7 +64,7 @@ static void imx8mimage_print_header(const void *ptr) > { > } > > -static int imx8mimage_check_image_types(uint8_t type) > +static int imx8mimage_check_image_types(uint8_t type, bool legacy) > { > return (type == IH_TYPE_IMX8MIMAGE) ? EXIT_SUCCESS : EXIT_FAILURE; > } > diff --git a/tools/imximage.c b/tools/imximage.c > index 5c23fba3b121..92019f520ab5 100644 > --- a/tools/imximage.c > +++ b/tools/imximage.c > @@ -794,7 +794,7 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, char *name) > } > > > -static int imximage_check_image_types(uint8_t type) > +static int imximage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_IMXIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/kwbimage.c b/tools/kwbimage.c > index 6abb9f2d5c01..2a5cf7fec6c4 100644 > --- a/tools/kwbimage.c > +++ b/tools/kwbimage.c > @@ -1952,7 +1952,7 @@ static void kwbimage_print_header(const void *ptr) > printf("Entry Point: %08x\n", mhdr->execaddr); > } > > -static int kwbimage_check_image_types(uint8_t type) > +static int kwbimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_KWBIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/lpc32xximage.c b/tools/lpc32xximage.c > index 37931f91840c..a995c53ccac9 100644 > --- a/tools/lpc32xximage.c > +++ b/tools/lpc32xximage.c > @@ -72,7 +72,7 @@ struct nand_page_0_boot_header { > > static struct nand_page_0_boot_header lpc32xximage_header; > > -static int lpc32xximage_check_image_types(uint8_t type) > +static int lpc32xximage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_LPC32XXIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/mkimage.c b/tools/mkimage.c > index 35a6b1fb799c..6d029afab3a8 100644 > --- a/tools/mkimage.c > +++ b/tools/mkimage.c > @@ -448,7 +448,7 @@ int main(int argc, char **argv) > process_args(argc, argv); > > /* set tparams as per input type_id */ > - tparams = imagetool_get_type(params.type); > + tparams = imagetool_get_type(¶ms); > if (tparams == NULL && !params.lflag) { > fprintf (stderr, "%s: unsupported type %s\n", > params.cmdname, genimg_get_type_name(params.type)); > @@ -809,7 +809,7 @@ copy_file (int ifd, const char *datafile, int pad) > uint8_t zeros[4096]; > int offset = 0; > int size, ret; > - struct image_type_params *tparams = imagetool_get_type(params.type); > + struct image_type_params *tparams = imagetool_get_type(¶ms); > > memset(zeros, 0, sizeof(zeros)); > > diff --git a/tools/mtk_image.c b/tools/mtk_image.c > index 5ef9334163de..0be0e04e7941 100644 > --- a/tools/mtk_image.c > +++ b/tools/mtk_image.c > @@ -87,7 +87,7 @@ static void crc32_normal_init(uint32_t *crc32c_table, uint32_t poly) > } > } > > -static int mtk_image_check_image_types(uint8_t type) > +static int mtk_image_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_MTKIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/mxsimage.c b/tools/mxsimage.c > index fee022aab46b..46081a3a96aa 100644 > --- a/tools/mxsimage.c > +++ b/tools/mxsimage.c > @@ -2163,7 +2163,7 @@ static void sb_free_image(struct sb_image_ctx *ictx) > /* > * MXSSB-MKIMAGE glue code. > */ > -static int mxsimage_check_image_types(uint8_t type) > +static int mxsimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_MXSIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/omapimage.c b/tools/omapimage.c > index c59cdcc79b3d..0060daa4e249 100644 > --- a/tools/omapimage.c > +++ b/tools/omapimage.c > @@ -29,7 +29,7 @@ static int do_swap32 = 0; > > static uint8_t omapimage_header[OMAP_FILE_HDR_SIZE]; > > -static int omapimage_check_image_types(uint8_t type) > +static int omapimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_OMAPIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/pblimage.c b/tools/pblimage.c > index bd639c276f9c..b0f855f9c82b 100644 > --- a/tools/pblimage.c > +++ b/tools/pblimage.c > @@ -218,7 +218,7 @@ void pbl_load_uboot(int ifd, struct image_tool_params *params) > } > } > > -static int pblimage_check_image_types(uint8_t type) > +static int pblimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_PBLIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/rkimage.c b/tools/rkimage.c > index 1c5540b1c3d1..df9e6eadfdc9 100644 > --- a/tools/rkimage.c > +++ b/tools/rkimage.c > @@ -21,7 +21,7 @@ static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd, > rkcommon_rc4_encode_spl(buf, 0, params->file_size); > } > > -static int rkimage_check_image_type(uint8_t type) > +static int rkimage_check_image_type(uint8_t type, bool legacy) > { > if (type == IH_TYPE_RKIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/rksd.c b/tools/rksd.c > index 7d46a1b07b3a..9b36c63dd042 100644 > --- a/tools/rksd.c > +++ b/tools/rksd.c > @@ -12,7 +12,7 @@ > #include "mkimage.h" > #include "rkcommon.h" > > -static int rksd_check_image_type(uint8_t type) > +static int rksd_check_image_type(uint8_t type, bool legacy) > { > if (type == IH_TYPE_RKSD) > return EXIT_SUCCESS; > diff --git a/tools/rkspi.c b/tools/rkspi.c > index f2530f7bde34..8e71f5877be1 100644 > --- a/tools/rkspi.c > +++ b/tools/rkspi.c > @@ -45,7 +45,7 @@ static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd, > } > } > > -static int rkspi_check_image_type(uint8_t type) > +static int rkspi_check_image_type(uint8_t type, bool legacy) > { > if (type == IH_TYPE_RKSPI) > return EXIT_SUCCESS; > diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c > index eba812fec969..a5d11b306376 100644 > --- a/tools/socfpgaimage.c > +++ b/tools/socfpgaimage.c > @@ -358,14 +358,14 @@ static int socfpgaimage_check_params_v1(struct image_tool_params *params) > (params->lflag && (params->dflag || params->fflag)); > } > > -static int socfpgaimage_check_image_types_v0(uint8_t type) > +static int socfpgaimage_check_image_types_v0(uint8_t type, bool legacy) > { > if (type == IH_TYPE_SOCFPGAIMAGE) > return EXIT_SUCCESS; > return EXIT_FAILURE; > } > > -static int socfpgaimage_check_image_types_v1(uint8_t type) > +static int socfpgaimage_check_image_types_v1(uint8_t type, bool legacy) > { > if (type == IH_TYPE_SOCFPGAIMAGE_V1) > return EXIT_SUCCESS; > diff --git a/tools/stm32image.c b/tools/stm32image.c > index 18357c051822..7bfae93e1074 100644 > --- a/tools/stm32image.c > +++ b/tools/stm32image.c > @@ -70,7 +70,7 @@ static uint32_t stm32image_checksum(void *start, uint32_t len) > return csum; > } > > -static int stm32image_check_image_types(uint8_t type) > +static int stm32image_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_STM32IMAGE) > return EXIT_SUCCESS; > diff --git a/tools/sunxi_egon.c b/tools/sunxi_egon.c > index d45b6f5e4352..7a1a4ce0f96a 100644 > --- a/tools/sunxi_egon.c > +++ b/tools/sunxi_egon.c > @@ -166,7 +166,7 @@ static void egon_set_header(void *buf, struct stat *sbuf, int infd, > header->check_sum = cpu_to_le32(checksum); > } > > -static int egon_check_image_type(uint8_t type) > +static int egon_check_image_type(uint8_t type, bool legacy) > { > return type == IH_TYPE_SUNXI_EGON ? 0 : 1; > } > diff --git a/tools/sunxi_toc0.c b/tools/sunxi_toc0.c > index 7a8d74bb8e49..1a25ae64d5b7 100644 > --- a/tools/sunxi_toc0.c > +++ b/tools/sunxi_toc0.c > @@ -883,7 +883,7 @@ err: > exit(ret); > } > > -static int toc0_check_image_type(uint8_t type) > +static int toc0_check_image_type(uint8_t type, bool legacy) > { > return type == IH_TYPE_SUNXI_TOC0 ? 0 : 1; > } > diff --git a/tools/ublimage.c b/tools/ublimage.c > index 1d2e897f6b35..0cb443f32874 100644 > --- a/tools/ublimage.c > +++ b/tools/ublimage.c > @@ -183,7 +183,7 @@ static uint32_t parse_cfg_file(struct ubl_header *ublhdr, char *name) > return dcd_len; > } > > -static int ublimage_check_image_types(uint8_t type) > +static int ublimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_UBLIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/vybridimage.c b/tools/vybridimage.c > index 94a6684c19b7..a828c7886175 100644 > --- a/tools/vybridimage.c > +++ b/tools/vybridimage.c > @@ -30,7 +30,7 @@ struct nand_page_0_boot_header { > > static struct nand_page_0_boot_header vybridimage_header; > > -static int vybridimage_check_image_types(uint8_t type) > +static int vybridimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_VYBRIDIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/zynqimage.c b/tools/zynqimage.c > index d3f418b0612b..95d18ddded9b 100644 > --- a/tools/zynqimage.c > +++ b/tools/zynqimage.c > @@ -220,7 +220,7 @@ static int zynqimage_check_params(struct image_tool_params *params) > return !(params->lflag || params->dflag); > } > > -static int zynqimage_check_image_types(uint8_t type) > +static int zynqimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_ZYNQIMAGE) > return EXIT_SUCCESS; > diff --git a/tools/zynqmpbif.c b/tools/zynqmpbif.c > index 82ce0ac1a520..747b4349a59e 100644 > --- a/tools/zynqmpbif.c > +++ b/tools/zynqmpbif.c > @@ -102,7 +102,7 @@ static int zynqmpbif_check_params(struct image_tool_params *params) > return !(params->lflag || params->dflag); > } > > -static int zynqmpbif_check_image_types(uint8_t type) > +static int zynqmpbif_check_image_types(uint8_t type, bool legacy) > { > return (type == IH_TYPE_ZYNQMPBIF) ? EXIT_SUCCESS : EXIT_FAILURE; > } > diff --git a/tools/zynqmpimage.c b/tools/zynqmpimage.c > index 19b2f02ff150..9c33e17ca11d 100644 > --- a/tools/zynqmpimage.c > +++ b/tools/zynqmpimage.c > @@ -295,7 +295,7 @@ static int zynqmpimage_check_params(struct image_tool_params *params) > return !(params->lflag || params->dflag); > } > > -static int zynqmpimage_check_image_types(uint8_t type) > +static int zynqmpimage_check_image_types(uint8_t type, bool legacy) > { > if (type == IH_TYPE_ZYNQMPIMAGE) > return EXIT_SUCCESS; Why not add a new image type IH_TYPE_FLATDT_ANDNOTFIT or whatever? --Sean