From patchwork Tue Feb 19 07:28:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 1044516 X-Patchwork-Delegate: sr@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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fn5SV8Ft"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 443XRS6dMjz9s5c for ; Tue, 19 Feb 2019 18:29:04 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5AB10C21E31; Tue, 19 Feb 2019 07:29:01 +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=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 59900C21E39; Tue, 19 Feb 2019 07:28:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1E17EC21E39; Tue, 19 Feb 2019 07:28:58 +0000 (UTC) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by lists.denx.de (Postfix) with ESMTPS id 667D7C21E31 for ; Tue, 19 Feb 2019 07:28:57 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id d15so2853662plr.1 for ; Mon, 18 Feb 2019 23:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vRUYUzW1ZxfFyOPBtTpTd7evyWdEFI6sIp8ARandb2M=; b=fn5SV8FtITa0pmhenGboO+HBzGse1W4I9v5yby7Q//zX9wic/yfth4LD5xOEYaPrFs pCRkGAPB72581iXO66akSg3ghnuMwttgMddVt82l5+GER6wgiro7bzJhyYSVCGT/Av25 E0XwR4Ca2hzZPTiM2i93uaeEslhM6wpAsJU74y++np0kGFYvSbyKoU1//FQ46gUcpU3m FBzGv7wExBn0jehAJIc0ieslXLcwuP7R0cIXTHa91Oc1zKgu7HuVPQBdUJXtUpoTePE3 rMq8xDFKKpLBPrBv+oPeduH9YpqpEzqLXwFjtFMnaIv6eFh3Ccoottu7dEZbdNUvtaDA +hLg== 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:mime-version :content-transfer-encoding; bh=vRUYUzW1ZxfFyOPBtTpTd7evyWdEFI6sIp8ARandb2M=; b=tCQNb43iLfNnrJkHRdnQhGKc+g+4c1i/+LUptdXM698eunzWxX60Y98TBQ2elWv/Z5 L8qlOphpZkO8pUGMr8RId9dtFGClJtX7BwU+oxgv3IEH62s0QVriFs60GDkSDXvg5vhi K496QDordB4wUg63nt6LWF9Ohvv+FLu1z7hJdAxQJ03+Rz3T+lOxFKwc7b0aBnmn9ZQs k2RbyhdlpV0hIxKF6uCa8ovGadmxOzOQ0cWNwFgPUyXxmTrm5FH76JPzBes8DZ2NJYhR xC94Ek7fD2gfK8V8c6yyWTNwQJiNcE8ozLSGMcSl5N54jxC/GzRkFsEppNrA1ticrRjg VfDA== X-Gm-Message-State: AHQUAubxZVqwcywRzUa4pTf1voiw9kf02VLsJ0F8PkA6lHRDBJR6u0R3 +ADOs1hl3rVwl9J+yWL+QeZ3hDMWD34= X-Google-Smtp-Source: AHgI3Ibvk6A0gRuOsd0SW8J2cyiWsrVvLj2mMk6lcZnoPmxr7Gm57r0PXjYisRu4yiAVanG7zVwSWA== X-Received: by 2002:a17:902:6508:: with SMTP id b8mr30219265plk.17.1550561335307; Mon, 18 Feb 2019 23:28:55 -0800 (PST) Received: from chrisp-dl.ws.atlnz.lc ([2001:df5:b000:22:3a2c:4aff:fe70:2b02]) by smtp.gmail.com with ESMTPSA id y13sm16974050pfm.65.2019.02.18.23.28.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Feb 2019 23:28:54 -0800 (PST) From: Chris Packham To: u-boot@lists.denx.de Date: Tue, 19 Feb 2019 20:28:44 +1300 Message-Id: <20190219072844.2320-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Stuart Henderson , Alexander Graf , Jonathan Gray , Theo Buehler , Stefan Roese , Chris Packham Subject: [U-Boot] [PATCH v3] tools: kwbimage: don't adjust for image_header for Armada MSYS 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" For the time being the Armada MSYS SoCs need to use the bin_hdr from the Marvell U-Boot. Because of this the binary.0 does not contain the image header that a proper u-boot SPL would so the adjustment introduced by commit 94084eea3bd3 ("tools: kwbimage: Fix dest addr") does not apply. Signed-off-by: Chris Packham Reviewed-by: Stefan Roese --- I'm just sending a v3 of this patch since the rest of the DB-XC3-24G4XG series is unchanged. Changes in v3: - use the filename binary.0 to determine if the destaddr needs to match execaddr. Changes in v2: - new, split out from Add DB-XC3-24G4XG board with a better explanation tools/kwbimage.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index a88a3830c0c8..dffaf9043a04 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -1273,6 +1273,13 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, e = image_find_option(IMAGE_CFG_DEBUG); if (e) main_hdr->flags = e->debug ? 0x1 : 0; + e = image_find_option(IMAGE_CFG_BINARY); + if (e) { + char *s = strrchr(e->binary.file, '/'); + + if (strcmp(s, "/binary.0") == 0) + main_hdr->destaddr = cpu_to_le32(params->addr); + } #if defined(CONFIG_KWB_SECURE) if (image_get_csk_index() >= 0) {