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 4702BC433EF for ; Mon, 8 Nov 2021 17:21:27 +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 AE4BB61178 for ; Mon, 8 Nov 2021 17:21:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AE4BB61178 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 0D01E838A1; Mon, 8 Nov 2021 18:21:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="HFF0xxof"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 36A4383900; Mon, 8 Nov 2021 18:13:11 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4DAFE838E5 for ; Mon, 8 Nov 2021 18:12:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 30C866113D; Mon, 8 Nov 2021 17:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636391577; bh=tf9fo8AadjmsNnbbpszOIk7sm++a+XEYwfxeJfYNleA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HFF0xxofyVqALIrMGCUHNCwdWFC5R1AutWaEWl1gLzeXzIMU2sJ3QPSBhmUcp+3R4 YMH+1wVfsgq0gooWsR4WKvOL33pNxwP5u5Ta8pVlmZl1sMvxukny7eyin4qq/C4Srr oheAOuKNAXHsky7tSP+yGvwZ5Um7nVfN1H1g2qbZq8ggLwuNJvqc4CJHLBiS8xeGX0 sIkYTMkXm1NmeFmPqGoCNJrMjX9UtZNPniyoeXCj1QW3IuGSTr3xepX3xVV10NoxPV RKtRxlDrM0Cf/xDBC1iZmTsvR3EpxCgHrcpx8GancEYOLkalKG8PEbdvzHSRIhNQpk 72RxlJB3D/AbA== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, =?UTF-8?q?Pali=20Roh=C3=A1r?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 02/11] tools: kwbimage: Explicitly set version also for kwbimage v0 Date: Mon, 8 Nov 2021 18:12:42 +0100 Message-Id: <20211108171251.25382-3-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211108171251.25382-1-kabel@kernel.org> References: <20211108171251.25382-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 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 --- 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 */ -- 2.32.0