From patchwork Mon Apr 23 18:35:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903145 X-Patchwork-Delegate: sbabic@denx.de 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; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="L80qp+8d"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VFWT1VpNz9rx7 for ; Tue, 24 Apr 2018 04:35:15 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 39BA9C21D4A; Mon, 23 Apr 2018 18:35:10 +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=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, 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 D14DEC21CB6; Mon, 23 Apr 2018 18:35:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0CD0FC21D4A; Mon, 23 Apr 2018 18:35:06 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by lists.denx.de (Postfix) with ESMTPS id 7883FC21C57 for ; Mon, 23 Apr 2018 18:35:06 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id s18-v6so43928025wrg.9 for ; Mon, 23 Apr 2018 11:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5eCWyjewjbkvoqUiENIQele96ebW53nrNQDsx1nv6wU=; b=L80qp+8dV5yjPSfz9vPbIVWolNu/6+/7a9LY0n5Z8jTV4OEt9M2g7QSl38WFrqxw3D PH3h/vnRv6XCEP8OOShC74Gp31Ok1ylVnIgSmRmm/b8j9H/LvdPLMOA4F+kBcu/3MMM+ zjODqOoDfP10MI0LIjjC1st9bnUVMQr/R+qtE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5eCWyjewjbkvoqUiENIQele96ebW53nrNQDsx1nv6wU=; b=fkMgLQ7vu15r1SDL6ipZTFNllFurEEZr38n12Rxw9kBaVqdk3rEHGVJpXxku/gehPN PI4tbCGLENsco0PfLZptjvMUfN73LMFD+6FVsIDuan5jkP3IweCoBDs1Z9hzvpwOKzWU ShguzO0WG0kUR0Slqn/zWSZDNODVwoLo+6DxKZdeG5rmApmD6jqNxOZeltf7jSwG1sqF lJvEpXKVujozL20kvGr7RKioyumttU2al+bi3RNb0Ra1CH/jX2XCyQikeTLX6We4D817 m6o1yLqLkLPI8cVw4n9FYX+qYGfhxlfKJ8vkF6AwCwOFbKkBQiQIxdAVEE4s90HCQ8Nf Qc9w== X-Gm-Message-State: ALQs6tAiLNhWU3QYRFD9RgQ0I0W1CsjjLrTZUd5MbMIY6XaviE3B/P8Y wa8cbZRlYFmoLk84OK90PmOdhekuKTQ= X-Google-Smtp-Source: AIpwx4+eA43H3HqwCDywNr4NSv/o2FucfirRGuyhgQ49WtNeM5FA/npzJGRy/4bOFUct6OsBKTGRww== X-Received: by 10.80.234.205 with SMTP id u13mr28974652edp.288.1524508505867; Mon, 23 Apr 2018 11:35:05 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id z4sm8401027edm.44.2018.04.23.11.35.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 11:35:04 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Mon, 23 Apr 2018 18:35:03 +0000 Message-Id: <20180423183503.30601-1-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 Cc: Fabio Estevam , Breno Lima Subject: [U-Boot] [PATCH] tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" commit 8519c9c98ad6 ("tools/imximage: use 0x prefix in HAB Blocks line") adds an 0x prefix to each HAB Block number to make it easier for host tools to process the HAB Block output, however it neglects to apply the same prefix to the DCD Blocks directive. You need the DCD Blocks directive if you are making a u-boot recovery image which the BootROM will accept via the USB upload utility. This disparity results in a fruity output like this with HAB Blocks prefixed but DCD Blocks not prefixed - which is pretty inconsistent. This patch fixes the difference assuming the original commit was a legitimate change. Old: Image Type: Freescale IMX Boot Image Image Ver: 2 (i.MX53/6/7 compatible) Mode: DCD Data Size: 430080 Bytes = 420.00 KiB = 0.41 MiB Load Address: 877ff420 Entry Point: 87800000 HAB Blocks: 0x877ff400 0x00000000 0x00066c00 DCD Blocks: 00910000 0000002c 000001d4 New: Image Type: Freescale IMX Boot Image Image Ver: 2 (i.MX53/6/7 compatible) Mode: DCD Data Size: 430080 Bytes = 420.00 KiB = 0.41 MiB Load Address: 877ff420 Entry Point: 87800000 HAB Blocks: 0x877ff400 0x00000000 0x00066c00 DCD Blocks: 0x00910000 0x0000002c 0x000001d4 Signed-off-by: Bryan O'Donoghue Cc: Rasmus Villemoes Cc: Fabio Estevam Cc: Breno Lima Reviewed-by: Fabio Estevam --- tools/imximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/imximage.c b/tools/imximage.c index 6dabb13520..6f16d45351 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -520,7 +520,7 @@ static void print_hdr_v2(struct imx_header *imx_hdr) (uint32_t)fhdr_v2->self, 0, hdr_v2->boot_data.size - imximage_ivt_offset - imximage_csf_size); - printf("DCD Blocks: 00910000 %08x %08x\n", + printf("DCD Blocks: 0x00910000 0x%08x 0x%08x\n", offs, be16_to_cpu(dcdlen)); } } else {