From patchwork Mon Dec 18 09:40:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 849942 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="WbX+X9XL"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z0blJ0t8Sz9s4q for ; Mon, 18 Dec 2017 20:46:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 951E6C21DB0; Mon, 18 Dec 2017 09:44:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9263EC21F18; Mon, 18 Dec 2017 09:44:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8CCEBC21EEB; Mon, 18 Dec 2017 09:40:51 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id 7624CC21F34 for ; Mon, 18 Dec 2017 09:40:51 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBI9eo9w025782; Mon, 18 Dec 2017 03:40:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513590050; bh=mTOXSE0HA+y4yP5gECFufDtmesB1ZxzaJVV/4H7xyWM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=WbX+X9XLWqYkrwc969SygcjKo52WxjUPX+7STwNhE3fkuNA8BBv1OoZjvQB0Xdmov NOL/xtLqw2YP/5N2e2O+8qzI/T20IEFjb3v4MvdhwR7YEdTHTqM31TW4oDkgoXw3C7 WlvJqPGHZWDOue2ciiXF0F/xrVoxiOVdLEEx5UZ8= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBI9eoj7008441; Mon, 18 Dec 2017 03:40:50 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 18 Dec 2017 03:40:49 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 18 Dec 2017 03:40:49 -0600 Received: from uda0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBI9efg7005531; Mon, 18 Dec 2017 03:40:48 -0600 From: Lokesh Vutla To: Tom Rini , Date: Mon, 18 Dec 2017 15:10:05 +0530 Message-ID: <20171218094007.12882-4-lokeshvutla@ti.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171218094007.12882-1-lokeshvutla@ti.com> References: <20171218094007.12882-1-lokeshvutla@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Tero Kristo Subject: [U-Boot] [PATCH 3/5] tools: omapimage: Fix mismatch of image size in header X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The size field in GP header that is expected by ROM is size of the image + size of the header. But omapimage tool is updating size as image size + 2 * header size. Remove this extra header size bytes. Reported-by: Denys Dmytriyenko Debugged-by: Madan Srinivas Signed-off-by: Lokesh Vutla --- tools/omapimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/omapimage.c b/tools/omapimage.c index e7c46388f4..01e02649e1 100644 --- a/tools/omapimage.c +++ b/tools/omapimage.c @@ -145,7 +145,7 @@ static void omapimage_set_header(void *ptr, struct stat *sbuf, int ifd, toc++; memset(toc, 0xff, sizeof(*toc)); - gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE + GPIMAGE_HDR_SIZE, + gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE, params->addr, 0); if (strncmp(params->imagename, "byteswap", 8) == 0) {