From patchwork Tue Apr 24 17:46:45 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: 134177 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2527103lji; Tue, 24 Apr 2018 10:53:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+nVJAlAjJGYKEcaQCCRPvSNTCKAX+6pnHlZIynvWoGpN6AeCVMQePeCx3mOtPixcFEydzh X-Received: by 10.80.152.116 with SMTP id h49mr35192167edb.150.1524592388347; Tue, 24 Apr 2018 10:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592388; cv=none; d=google.com; s=arc-20160816; b=G5FQ4IwW3bZtRcSG9Nw4r3EhgAHtGVpUScKbydlvAJKKpDd2wD58PycrGWT8+nEw5c VdPsh8IcPFHdeYodD+PLB9XeOvPVprPMp5lRQ037ZDUYG3lfQIABZpS1iqrLT1qanABg RK0m6a4sueXZlZiQNV3OcAZqrWqD1G251L+bq3lYMBW4Bi2xv3GolPt875NEpInrgEZF LZWv2Ld+UbsP+AnDZWS/NgfComP7qUmdyvDFAs8H8Hn4lkAYKw5EId8h18r2px5eRyrK ORVnXOPgchK0t32JQA+5Bn5BqwhvbbVBY+jXQvkK3/k9C9DbDEnraeyB3jmc4lpGSgyn TByQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=tDAXsXeBhQv2zKMzXmO6jP3H7Ju1qja9gh73Xgh4cIo=; b=f+x4Gt8MhAfSLFGc7U8Qx1x6SlDZDLR3FgKqFz4xtUgZ9BYcDVQ0Wesxg8YfIiir1q YpyY21fKv4JFsvV4o2zqY8Bdgmhbs6ZDpAk249PwwPZ2iJBARRIw4vldKf6QWDJc0pUp UT8j66UgoNfnKv0AKCzA7cjHB6AorCeCbZuQRryKDldPR9g6dMYhzfNg7Vo9rZLXvppw pGbxXNa4ruY+jX6BqllQjoiwVoqXbe5NbtBfqXqtRzARYTiAJMIuoq/leLc+mg8rcArW LYlcLO82acrO+HMiOrtxzXrPauKeuy+4uSGb2IYa0auQMNaj7xT/21EMCwKeapHNisDn 80hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Q7/NebHM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id i41si272927ede.346.2018.04.24.10.53.08; Tue, 24 Apr 2018 10:53:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Q7/NebHM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id E3D2AC21F1A; Tue, 24 Apr 2018 17:52:42 +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_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 3132EC21F8F; Tue, 24 Apr 2018 17:47:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D6A9EC21F95; Tue, 24 Apr 2018 17:47:09 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id B4C3DC21EA8 for ; Tue, 24 Apr 2018 17:47:08 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id 66so2671124wmd.3 for ; Tue, 24 Apr 2018 10:47:08 -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:in-reply-to:references; bh=Ky2Brv8hbcba5qiWCt8sh3smlDw1vzlLhmoKUt78b34=; b=Q7/NebHMWQ86FHT40wbnMwhOoRbe+y0b8yA3t+Hb8zyekM9pEKUg2ZhZRwK4uFCj6d iVxO36Tbyr15rSmk0/xnZKRWNyERcMTOzyClmW6LbGpLYcz5/YQCC/lgf5GW2ycmORpK +hvXXQlv8qL7s5HTh+0UZSRn+VIKg/gju0bNQ= 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:in-reply-to :references; bh=Ky2Brv8hbcba5qiWCt8sh3smlDw1vzlLhmoKUt78b34=; b=g6M9TGtAvrJXlfkX+24R1lhW/XOb3dAqoL3ljB0dyzrJHvJKFp3rvv01K9fx6KF6dJ HUjCTeRYvIJedRfalivLKGQ4qXFJqkrA/fobKzAhyqzBd8Ojvp37kw8/Vfqe1sFhKv5S eLNmtBcCKg1cGePPjVpFh1sW2LnqVEYdZ7/pf6TQMRh+EAr3Kcn3KK5bWuKz1i271KPK fcr5WktRN8WAMmS0Gsi/cIf/WJnij936foZIAu+xrZCy3UlQ7aB0LlDePeh1surOvyvk 0mngvRLM0WJaB4HWMzEFWdlTWL8Z1toSfADHQ/q2fyBMM/bVQj8iK4HuMS5cFvCl3LHh hBDg== X-Gm-Message-State: ALQs6tC9qNbZbhHoXHwCsOi5Ik/ypjPwSps9Up7sPNo4elea4+ztoBk1 m4Zo/vUKd7ytFFEKiaq+pDZsYyy9/V8= X-Received: by 10.80.181.227 with SMTP id a90mr3165741ede.69.1524592028216; Tue, 24 Apr 2018 10:47:08 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:07 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:45 +0100 Message-Id: <20180424174647.11840-17-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 16/18] warp7: hab: Set environment variable indicating IVT offset 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" This patch introduces the environment variable ivt_offset. When we define a load address for Linux or DTB or any file the IVT associated with that file is prepended. We extract the actual load addresses from u-boot.cfg and feed these values into the code-signing process - hence we want u-boot to have the real load addresses exported in uboot.cfg. ivt_offset represents the addition or subtraction from the load address that must happen to find an IVT header. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index c957b2d579..3b1e7c7e88 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -10,6 +10,7 @@ #define __WARP7_CONFIG_H #include "mx7_common.h" +#include #define PHYS_SDRAM_SIZE SZ_512M @@ -50,6 +51,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \