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 C41BAC433EF for ; Wed, 16 Feb 2022 09:49:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AB242839EB; Wed, 16 Feb 2022 10:49:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645004960; bh=gbOaFmAC6Byme09hw6uBg6LVj8V9v9pbe6qUJcQI9p8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oR0sS62Iops2wOo6qH47S/u23jOlanvW082R25rB/8gEB8HWrnKvDEmEX3iEsxtIR 9NWY5375XIvndoiSZbw8fYvIvTYwXLoynJMcd+MEFV6o7YlaWW5qWdMIXKk7tr5z0L URs06Urhv7ytuU3aXtJSWv8J0w/Y6ORuPvOntvnRDE5X/CUMrvP4MCEOIli2+jA6px wsQUTxbq5olUDLcsz3savYxrMxtMR9Gp9xrZySJlFClohC8Kg1wARMv3Kg7zGOpXvw RUtsiE8YHC224AehqA1xQNRtuDFWopdJqOs81Y8AfpZ9/QH+StE+7Gq9hs8OhRe6Md OGUwx72McDHXg== Received: by phobos.denx.de (Postfix, from userid 109) id 1633281F9A; Wed, 16 Feb 2022 10:49:18 +0100 (CET) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [IPv6:2001:67c:2050:1::465:107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 473C383A65 for ; Wed, 16 Feb 2022 10:49:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:105:465:1:4:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4JzCpR4Tbnz9sTW; Wed, 16 Feb 2022 10:49:03 +0100 (CET) Message-ID: <240d0d00-208a-0b46-c291-2bf3530bbdfc@denx.de> Date: Wed, 16 Feb 2022 10:48:59 +0100 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell 5/7] tools: kwbimage: Add support for NAND_BLKSZ and NAND_BADBLK_LOCATION for v0 images Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , =?UTF-8?Q?Marek_Beh=c3=ban?= , Tony Dinh Cc: u-boot@lists.denx.de References: <20220215185925.16060-1-pali@kernel.org> <20220215185925.16060-6-pali@kernel.org> From: Stefan Roese In-Reply-To: <20220215185925.16060-6-pali@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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.5 at phobos.denx.de X-Virus-Status: Clean On 2/15/22 19:59, Pali Rohár wrote: > These two commands are currently not processed when generating v0 images. > > Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan > --- > tools/kwbimage.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tools/kwbimage.c b/tools/kwbimage.c > index 8fd30516c9d4..e455c10dc744 100644 > --- a/tools/kwbimage.c > +++ b/tools/kwbimage.c > @@ -985,9 +985,15 @@ static void *image_create_v0(size_t *imagesz, struct image_tool_params *params, > e = image_find_option(IMAGE_CFG_NAND_ECC_MODE); > if (e) > main_hdr->nandeccmode = e->nandeccmode; > + e = image_find_option(IMAGE_CFG_NAND_BLKSZ); > + if (e) > + main_hdr->nandblocksize = e->nandblksz / (64 * 1024); > e = image_find_option(IMAGE_CFG_NAND_PAGESZ); > if (e) > main_hdr->nandpagesize = cpu_to_le16(e->nandpagesz); > + e = image_find_option(IMAGE_CFG_NAND_BADBLK_LOCATION); > + if (e) > + main_hdr->nandbadblklocation = e->nandbadblklocation; > main_hdr->checksum = image_checksum8(image, > sizeof(struct main_hdr_v0)); > Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de