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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77197C433EF for ; Wed, 10 Nov 2021 08:23:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F1D15611C0 for ; Wed, 10 Nov 2021 08:23:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F1D15611C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4A09A8399B; Wed, 10 Nov 2021 09:23:42 +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=1636532622; bh=h+mlKAM/pRIoo3aX2wPCY5/Kwc5qvD0Bk3RGESaWFaw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PUP75UaI1CB+vUm9XYGJmUAzW0vuV0sbTd3a/HHkpG5aGdUoITmlZ92zaz+gR16a0 ZUqn2q/d1Kh8XYO3ctZ48SiNzF0FuPVllqxBDScyNs+G6XBbeDy3VXbUF1XSXa7BbQ WaEpTyIZHNuFe+Boe29esJljyubPWJXbG/YaLc/fKzDq9eC0lscAG+goJD75SuSq/6 Tz1lvMH2Mv1Q4ElyaRi8/aZ8i8WSFORhGG2Cb8Q8+KlqZctD0hhb0wcVdv9H9IjvmE 56jpEj71a52KbTyaEJYdMhQlb8oYAZTjN9/hykPul0UdGb8wzhR+gtj7XXa1P5nQHx Jy+IePbsT6qAA== Received: by phobos.denx.de (Postfix, from userid 109) id 00A858399B; Wed, 10 Nov 2021 09:23:41 +0100 (CET) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [91.198.250.252]) (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 CFFCB83995 for ; Wed, 10 Nov 2021 09:23:36 +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 smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2: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 4HpyY45VCczQkFr; Wed, 10 Nov 2021 09:23:36 +0100 (CET) Message-ID: <9d661d88-f056-3163-bcb9-1a29a22590c6@denx.de> Date: Wed, 10 Nov 2021 09:23:32 +0100 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell 02/11] tools: kwbimage: Explicitly set version also for kwbimage v0 Content-Language: en-US To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: u-boot@lists.denx.de, =?UTF-8?Q?Pali_Roh=c3=a1r?= , =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20211108171251.25382-1-kabel@kernel.org> <20211108171251.25382-3-kabel@kernel.org> From: Stefan Roese In-Reply-To: <20211108171251.25382-3-kabel@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.34 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.2 at phobos.denx.de X-Virus-Status: Clean On 08.11.21 18:12, Marek Behún wrote: > From: Pali Rohár > > For documentation purposes update struct main_hdr_v0 to include information > where version of the image must be stored. For kwbimage v0 it obviously > must be 0. By default all image header memory is initialized to zero, > therefore this change has no functional effect. > > Signed-off-by: Pali Rohár > Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > tools/kwbimage.c | 1 + > tools/kwbimage.h | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/kwbimage.c b/tools/kwbimage.c > index f24d49496b..d29f2cfcce 100644 > --- a/tools/kwbimage.c > +++ b/tools/kwbimage.c > @@ -881,6 +881,7 @@ static void *image_create_v0(size_t *imagesz, struct image_tool_params *params, > cpu_to_le32(payloadsz - headersz); > main_hdr->srcaddr = cpu_to_le32(headersz); > main_hdr->ext = has_ext; > + main_hdr->version = 0; > main_hdr->destaddr = cpu_to_le32(params->addr); > main_hdr->execaddr = cpu_to_le32(params->ep); > > diff --git a/tools/kwbimage.h b/tools/kwbimage.h > index f1ba95c2fa..f74767e633 100644 > --- a/tools/kwbimage.h > +++ b/tools/kwbimage.h > @@ -42,7 +42,8 @@ struct main_hdr_v0 { > uint8_t nandeccmode; /* 0x1 */ > uint16_t nandpagesize; /* 0x2-0x3 */ > uint32_t blocksize; /* 0x4-0x7 */ > - uint32_t rsvd1; /* 0x8-0xB */ > + uint8_t version; /* 0x8 */ > + uint8_t rsvd1[3]; /* 0x9-0xB */ > uint32_t srcaddr; /* 0xC-0xF */ > uint32_t destaddr; /* 0x10-0x13 */ > uint32_t execaddr; /* 0x14-0x17 */ > 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