From patchwork Fri Mar 30 14:18:29 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: 132609 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3098095ljb; Fri, 30 Mar 2018 07:19:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Ltxfxx8+baiOq2ITiH/oOpveSObOJyaOq4pJL8IdFsK//b+S1Kcs1PmVlIVQdw2RW8KDX X-Received: by 10.80.142.220 with SMTP id x28mr3129885edx.128.1522419598181; Fri, 30 Mar 2018 07:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419598; cv=none; d=google.com; s=arc-20160816; b=Rq2BZ3p+pLN5BYr+UKw5ZcIrUUalaFRg+jAOVRJF7pfJRy8ELT/wfxzP2RVh3kyBwi JJuIPIkwK4kIVYg0ITqz27PRVBIRc7liDGr9WtD9YVncDj+ZCKNdcu06D9q4jW+auUdp VYl4OIsYwbi1E8NTfJK7/I7MQ/Q2zP4tDhN0L42HnhGCqVhiBLfznz9YMMaYPTFm9pom ItJlTW6fRnqbYjWd3mNH2Q6pi18iARrG3HSLWZeUB8YbcxfnXv63os5SuFwG+hmfcDTb Pd91dCNbGkwmaNfAjyTt9tKTnrLMJK9eEw4ah9oerZG4bszGZmHkwDeuSIzrWzkqqxL1 xDUw== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=I8gKKcvg0ChOXiulGqPSbZBiHxe+ezmD43IWCZnxFOo=; b=p+lPDndFLB0eqUaFoHp1MYC+w5l/Bx7AE2dSAd6Stco97wG1UzTsy7aylLgbG/b9Fb HD7RKtIGB6fyFJwVQuqf+jtAjbPKMnRmbFyuuvpZXHM/y09zEK4Cr3zyype6Uw60XWyD mRw35Wy4YgkfGR2JxTrpi9gkEH6BkvhwtWF/rkaGSb89FhIc5wq0ENHUiE0xhOf9Guzz gsUfejAA+4EbSca8aFVKvYUG3v6OgT+x9UP+Wt0ByHnUC/hYdeXzoaIY1Xsx7RpKq9Cp 8rhxq3GR9V2+FngjbAFyzAUjmRZxnHRR+eBiyeRm7+UVBtfhhcNlouo/CpSSE52dN9g0 8Hbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aYKDARyy; 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 x31si6270880ede.122.2018.03.30.07.19.57; Fri, 30 Mar 2018 07:19:58 -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=aYKDARyy; 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 BEE7BC221D2; Fri, 30 Mar 2018 14:19:14 +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_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 5CAC6C22215; Fri, 30 Mar 2018 14:18:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F16A0C2216C; Fri, 30 Mar 2018 14:18:50 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 904F0C21E96 for ; Fri, 30 Mar 2018 14:18:50 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id b127so15046086wmf.5 for ; Fri, 30 Mar 2018 07:18:50 -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=CA2atoKRAAeZaRXet7yXYeavk5dzsuMokIvwFjiBCMU=; b=aYKDARyydwunKRw3jyYB2+hfZZ3spMuhFujQ1pb6IrmWh8paQenTQO6bHlvSgwsh6J KtyGJP8vn5RfIs25gpOBQ5LEhP8KoHGAUusLZT65sgB3r3sfyhw6LFAZnu0DZ2AOIHzs PXF6E8hoccY8Zhw2ALR2JJPD08595G1OIuKEQ= 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=CA2atoKRAAeZaRXet7yXYeavk5dzsuMokIvwFjiBCMU=; b=IHbuz1YaWMMyB4rPEeGQ9KCEFxsxYNg2M12yt7LvSMOWtUz10eti+eQrsXczkmAZGl rbIVfIQ4smlJpNQ2xKQwItVVzboO3V7XRkz4qtR/GBd5vUo50cXy4F3X+b4cqSHiuhK3 jHCnAgKv647RqfEOAJURvbq3jUtXSiD7KaSm5EmZ33U6bvHeb2k4b6ZYAzCKjL0lAvNr ITdo/T3TUlQ0ZVhyc+9W70flKRBzUAt4SFTLpvp20sp9v09P5rGP8j51IjBTgFu7oqe9 qjlAnQPyuFeDytnXk0TwnUjbaUvKV8CVdaCuuO/6Jgheqaq7LaxOIXfX61MCf7SQlOPP RCSA== X-Gm-Message-State: AElRT7GrKvEy988rOYzaTO9xi+CdfQYGl5j37n7ohzWZ+KI6ZigbY5LC dqvMKcmGdGJu/Z2MnpuDXQcvGWuPwg4= X-Received: by 10.80.145.49 with SMTP id e46mr3141249eda.252.1522419530095; Fri, 30 Mar 2018 07:18:50 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:49 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:29 +0100 Message-Id: <1522419526-29494-2-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Breno Lima , Utkarsh Gupta , rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 01/18] imximage: Specify default IVT offset in IMX image 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 adds BOOTROM_IVT_HDR_OFFSET at 0xC00. The BootROM expects to find the IVT header at a particular offset in an i.MX image. Defining the expected offset of the IVT header in the first-stage BootROM image format is of use of later stage authentication routines where those routines continue to follow the first-stage authentication layout. This patch defines the first stage offset which later patch make use of. Signed-off-by: Bryan O'Donoghue Cc: Utkarsh Gupta Cc: Breno Lima Cc: Fabio Estevam --- include/imximage.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/imximage.h b/include/imximage.h index 553b852..800fd63 100644 --- a/include/imximage.h +++ b/include/imximage.h @@ -14,6 +14,9 @@ #define APP_CODE_BARKER 0xB1 #define DCD_BARKER 0xB17219E9 +/* Specify the offset of the IVT in the IMX header as expected by BootROM */ +#define BOOTROM_IVT_HDR_OFFSET 0xC00 + /* * NOTE: This file must be kept in sync with arch/arm/include/asm/\ * mach-imx/imximage.cfg because tools/imximage.c can not From patchwork Fri Mar 30 14:18:30 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: 132614 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3101836ljb; Fri, 30 Mar 2018 07:23:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9rcijF4ezsjsYoRCm6K5SWS/3Fq4QME13kHroQRlshHD/dTd+XQBOsSSu6xZrDaQfptY7 X-Received: by 10.80.187.14 with SMTP id y14mr3029602ede.26.1522419820732; Fri, 30 Mar 2018 07:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419820; cv=none; d=google.com; s=arc-20160816; b=e95JtV+8yRhRqqwMbQvOPK0cw77ZHKjRf10ctB28b1R45TlGcaOYy80TQMkMCaYE0V bP6rLh0v34YPA6TCEuaED/OdxN35cq+PXFL3nYQkRILT+EtYf9j8KjiY3IYyXHzJ0COB G9cehY42fpB6uiDkPjssxzAThp7sc0QfYhUpYLMfqLJY+Ic4Zw2jh0ljwRYlza7S7eHz zFyd9jVflflk/U71EKEk0de2PgPHgnoJMFY0Uc79n9v5qv453mzDKk9y3Kiq1PExtnlP KJaQgJNkK1lWOZocG3grHAkWHNbOQ32x2yILxBxtcp0n2mOQ+wr5dAozH8Jvo8y2dbmF dxnQ== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=wP/v909xFYGre5ags3Nmyk6UA/y6X71vDRJQXtvrloE=; b=BUzPA7cP38osl6VvpYFpuKQ3wyDyMDqTmq0AFLe1NNJCLb3nZYd24FFqVDXhkd3S/K O/a7aqleU3ldXPpeY9QzwlPEUTIZZGeXIZQ7Gwis2dpBzmuMTGkUXHKu+p4JyTllLvm/ q87CIKn9FnfAfCbrqUnLZxukXptfqBoxk5bYt6vcOxFwbOeBQFpdPGgv63UHAoqClwDi nf4LC2CsQzoWz44WYb+wFbIDbLzs2Lc6gF52XJyh+bTWnlsQggP3LX8iGESjq/fWxeoC eZZ6lenIabT2eIGqPxFdvkPhMTdromaus5+Ms4klqihwJbdWq0CfIs0F9qa8e+AliELt Ec9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hJENsOBD; 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 g25si6676422edf.328.2018.03.30.07.23.40; Fri, 30 Mar 2018 07:23:40 -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=hJENsOBD; 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 30FECC221EC; Fri, 30 Mar 2018 14:19:32 +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_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 5B456C22231; Fri, 30 Mar 2018 14:19:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 70C34C221BF; Fri, 30 Mar 2018 14:18:55 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id B082CC221FE for ; Fri, 30 Mar 2018 14:18:51 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id r131so16971495wmb.2 for ; Fri, 30 Mar 2018 07:18:51 -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=xp3EILTG9IfrkkHtXk2iwGfCG5Gib4/zSdFgIY1RNXo=; b=hJENsOBD2qmAbzwfaF6lQE4n5WHT0i+RKuaXn1bp9H4+wGD/tGOFpOQX8k5FWN//ib 7SgYfxk04solRUDmVsQFtLX8Yz2eoip0Nw88KfEmk2VcAiCHoDTLkfupely6K3fqp+3x hlvWcHPiPpY29hDk26JTCXW7dqtRUhZlF3g0c= 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=xp3EILTG9IfrkkHtXk2iwGfCG5Gib4/zSdFgIY1RNXo=; b=d5LXrb+iXG0Fcwj1e/qv52MmcSKjHV1SJ/e0YYBkyGgYatnnAclTBVzVNZnqUeHaDN PjECb8rZ2Ucqt8kwmq7zvhx+l9X3PeiHJevq9N2RC8kfPJCa+2zRxj96YOro4qcJpkg7 qhu51IpiVoGbyuZplAgLZMwxWgCiIDunJC3K/ZgHQS0ftMkHYd7r0cDvz9IcIqvYSzTc IFhltdIww0hcyHJanOixldDceS0EM9lnC+mGvu0zeRVPoJQFbWuTW/Ohx0GFh3pQp7CS aIQZsnCXERNegtzsCkbilmsAbyO5Bcb+241Y7QIhORGvlF3eBIwhOrVRpSzMbSaJgnP5 wNyw== X-Gm-Message-State: AElRT7HsMtdqZEexgP4G2eeVolY4euMt81P8ms0yN2PL6tr3N0vRU39I Dzqwz+Z1JJtBhbcV6YO0J8uGK/JXU6o= X-Received: by 10.80.151.110 with SMTP id d43mr3136364edb.174.1522419531071; Fri, 30 Mar 2018 07:18:51 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:50 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:30 +0100 Message-Id: <1522419526-29494-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 02/18] warp7: hab: Add a CSF location definition 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" In order to correctly produce an image with a IVT/DCD header we need to define a CSF in imximage.cfg. We just use the mx7 default here. All we have to do with this option switched on is "make u-boot.imx" and we then will get - u-boot.imx - u-boot.imx.log The log file is really important because it gives the addresses for the HAB that we will require to sign the u-boot image using the CST. Since the addresses can change this logfile is a critical output. Signed-off-by: Bryan O'Donoghue --- board/warp7/imximage.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/warp7/imximage.cfg b/board/warp7/imximage.cfg index 5b42793..51a5bff 100644 --- a/board/warp7/imximage.cfg +++ b/board/warp7/imximage.cfg @@ -13,6 +13,10 @@ #include IMAGE_VERSION 2 +#ifdef CONFIG_SECURE_BOOT +CSF CONFIG_CSF_SIZE +#endif + BOOT_FROM sd /* From patchwork Fri Mar 30 14:18:31 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: 132626 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3109081ljb; Fri, 30 Mar 2018 07:30:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4951Q+6gnfuDGWGM+9EdfUZi2rNzYhRNyvjHxIfSJIQbE373w/Ek2QaRwhYR1jwWQln/IEd X-Received: by 10.80.153.206 with SMTP id n14mr3124553edb.303.1522420256588; Fri, 30 Mar 2018 07:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420256; cv=none; d=google.com; s=arc-20160816; b=WG1xlCVdfBJXnuLpthRBybol5xVVWSJwqKV7dxGCEMO8jHcHpKA1jk3mhMZFQGKR/l hc5w2Puf709HFQVOiTxiiwIJaySU4BosKS13ke7pQ1FYILWbPQ+Lsx63vCoN7Wx/oKr2 5dNukihUG1aFzgHQs9USBuC+9tmm4vjGJXkebOQyjcFpQmFufwfvIa9n10ZAFrH72+oT Cw1cUAT+7Vx3waWn9VYJmMUrmr3mEmpnArswTxfDZqbFGfSj5fBcg07Ike1DO8QzOu7h 57YfqMUEK2B/x9DrqRkPLGyVn8dcspHvbOl8DvNiUeqhbKq69re2/rQ/3EoPC6cdqGJ6 FJyQ== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=6a/h2n6scH76uOzkI9AJS8AjySg4cWhs66VX9yPA02Y=; b=I4+hVP0GgHYMo5x4/Iw+Cq8ELMsaZKlsFFbodP/uTyMyKiWpM1Q1g7O6RYgqCdI52g kjz3Vvqan694S7GXrd6t/z/EUkEAoyfj1fO8PhdzaWAkMRE5RzJsHGePheG3ljsGn5Ff y1f/0hLadzOU+XVFjCif8/uUh5fMDZJ/HOVexhupMalcprbRrMHttp2EeiyMksinlP7Z rCtcM0WuY6YLmL6zDD/5xD9Bt3HQTiMdeQCuJ5KAJiLIE8sd4AnsLLPgZKtm+hf0jQBo lWj//jnqRe33lVDo35KizesPkjzmOscjQ+mcoKrYr+xXnRgrkl5zec/K2u/IAREbI32F mIWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BrSwUeES; 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 x23si1019134edx.396.2018.03.30.07.30.56; Fri, 30 Mar 2018 07:30:56 -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=BrSwUeES; 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 35FB5C2223D; Fri, 30 Mar 2018 14:20:55 +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_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 4F949C22246; Fri, 30 Mar 2018 14:19:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9A2C7C221D5; Fri, 30 Mar 2018 14:18:56 +0000 (UTC) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by lists.denx.de (Postfix) with ESMTPS id 9DB44C2221D for ; Fri, 30 Mar 2018 14:18:52 +0000 (UTC) Received: by mail-wm0-f44.google.com with SMTP id v21so15927897wmc.1 for ; Fri, 30 Mar 2018 07:18:52 -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=WbpB/64d5Uw1E42Y59Z1rf0rZMHCcRGZaBHYwbCtSsM=; b=BrSwUeESS9SG/u5P+pZPOoB41yI8f/tZ2/1wvnCT62B4Jjy8X9ycHDibKnC2a1hf21 8ujqn0OiuUgye0bkimoanOkuFgPcTokdOu9obLwpXbF8I1znGjLu9eTlx3BHnmfAlazj sN9fOvpyoH2Z1NqYhCTQiMP5TlnoX7kpgVSUY= 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=WbpB/64d5Uw1E42Y59Z1rf0rZMHCcRGZaBHYwbCtSsM=; b=eS5HfOFQe5ZLwPUIs2KgnmsR4Ecs++psmD6KWKPhc1q4j7Dvr6TyTH4nX4m9kJyUMi Hts/Dxal5/fVCsrh+Og4maCWkxYsnEuwSyNci2JO20OaJ/cGTBTdBfIFj35I8y0DDwrr V+LIEQ49Ds+HLAgxMgnXFgGgjQoPwNDwFwfh99PPJmD+kTx2q6wMwO+ObgbNPdez6KGx thWwIvxeQ8GReq1WxlOsrxdzMwmBgZry3ot2OQSvTKInUW9swngZwaHlVvLf2UWEPpI3 HabHsK+QFCuq6S91z5ra0bUrXQLtyl5lhuDXoThyqk4cPu0x309BWOtID9FtaBR4M3q1 wB8A== X-Gm-Message-State: AElRT7ETqJGwKtgQ+YQIpr9t24Q4TLi8heV3ZN1NVc0eWU5BRU1PQXJS eEbkhmVBJAzvC+yCXODJz5QrhPWcnMc= X-Received: by 10.80.164.182 with SMTP id w51mr3137143edb.152.1522419532122; Fri, 30 Mar 2018 07:18:52 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:51 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:31 +0100 Message-Id: <1522419526-29494-4-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 03/18] warp7: hab: Set environment variable indicating HAB enable 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 adds an environment variable called "hab_enabled" which gets set to a boolean status indicating whether HAB is enabled or not. Subsequent patches can use this environment variable to determine if its necessary to run a given binary through the hab_auth_img console command. Signed-off-by: Bryan O'Donoghue --- board/warp7/warp7.c | 8 ++++++++ include/configs/warp7.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 327f656..0d3d324 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -203,6 +204,13 @@ int board_late_init(void) */ clrsetbits_le16(&wdog->wcr, 0, 0x10); +#ifdef CONFIG_SECURE_BOOT + /* Determine HAB state */ + env_set_ulong(HAB_ENABLED_ENVNAME, imx_hab_is_enabled()); +#else + env_set_ulong(HAB_ENABLED_ENVNAME, 0); +#endif + #ifdef CONFIG_SERIAL_TAG /* Set serial# standard environment variable based on OTP settings */ get_board_serial(&serialnr); diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 0c3b605..c6ab29a 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -139,4 +139,7 @@ #define CONFIG_USBNET_DEV_ADDR "de:ad:be:af:00:01" +/* Environment variable name to represent HAB enable state */ +#define HAB_ENABLED_ENVNAME "hab_enabled" + #endif From patchwork Fri Mar 30 14:18:32 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: 132612 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3100480ljb; Fri, 30 Mar 2018 07:22:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx48wp6SGR09L1s0tERysDQh9ZBqtq86WmKk8AN8ZkdmHvsIL8rXCHcYvViigv/a6hPxFlTHA X-Received: by 10.80.247.4 with SMTP id g4mr3112420edn.121.1522419737929; Fri, 30 Mar 2018 07:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419737; cv=none; d=google.com; s=arc-20160816; b=mP7EwWqQvooNFEBcluuQbPcSLCT2nLiJXkT0TgYE4v4yzXitKxJ0Xis9v9HJ99T/My Kn30IPC7ouZBg2vWOs1CZxeVo5YHknHusEmL7Djw/vKkVvZ870dGL01koRdHaMV8b6hH J/Ee89iuOARusYhsTyCd+rtnErNqAkO3450iyi3sBFw18gWfc6gZIjfjK4OTUhhbiSrP Z25hGZb/sFoti/fcP4TwfVwuew8kuKTnGfUXh5IejroXx1gtLsJrFdJBPhiU004+6jFV 43PpKK/dEdhhv0mI/2OHr4zaDCITA/8wHFty+7gdR/E/32fb+XjTDbqWcEP81T6cbUnr xt1A== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=hlOkAJGO9X53Vl51YaodJ8S91S1YQxFFjFRgSQ39xks=; b=ofhBGB3KEYHi7yITHYrmtvzdjT3SerUwLLUsKZZR8jwLMJoXP7BhhbwGP7A+P26Aqn mcv52GC30HgKuHb8eLR2JDsH9sDhav2ED7ihTEeHl9Gh2I5tWvWxHslWUlehyHOZvsSt It1yexj2Cc/22BZLCwiKdWIDoGsRuVoAP9RMFu3BMTfr2dAQxSQyO04zQtxiY7UpCs2f ySQoQEudil8OnvjtAyfl//F7yskcHtF9czZfY494XUNmlNF9Vj0GUeUx3yV68ozRiBYo +vHC9p3Q7wWdf2c+CMgT6FdpCTFxpdkAa2tonioAkaJWoEcXFv0U1N5BJBDkRfpSb6vK Zrag== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=D7BNawiJ; 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 y5si4791042edj.92.2018.03.30.07.22.17; Fri, 30 Mar 2018 07:22:17 -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=D7BNawiJ; 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 700E9C2222F; Fri, 30 Mar 2018 14:19:49 +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_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 5383AC22248; Fri, 30 Mar 2018 14:19:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9002DC2223C; Fri, 30 Mar 2018 14:18:57 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 96D7DC2223A for ; Fri, 30 Mar 2018 14:18:53 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id l201so15831664wmg.0 for ; Fri, 30 Mar 2018 07:18:53 -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=sVrIIVJ9/Tt51vyw9WkW9sRdVrXRim5TogWLQFY/xmU=; b=D7BNawiJTJYtsP1SXVI81dcWuyMRgPlRZcGDJ+LnAwNFDrEFbukYfV4gYw8N71amoJ fkdGxPOO5nZ0sa0t292jh8deP22jCRiwXmMFUDEz7RrdG1uyb5wXHBy5j0SQIyvQvgJL 437qb+xISD/WwhSwixLYqitq5HBe6qEvt1iz0= 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=sVrIIVJ9/Tt51vyw9WkW9sRdVrXRim5TogWLQFY/xmU=; b=KSJYDjruWYRJOJ52vTbpLB+vM5qh6Y3RnTK8PerU8rW8XqUvc2e3RcnxLd5SlU0SD2 x6WLiJON9XCHA+mwRXMTJJJ6aSzTk/w248A46fZBcIDzOhvuG65Xd7R8hMoSfSApEvwt vCn8OkopR1kixRwUwWvh1c4qad6pxmgAG9BesGp+LUh8oEaQDIn/2XdgEz/jQQ2gUIQe h6Jsy3+zSZFaichZGljGrGVV4s8GK5T0ctfChNonWI2Ct3LZof3YY3RFHf/tskuyvo5R vPCN3jmNpdU2VW5VLxcwkCAwhfgaGHU1Xkf8hfPSSsm1SnA82HC6H4TOtubpsyIfzDOr Ik4Q== X-Gm-Message-State: AElRT7EC6+00UDu6gfQmDtpA/FEuQxRu9iMCdtI8EknZ69tLDWqIFuGg 13bnCnDTO2U9CJpYOAYM934Qq3zqRz8= X-Received: by 10.80.136.8 with SMTP id b8mr3133558edb.274.1522419533073; Fri, 30 Mar 2018 07:18:53 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:52 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:32 +0100 Message-Id: <1522419526-29494-5-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 04/18] warp7: defconfig: Enable OPTEE for WaRP7 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" Requires setting CONFIG_OPTEE=y and setting an OPTEE TrustZone DRAM base in include/configs/warp7.h. Signed-off-by: Bryan O'Donoghue --- configs/warp7_secure_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig index 7310855..538f9ab 100644 --- a/configs/warp7_secure_defconfig +++ b/configs/warp7_secure_defconfig @@ -40,3 +40,4 @@ CONFIG_USB_ETHER=y CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y +CONFIG_OPTEE=y From patchwork Fri Mar 30 14:18:33 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: 132621 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3106094ljb; Fri, 30 Mar 2018 07:28:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/f0CO77RV294pckMa6x7paDEy8sX6y1KriwSBb1Y/pnrMUZy8A5lmr1fN2P9TaLx233WCi X-Received: by 10.80.165.227 with SMTP id b32mr3064226edc.116.1522420082790; Fri, 30 Mar 2018 07:28:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420082; cv=none; d=google.com; s=arc-20160816; b=1IP96YGdp5jvYqSe8rESmdkKkjARwxqHiNbLwPT7ONcMXhTKO8r2fJiYl9UQntB3jw 6+mHXtrTmr+qy8BZQue4l0PzGRSTW0khiAKy8pGubtEx0tzIuSs0jn/iQr2EuE9WFErw pq7DMPD+wuRLO4La1/tKraIKTpnbbJ1hz2HetRYSgaNVKr3v1Z0/KaVRU4LsvYR89a4k +oOn0uaHzBIih6arVuHd6iNsa508vGopjwjcv8aKf89FFuSt1LXM4cD/Db/UllA8RdF7 tx2XYKQieGy3s3znR5Vxc/HNa0GPl1aJof0ASD5gIKiPeLrnu/GynXudEd9xz1ChmUAF WaMA== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=rBkpxiGD8KPp6kxNYRZxaaUl6cGgyfdl5DfMU+fQSYM=; b=rS6H3U7mp+ey64SPwUm5XjP0j1djqXDTBdYvYRGeB36NQr5a7gJlBYWq4zis9+wC0B MNfQZQCkTMwKxO3ybiLx5OByPrgL4AkTrcLSOZzJRCNnaT74fz5YXALSiYPvsblxip9T uZzrV2l+kWwerfUXWUuDMS5PB1jb98bjS0slwNMRrEfuYMx/Wh8LbvGtbnWakkBl5CvT 6lE4ewgqhhwHtMhLV+d3pjnokLkvOYwwIs+mnsCEJl8Ypac+aIlEPKZ7pd6Vr0UyEVDx uZ2zj91t4QYFfdmA0BREmDrqOZE66LLtjNrhErGzkM9lQSxzPQqAacMneqUSOG3CVcRw TYog== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DtCcjyP9; 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 x4si1199756edd.359.2018.03.30.07.28.02; Fri, 30 Mar 2018 07:28:02 -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=DtCcjyP9; 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 54557C22246; Fri, 30 Mar 2018 14:21:11 +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_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 4E9A8C22239; Fri, 30 Mar 2018 14:19:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6C772C22255; Fri, 30 Mar 2018 14:18:58 +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 8A558C22228 for ; Fri, 30 Mar 2018 14:18:54 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id l9so15919723wmh.2 for ; Fri, 30 Mar 2018 07:18:54 -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=ZyVbqfzifusuZrywaBiF1R7LagXEDVoA5r4yyEJ3MCo=; b=DtCcjyP9qSpbCJwY5gobvBoq8/lmolYzAoNUNShD/o/mT7vws5n2nmiC37NbGopY1V hc6Dv1vGQMpG97i00QUbZNOdDQ0EMJQ5rYfQ2GXdIjjQ4nujTMQNoQYdIPntvvu1KjWe Ff/GvsCwoXYVpC5BS10Q7t8c9XYNFkkjfxoJ4= 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=ZyVbqfzifusuZrywaBiF1R7LagXEDVoA5r4yyEJ3MCo=; b=qJaXirkurCNAcFJeh91cs3Y8bJjgGw7UXaIhC2fPoRCRrAjSqN8YWpmAt2p3wlUX52 GcMgKeFE3Y26P2dr6A1hlIWntf0DVGsBJ45FFcbCYdnFhJo+Z/wSmfvKFXEbSC29+AL1 aVUCEISMsYCj9IQW6f6qRU28PvWqArTQwJcMiPSvymR+NPblcSJRmuogw9jDWDzwkMj/ Z4vi1LyiramgeeCRscApxPLnJI/ijDJcw4gMeeXm11SaiUDkPxVuuXNvAIry7eLXSdHi fyTCCSRuVDvQtkSbBuMbDQk6V5z9lyOy2uhh7V2+tVm8++Jw/dKcZiE9dy20zFXDtp22 NI0A== X-Gm-Message-State: AElRT7Gk1Lb0mN23mKSHIlRL7R5Cxi0ykvees+IGCveqClDdLQrAbEey nSwfmKFWFQSl6tvemhl9gpwu8dcZN18= X-Received: by 10.80.185.34 with SMTP id m31mr3112657ede.214.1522419534006; Fri, 30 Mar 2018 07:18:54 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:53 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:33 +0100 Message-Id: <1522419526-29494-6-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 05/18] warp7: Allocate specific region of memory to OPTEE 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" Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size. On WaRP7 we simply define the OPTEE region as from the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE bytes. Note the OPTEE boot process will itself subtract the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Bryan O'Donoghue --- board/warp7/warp7.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 0d3d324..56f0cdd 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -58,6 +58,11 @@ int dram_init(void) { gd->ram_size = PHYS_SDRAM_SIZE; + /* Subtract the defined OPTEE runtime firmware length */ +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; +#endif + return 0; } From patchwork Fri Mar 30 14:18:34 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: 132610 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3099422ljb; Fri, 30 Mar 2018 07:21:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx49j/kdpB2IvLEiKlQNUiv58ASY2Z6RszoLOGuOuUc+vGnbJClPXmsWC2hzrpsWZ6IkN6Bht X-Received: by 10.80.133.205 with SMTP id q13mr3110657edh.123.1522419679058; Fri, 30 Mar 2018 07:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419679; cv=none; d=google.com; s=arc-20160816; b=uEFEDq/SNi8t7jHDXuLRlT2QPhMAgnJOzV2DE1zG8QC6ITAZVPNnVnaceyV8cUeGc+ h3mdla67iAAjR7T9gATYhQRHjrCeAshum/TwOTmcDy0hsJI1HC90TuMIjRteOo0TGRhy yr3+ZvxzVL7Dn8gd6/XPNwp9snL6wMfW/7LLjltWjcI/Cygs4H8hDWnVs1T6Pfos3l+B lWsOiN9447YKLq0eaV9fqaUJ5ZjcRaMUY/kLfjjQ9I/4eaPDSxKQQu0lXcvBvllkwUgz H32rLBj3MS977l9WKLjhqoCsquUzh0vhvfLcAxq5Vz6fQAXFnGVuJgcJr5ZjOJtqCrqd ptTQ== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=RRfmoo63du375tRpAsTIK6bsdpqn75A04iMTbsICoh8=; b=szzQGy9U+B8cN2EvSy2iPEXi3VkecZl+U9JsX2u5DEy/thdXegqnQas3wNt5tuu5wK h6ZX6k/xYYe2oysKrhCgOaSwwUb87ocib4Cv5iJVKM+W1LVfeBmjxFtBpNkuDnh1AAMM fJyw51kr9SpBxnzaB1a/ffNlvRWmhKKblC393y8jzm5af4oDsZiUV4O6erFsN0iwZ3dA /A3F1oBf5/fksx7sjkNo0XH/qtqoWhtvRt0VPxuevAr+G6qrbkw9OLlmGRPA2iX8B6p8 wbFVCqUSQckTtmfZh5OH8OH5FVSRAc8ppiFwbhAWV7FGl3JRubdGxw96yeSsPDAgfY7l U+IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ez1Lpq11; 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 j15si6675246edl.388.2018.03.30.07.21.18; Fri, 30 Mar 2018 07:21:19 -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=Ez1Lpq11; 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 7700FC2223B; Fri, 30 Mar 2018 14:20:05 +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_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 3A110C2222D; Fri, 30 Mar 2018 14:19:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5572EC2223C; Fri, 30 Mar 2018 14:18:59 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 80851C2223C for ; Fri, 30 Mar 2018 14:18:55 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id x82so16984562wmg.1 for ; Fri, 30 Mar 2018 07:18:55 -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=QYUQjDXk16GnMGixelcOEuFlaSZ/V4B2B/jP3GH8tgI=; b=Ez1Lpq11RnFIEdlNm9CnDnZlEsgF0fyWnQod9UQG2MUwcQ2LTRjzRCl5Zevuc4dW3Y m6f1r7xxcCxXQ78nico1eSGe8yTZ84WBF/jl3Lkbvzbh8713+AuxBmC9yFL87Ue7yTwl gynUzNMWbVThIrdb27oT09qsWknMTHrJyc7Lo= 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=QYUQjDXk16GnMGixelcOEuFlaSZ/V4B2B/jP3GH8tgI=; b=Ut8b2JLIIvMF4K6jewMAR3LHM2YyFW2TyZwctfvC8OSTbOLXOeZqssZFg47XYmek3e SSXjtpznquXrbZFUCfrS2kyUM9gJTbZQTjJA0ujbJ9grrVhAcrq9XVlfqd81Tm/aIlsI Rt7AKhb4COco4x2i4q7hZS438LJX6HO3R6c+ICaYQiNcdsznXgfqvqVBRbC7dnEHZNuh hKyT1PwtlMlPm1qcKmoAjDv//0XlIpmDWWsips42HHk76AdKFgBFS2IL+v4n81B2Ihcl t/Ki2xzE5mWC/EN4BTD6JwSC0vFajAoU0PgC/wJruRq7BpCbDEFI4Rlxn32e0C8f3RKl m28w== X-Gm-Message-State: AElRT7Hp0rx/u5LWYupWO8LQTdLGcTf0jkvDpw24w4niuaFFhoEq0ZDV CjO1o9R4cKIy1OMt/GnFjU5Av+5fiPQ= X-Received: by 10.80.129.4 with SMTP id 4mr3056488edc.167.1522419534989; Fri, 30 Mar 2018 07:18:54 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:54 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:34 +0100 Message-Id: <1522419526-29494-7-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 06/18] warp7: Print out the OPTEE DRAM region 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" Right now a region of 0x300000 bytes is allocated at the end of DRAM for the purposes of loading an OPTEE firmware inside of it. This patch adds the printout of the relevant address ranges. Signed-off-by: Bryan O'Donoghue --- board/warp7/warp7.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 56f0cdd..da52b18 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -181,7 +181,17 @@ int checkboard(void) else mode = "non-secure"; +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + unsigned long optee_start, optee_end; + + optee_end = PHYS_SDRAM + PHYS_SDRAM_SIZE; + optee_start = optee_end - CONFIG_OPTEE_TZDRAM_SIZE; + + printf("Board: WARP7 in %s mode OPTEE DRAM 0x%08lx-0x%08lx\n", + mode, optee_start, optee_end); +#else printf("Board: WARP7 in %s mode\n", mode); +#endif return 0; } From patchwork Fri Mar 30 14:18:35 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: 132613 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3101322ljb; Fri, 30 Mar 2018 07:23:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx49IzkcxKDykd6ki0tRtU8v9XXdVTkDRBNgT5ugjTN16Z0tk1CG76VvA5aQf2A6Ug794J0Ng X-Received: by 10.80.153.24 with SMTP id k24mr3101523edb.45.1522419788586; Fri, 30 Mar 2018 07:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419788; cv=none; d=google.com; s=arc-20160816; b=U8bRNu4uyuupDXzlNWG4oX2wzSE/g+rnhem3yC+oPm71ovxEqWNiQZCP7B4Il2dV+F 4MmbGqQVhk4eQfeaLt66OJz42sJuHJdh/Z0QfIFnXsgCeuY/VaiCOoBqfN6YDVVXtP8x gsjc7SspY4bGw6bqdIXxhlkgwIlsksCXySqKvLO6wWp1RbR63B+0dMOo+xauuifZaIAU AktGm7o1DTfakckoclbm3TUjDrgVjAeNrdbdIhNAPz3963aivY5QBrAy7Ll5tIETESkB 94ovmrFsKf3oQxqAvBSRq8ZwMT9+LR4Ti1EeykvzpU7VYRo6Ae8HBIk4J34ZlMQQciQg Z0tg== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=sS9Fn+wLYGM2eN5igEYicVJ+0O0QI99IN9SlTy6BYxg=; b=rY1w3nhTZgi9TZGWwsJdlyFgXODIGufEHDIkpkvxvhtuNmJv8H7nBOk5lp3meskuAf 69wSSfmTKKmQKkmE9ypWo/C6AbfV6ORdWoq0zYE9/llVUmaDA7cA3Ry5u+Tr2NuwJ5xF OJXofYICOwLYAN0BPqjwHVLe9U8jeOUUZ2OtHPZKw7+Ala/srvlcgd5BqgkFhlxYihO1 W21kKfDURgoaFs0h86j3fSRaHhiE1q01UNHxaRWL/AgQztE+E2tAK4wjLj6zg8vOt8lL O44msPQnNj0UAfMnyG5EAjS0boswBIH/ukP2mZMqZPcFpW7ZjBJnbEWmNjqk9Wf70kCc 0Nfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SumLIoQX; 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 j50si1407086ede.121.2018.03.30.07.23.08; Fri, 30 Mar 2018 07:23: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=SumLIoQX; 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 06108C22247; Fri, 30 Mar 2018 14:21:27 +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_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 5477EC2221B; Fri, 30 Mar 2018 14:19:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 76A87C22255; Fri, 30 Mar 2018 14:19:00 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 84431C22244 for ; Fri, 30 Mar 2018 14:18:56 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id r82so17106738wme.0 for ; Fri, 30 Mar 2018 07:18:56 -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=yReYmD68a2xLWGW+klxAgtRPalsUmXFyQs/alIxu32Q=; b=SumLIoQX/mUncgnTkaYJYaT3F7mKPuO0wqyuVxmq8IOfkmiF6M0QCOMpqE0u99JtxT jM3W52OLy+eok+7hXnrRr8chT/RdXHnBypBug0jJPxCA9KAUTxMsty6U7rW99+oQ9GSb hylCQTrdIE8b+NUrcun6YngfgDkX8Kfh326qY= 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=yReYmD68a2xLWGW+klxAgtRPalsUmXFyQs/alIxu32Q=; b=pxbYQQAtrpBiq7Vbuy7Fr8qTL2XwwYP9vipzT8k7RuKV12d4cIRikmpvKYhY63c3V0 eCcLcrUiZjaSal2CqzudT95Egf/n6e1MZaVw7Pik5NiYF2GSPeiz+AKuaXn9JPyMIlTU U75L1qIDLkcVtv5apNN9/UekqJ5s4NF48L3spM5CuQs49+8xdttP5qdi2AIClONvjVvd PMLD+XadDe3HW67v5apVfFcFO8sUTKIaGLZFsc6CYofNGHL4B2aXXFpyDMSLzv8n83g0 z8j9h5AMxZWVmgKPP+Pup4fE3RhxuSZsKI0kw7d9M+3kya1HEN0UA1+V16cDggsNJmH+ hxIg== X-Gm-Message-State: AElRT7HupcXbVEmvXqcDz6HRLdZdQtn8ZJjcJRLHChNCV9VhM3xIueBU VWSnxpu9LZRgCessLaJ7ffCufl6yc0E= X-Received: by 10.80.170.84 with SMTP id p20mr3081604edc.233.1522419536023; Fri, 30 Mar 2018 07:18:56 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:55 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:35 +0100 Message-Id: <1522419526-29494-8-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 07/18] warp7: Specify CONFIG_OPTEE_LOAD_ADDR 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" In order to sign images with the IMX code-signing-tool (CST) we need to know the load address of a given image. The best way to derive this load address is to make it into a define - so that u-boot.cfg contains the address - which we can then parse when generating the IMX CST headers. This patch makes the OPTEE_LOAD_ADDR available via u-boot.cfg for further parsing by external tools. Signed-off-by: Bryan O'Donoghue Reviewed-by: Ryan Harkin --- configs/warp7_secure_defconfig | 1 + include/configs/warp7.h | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig index 538f9ab..81b297f 100644 --- a/configs/warp7_secure_defconfig +++ b/configs/warp7_secure_defconfig @@ -41,3 +41,4 @@ CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y CONFIG_OPTEE=y +CONFIG_OPTEE_LOAD_ADDR=0x84000000 diff --git a/include/configs/warp7.h b/include/configs/warp7.h index c6ab29a..9ae2ca4 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -40,6 +40,7 @@ "initrd_high=0xffffffff\0" \ "fdt_file=imx7s-warp.dtb\0" \ "fdt_addr=0x83000000\0" \ + "optee_addr=" __stringify(CONFIG_OPTEE_LOAD_ADDR)"\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ From patchwork Fri Mar 30 14:18:36 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: 132622 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3107630ljb; Fri, 30 Mar 2018 07:29:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/dYoygHwnpaPTkHgXEXRxXcnYtUoSDxeSq30O3jiSl3tAJUYWXWSR+a89QkbcMidumoEbX X-Received: by 10.80.232.130 with SMTP id f2mr3187471edn.156.1522420179353; Fri, 30 Mar 2018 07:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420179; cv=none; d=google.com; s=arc-20160816; b=M3+oUMhV/5sGZtwfQUNACxPZhRxgHXWbZRMtUKpMXbLQ4gTmUf1VlcEZoUSsvLFhAX NuVBM0r8bBefpKQaMS/EIYCgqqd1iv5C2SLE1ZPE83BSFgVQcgBOvlTw6F6Rv/wGQO73 pNxj2D7hEUnXv3VbD6ulkaUaUH4AymXH57TdMxjrHIrys5/DI8SYg4T78w1viji9cfiX mzfSE3TLwMo4FPIFrgvVzDlFWtnNxBhQ4RbyxuqMGh2FK+0Irs1daVL0HbAEb0JR+j0K 65LngT9op6pq9m+7h9PpnLgA0RSja8hCmr1EkJHCdtRwRvjPSFnSg/pmHUTdSfwkPMjA lB5g== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=6n8Yao22wwsAwCxreiUIsgLHjaxzmhe9ZcjyNOCjjck=; b=x/TbGHHSVW6nynmrcLL1XyCug2bxg0vo/2/9odZyc+e5FQb5USv4IBK5z2YIL3uz2B +Zg1EK9sazjPvNOFkswNF3WjnSYflMAl3B/6HBnDyRJj285UA13aViR90jfs18FPrcaJ olpFKhRI7el8mdAiSvnduSTaJtEu8zTcBYqGKY7AgzWjbUvrBmnBAGngni18OfCHqtAb O+OhWpZmmWWgR0r5xn7M2WuP25QMGAoryOhDLZoqw/E2Pb2+T0luHXogYRaFpuvw4Ntc +lYhL3lmnpqp2fUAOw1Py38YS+iUsAUslua24Qe6+TRvEriWhpetK715+tic0HEh6hN/ tUFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VQVcryMN; 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 f30si7706882edf.78.2018.03.30.07.29.39; Fri, 30 Mar 2018 07:29:39 -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=VQVcryMN; 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 EDD79C2224F; Fri, 30 Mar 2018 14:20:39 +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_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 45CC1C2220B; Fri, 30 Mar 2018 14:19:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D9B5BC2224D; Fri, 30 Mar 2018 14:19:01 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 6E191C221D5 for ; Fri, 30 Mar 2018 14:18:57 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id l9so15919914wmh.2 for ; Fri, 30 Mar 2018 07:18:57 -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=312jedmlCpkJLmHMXLAj4sTQ/QbO/f2rN5S+ZQ/QR5c=; b=VQVcryMNWpJy5ClmieXTW/ZEvCjvnnB4aineBtXeK/5vGMGsvNoujDPDp3EC0g3b6m 9kwQ6sxgLms0Nw77IqiQ40DHU7vgvBtS69jskDxImD6WUTvbsCbHihZvW8EqV+oKCp1g 74B0Y1yDKPaqIsshB0fRKjyuniDSQDDXIdgdI= 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=312jedmlCpkJLmHMXLAj4sTQ/QbO/f2rN5S+ZQ/QR5c=; b=TpOAD66kgJRs9TzELWVwq26ffaMjT/RPddLXsdbcZn4VbYbBUkct4ynzBthnghuUAR DyLG5STmhH1AAaSU7pufdOaJbmEBJI1+1qqPJmq4hWguHZSiEklWmxpNNfJqh9cqIGpz ghphbXlQr8gk8bvgxzkr2q+Z/cxhTje1VCM9xVlRw7YHqFOr/z11cxsBvRD/6WyP0+MZ XsKY3cVTLChlc0kQDSoRkuRJKMELCdSMnhyoBcd0S2E4XcaesRP/L/B2gRkLIJEcClBL lbjzSiR5sSkEs+tjUDKhQ4fB0Ej6zy60l7qei4/nKjlahAGaQwFNo8YB2r17NN92yYpB xq0Q== X-Gm-Message-State: AElRT7FZKn33gU1mgud2Fxo3yxV1rGzauzmIYMnSDp5J+8mX30XmAr/d CP99k4HHwUI2oRUHix3HW8eD190V7JM= X-Received: by 10.80.136.229 with SMTP id d92mr3048808edd.239.1522419536968; Fri, 30 Mar 2018 07:18:56 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:56 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:36 +0100 Message-Id: <1522419526-29494-9-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 08/18] warp7: defconfig: Enable CONFIG_SECURE_BOOT 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" Various function associated with booting the WaRP7 in High Assurance Boot (HAB) mode are enabled by switching on CONFIG_SECURE_BOOT. This patch enables CONFIG_SECURE_BOOT for the WaRP7 defconfig. Signed-off-by: Bryan O'Donoghue --- configs/warp7_secure_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig index 81b297f..d1d2495 100644 --- a/configs/warp7_secure_defconfig +++ b/configs/warp7_secure_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_MX7=y +CONFIG_SECURE_BOOT=y CONFIG_SYS_TEXT_BASE=0x87800000 CONFIG_TARGET_WARP7=y CONFIG_ARMV7_BOOT_SEC_DEFAULT=y From patchwork Fri Mar 30 14:18:37 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: 132611 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3100170ljb; Fri, 30 Mar 2018 07:22:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49m6QzUOMbs53+ZSIHVadqX6gdtkwMgNiWHJMtyc+mKU3E44gWY2GYTfwkwd8NmmV9WRn5H X-Received: by 10.80.169.120 with SMTP id m53mr3089166edc.180.1522419722885; Fri, 30 Mar 2018 07:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419722; cv=none; d=google.com; s=arc-20160816; b=qz968qCcazcl+4NfG/bvsRjX4EFFeQkSNAnDbElprzBlnsQH0ETXNTmDja6ZambVq7 6vYq3rsgCHxSodCKhdR6XMbwf9nyVXSXcODCxhvkMV/e4cMWUr3MufvgK5YyNc0uKAx0 h90znEzgl1/C0hb3YR8yiPas9MjPMYtxjkYRzCI2VbBQjDzqtkHzSZVIyXmhfeED8vCM kJmCVpxbGAL1HvZW7R9vqGz7L5hcv6TXmP/LlFnQnh4z2HG2EyY+EO00333K5l+MT081 Xqc6JhecSmARZxv0LmuRL6E4nlSm1Q8TQRB4ps1WEcFCXYkLRVjm8LNnNoVfX1lwpmAZ s/7A== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=XSll0VitLepdiJR4+iaqxCIl8fj/PV+zQaRW2IK/0S0=; b=S6UQn2XIpnYBEo0iY4mFQ+C1wgh9VMS7TOIWkQo3v33cpHtE/BofeaAcApIuOxI+Bm CoT8/9N/4L7E2zL7e4o5UEI5tif/Ej99gM9O/EBJCkaPn9fC4LOnRZ3AqmlIJJsSUbMN HgsKIv/3cbWuzgDVv+JYIIQmr7mh+sdabkbcwV3Y4bEoBIlliXXgNPOgjwioGY1I8xKB 4tOqr0DdN9Dinskg5ELypSqkbghK4rZ2+DCx/iWdDF5ND5AgG6/jCFfwtX4FzVrrjOLu nOMd1GYm/Q9DwLKB4PQIAL2G3ehPcaZgU2yaj2fyIXQLgL9B34jN5aIDepJX8OaAAv7U yFVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=j70IM/Kw; 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 z7si1260104edk.273.2018.03.30.07.22.02; Fri, 30 Mar 2018 07:22:02 -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=j70IM/Kw; 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 660D0C22248; Fri, 30 Mar 2018 14:20:22 +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_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 42D94C22244; Fri, 30 Mar 2018 14:19:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5381DC22249; Fri, 30 Mar 2018 14:19:02 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 79537C221FE for ; Fri, 30 Mar 2018 14:18:58 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id p9so15794305wmc.3 for ; Fri, 30 Mar 2018 07:18:58 -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=fIZLc8lC2tPVPR8OwChetMosY+9pmsuGJiJI1HU5/io=; b=j70IM/KwDLJxYbWbE6osixpN3tc+qH7XdmrSoqZefYxG3XxtALqwPsFhpOXWhDmME8 6bpY0lrbWhz4DHtrxAFZ7zZgPjALrHkco+14MTNSnHpj6MtL2vXtxJoVLl/oQxIXpRTt 2E/eFWW9b+AyRHwQjKUJ6872SKR+V3oLkO7eU= 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=fIZLc8lC2tPVPR8OwChetMosY+9pmsuGJiJI1HU5/io=; b=WUN8nbYelQxr6ubCjzJGxP8bNouk5ekDauHsIR/30BIMovj6khgu15m8W2J/NWZvTK Ije4jGYprHR11/ZWVuF5+ZijIVVieHI4bXdAOqhEZA4+ieAPRiYkDDGctwoh3vnKm7xO kmPrjbwgG1jDp8pWmBuzvFpwP76lPrgSdwqKXtWc3odlCCYTzDW6d3S+gzIAdXDVndaW 5qG+JUqRxLDaLIIwlLXJ2LW/cyedqaykdwoYSg44B8qY7netVJJqlYlGuPi+eYwkBRc2 bEahgp08cFc9agSzynTtF/gGvDp+8E7XSqu45wFqvxf7/h5RJoG8/nECQjOQiaQSTj5m sklw== X-Gm-Message-State: AElRT7GB8PvIMFB0NgLWloJ8fhRGeLRg5QRH0X9N0C0a5QOPaAopiwlu DU3aCmpaykaeyA5NfbsBIe7WXgvF7b0= X-Received: by 10.80.234.139 with SMTP id d11mr3060881edo.7.1522419538011; Fri, 30 Mar 2018 07:18:58 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:57 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:37 +0100 Message-Id: <1522419526-29494-10-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 09/18] warp7: defconfig: Enable CONFIG_BOOTM_TEE 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 enables CONFIG_BOOTM_TEE. Once enabled its possible to chain-load Linux through OPTEE. Loading kernel to 0x80800000 => run loadimage Load FDT to 0x83000000 => run loadfdt Load OPTEE to 0x84000000 => fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee Then chain-load to the kernel via OPTEE => bootm 0x84000000 - 0x83000000 Image Name: Image Type: ARM Trusted Execution Environment Kernel Image (uncompressed) Data Size: 249844 Bytes = 244 KiB Load Address: 9dffffe4 Entry Point: 9e000000 Verifying Checksum ... OK Loading Kernel Image ... OK Signed-off-by: Bryan O'Donoghue --- configs/warp7_secure_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig index d1d2495..0d46aa7 100644 --- a/configs/warp7_secure_defconfig +++ b/configs/warp7_secure_defconfig @@ -43,3 +43,4 @@ CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y CONFIG_OPTEE=y CONFIG_OPTEE_LOAD_ADDR=0x84000000 +CONFIG_BOOTM_OPTEE=y From patchwork Fri Mar 30 14:18:38 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: 132620 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3105999ljb; Fri, 30 Mar 2018 07:27:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+mEfZqrAl+8prb/LHNBUzmVJ7gzmUnIumvNiGXA8qwMieqO0tmcQecLkWRFbUjxTmcQ9y1 X-Received: by 10.80.190.13 with SMTP id a13mr3106615edi.20.1522420075895; Fri, 30 Mar 2018 07:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420075; cv=none; d=google.com; s=arc-20160816; b=x1NGH7deaGVFNl+1B4ohCTERpz1Bn+GKZPPqXhAvjTE6JGpepL4SXCvJtzVfpEtd2h 4l0ZwXZy6kg+ahP3FlTTn95gqESgDN4DpPNlEpeNX0Tq1N/9qOmysTFi3O35p9qEZL6g vWwDduwhhaQqXn78/XxBQLSpJTDMlvOjDEMs2wASMzDb3X9EtQtne5ECeL9afmNOo6/8 aNpm8TCYTIUgrGSyCG1sYw+ocl6rumySn1peN6c9YBihS7Z0iaQF9JogRXe3T7zJhN22 GAiSee0Wa9kNQnfkllcpASwUFEhShh05RYJjWisYluFFtFMrmh6IO/8bZYzase+UQdVS MJQg== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=91nkaIL4RJnwcUM9/m/1kJyMl4qjH/Uu55TV1hbeX3A=; b=jPX6/3DRVt/a/js3Zgt8YCOsfUHjdXCR7y27Cz2+G2yIy9hkmQxnWwxBA4NCoB/WWK fCK0DzJNmc38P5cIw37J+esSPjXi+5u69E65n5QFAM21eYycGSxBLO1GXPORK3at7qVb 9xsZ3i/4gB0PbI4AwJDQOAk383TBSC7lMIJ0SDeH9LdJ8RF/hY4r+VlaIvvyRnoKNYqH pVebeSqMVoB1F5ELTqP8VndWAFyXJzbJ3mewwu6RCeMSK9Y25iI5xgGDjZUyKuq7mDOp B069z7uwlLgS2ptgVgHxWgRjruieGx+U5mGWj0rmlKnzkLERwjrAwhMWmXItIvz8rQrF 29qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CVmzIly+; 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 o4si3588008edl.542.2018.03.30.07.27.55; Fri, 30 Mar 2018 07:27:55 -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=CVmzIly+; 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 76B51C21E96; Fri, 30 Mar 2018 14:23:22 +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_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 7F68EC2223D; Fri, 30 Mar 2018 14:20:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4A697C2222F; Fri, 30 Mar 2018 14:19:03 +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 867FBC22228 for ; Fri, 30 Mar 2018 14:18:59 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id l201so15832049wmg.0 for ; Fri, 30 Mar 2018 07:18:59 -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=69ot8eDC8kOiHT8MSclZSMfSHSw/P8dEzlNgj5pI+Rk=; b=CVmzIly+sQ+PJwBZW0L0wljKwqi+quNYWX2h95auVyd7RymEDF1soOixjF23hwHHLH RqRdmfpy+Nv+GaKneOgvVqkUaxBLr7sa759j21DdTqNzVTyUy3ND0yw7hPJ4kjaygtm9 pV0wKrlTBsIzPuLlaJoQlBqL6RhR2DqB43OmA= 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=69ot8eDC8kOiHT8MSclZSMfSHSw/P8dEzlNgj5pI+Rk=; b=W0JSfACv5MB8pMozm2pMnNni03uZFXwD3KIAc/MPI+0uktLRrsZ9zmMfmzfLhBCsv8 1ygW3IQMqELwyr33iYjq+HexuDPyCTxugiGJe4FtZWK0F/jlIFUrRlTImDyjEMUp2gLm YLDV2EGcNkQ0Hz6mD2zogcBSlLZ5s8Yf8q98uQO/XPmnHsfQ9G5ItgCfFSRAjtsoFxTa VSScjOwuGsEzz9K9CBD5gNKScfIHagxTw7vAwn2QN1slynJ1dtyU9fwV8/pA7DrXnJF0 u57YcjqDHMJGRSdf/5E2axQ4bUEssT5lC6qvMCE0dKD+9jJKBQHtU/Zjywnp/5pBUxS3 j2hw== X-Gm-Message-State: AElRT7FzdgR0mHU8KVYlaaiXk5Es5Comy64oT/kgGP0xFBJQ5Vo35Vne +OBj2gU5T0A2EJg/j5mdVYfM0KV36dg= X-Received: by 10.80.167.98 with SMTP id h89mr3148996edc.275.1522419538993; Fri, 30 Mar 2018 07:18:58 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:58 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:38 +0100 Message-Id: <1522419526-29494-11-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 10/18] warp7: Make CONFIG_SYS_FDT_ADDR a define 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" In order to sign images with the IMX code-signing-tool (CST) we need to know the load address of a given image. The best way to derive this load address is to make it into a define - so that u-boot.cfg contains the address - which we can then parse when generating the IMX CST headers. Signed-off-by: Bryan O'Donoghue Reviewed-by: Ryan Harkin --- board/warp7/Kconfig | 6 ++++++ include/configs/warp7.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/board/warp7/Kconfig b/board/warp7/Kconfig index 61c33fb..00df19d 100644 --- a/board/warp7/Kconfig +++ b/board/warp7/Kconfig @@ -6,4 +6,10 @@ config SYS_BOARD config SYS_CONFIG_NAME default "warp7" +config SYS_FDT_ADDR + hex "FDT load address" + default 0x83000000 + help + The address the FDT file should be loaded to. + endif diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 9ae2ca4..a92e675 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -39,7 +39,7 @@ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "fdt_file=imx7s-warp.dtb\0" \ - "fdt_addr=0x83000000\0" \ + "fdt_addr=" __stringify(CONFIG_SYS_FDT_ADDR)"\0" \ "optee_addr=" __stringify(CONFIG_OPTEE_LOAD_ADDR)"\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ From patchwork Fri Mar 30 14:18:39 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: 132625 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3108769ljb; Fri, 30 Mar 2018 07:30:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+iber2pJr8SX5Ttv9cGZ42L/NIrgN1QmhiPFb8oviY8DFu/qnhP3739rlnxRjFm6BN9IK6 X-Received: by 10.80.244.6 with SMTP id r6mr3224311edm.2.1522420242956; Fri, 30 Mar 2018 07:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420242; cv=none; d=google.com; s=arc-20160816; b=LhbXSVdKj2UbOJ4Kxa7g/K5fYMYB73rj1aUQJE9Des1mUkyOs9qzr0xcKnWIWy5/5H TIN4dtIFZf+BY/IQkOHHvOgkLpJEwylIkqabPxwgGTZDyhJ8byK72adaDmwXmc/s+OIH JQbqfhdtZR5HCKaYZZb3we/z6VaR4lQ4gqyQB5YOEcTvFOWiYn9SaupZDCdO9vMFFlSb gV+uO7WfV753yOUyDpKNR/vL110NAfKoZ5a198Je2zpxs4gh9zBSM+0xsxhShSmn14W2 pGW/IaeaU2iYnW/c4jE7YFbyxGD+7rIJt+fFIBVgpVqgMwBWxIIM9eF99fpl0/XZZUP0 DGOA== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=u686vhWbrZzGteeftF8bTwaSIYylAa3I53d9jhhfXfk=; b=BZEsQ9AHULM2tPq17LvvwAolomAZ+d9MtXIbEFiyIJcRL75XkTu992Lic+u+o4P7Cy 4K6qdAreLFScggJkk3bJNCMp0qZ/v3Pg8gcoYefhEJOAFbjAwhmaD9jmFmRIRrKcZTjh 614n0bx0m6aZUN8jm3HQuJ8XmqMhzJLeUSB4VD0Z59xz9XXgvIB6iXR0aUPTPLD9blRg ZtOcANCDVInsU5op8Dd1TzHNgXX75PeGp3OIGSLvYumitACryn/tTwR6UvPsGCS85bxi PzTCiKm/J2G7WeEV9Dhp82BtEZckgFFXMWlCi2b0sz2j8nfyPHBX6iEmaMLrnFmUrRNR 4ssQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QM6DhdCB; 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 g25si6684685edf.328.2018.03.30.07.30.42; Fri, 30 Mar 2018 07:30:42 -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=QM6DhdCB; 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 5FC60C2225C; Fri, 30 Mar 2018 14:23:54 +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_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 070A1C22264; Fri, 30 Mar 2018 14:20:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BDEE4C2216C; Fri, 30 Mar 2018 14:19:04 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 6FAD6C2223D for ; Fri, 30 Mar 2018 14:19:00 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id a20so2393391wmd.1 for ; Fri, 30 Mar 2018 07:19:00 -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=6zyqbeXbsYwssJz7KTaTg3BhQYvtOgkhyHJv29E7nww=; b=QM6DhdCB/KLE02ZgOvc05rzlQzU8fPb25V+71RUlHUTLiZKIrV4cXNP6hsOaERgC6j Tfqk768GQs44pjG0qKUc8vZ+88x5hLA5gkIcyQWat3PaJdS8FMpBTIpAIOpSTdZeoXXz c/R+o2yB2O2n79n6G1iZX1qpYTS9+7zXQd7pw= 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=6zyqbeXbsYwssJz7KTaTg3BhQYvtOgkhyHJv29E7nww=; b=cApAksESMb6gK2wbxEdygdWsCZOJaJwpuQZCndBswTNCxPkvzjQLxt18eJKVk3WSpw l8pKTfYmBugin5sjg1MNn2clU1ruABGxLj0P4/oImvwVkSJ16Gciu2cqufave5Zh1rlX cxNsl7332E//UkQtqz0TvY000QeJuY4K1dqtNiLZHw3tNWda7T6h0ot7wwj+CVH7Z/4Q CAAGVZbwOC4zVlHIhcPHPXg3RmRcNId5fWxdvjEMfSY6OrooFzaXH9L21LXBlEBdVrQ/ 2JKZN1cAgoPKIt7nyjEovyt9LLEnWzKDqJuOGImkC+rq6sY0x4s2gQ0aCkpr8dW4tOAe vi6Q== X-Gm-Message-State: AElRT7FCCePOksrntK4sPNoI83nLOmlUxF0GqvhyL0SigXFXGCYLKy5a uYOK+Izj7f66qypuGPWugh4oTC/EMhE= X-Received: by 10.80.137.201 with SMTP id h9mr2988577edh.225.1522419539952; Fri, 30 Mar 2018 07:18:59 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:59 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:39 +0100 Message-Id: <1522419526-29494-12-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 11/18] warp7: Add Kconfig WARP7_ROOT_PART 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" Adding CONFIG_WARP7_ROOT_PART allows a defconfig to specify which partition is use as the root partition on WaRP7, this is a desirable change in order to support a different partitioning schemes. The default is the current partition #1. Signed-off-by: Bryan O'Donoghue --- board/warp7/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/board/warp7/Kconfig b/board/warp7/Kconfig index 00df19d..c089bca 100644 --- a/board/warp7/Kconfig +++ b/board/warp7/Kconfig @@ -6,6 +6,14 @@ config SYS_BOARD config SYS_CONFIG_NAME default "warp7" +config WARP7_ROOT_PART + int "Partition number to use for root filesystem" + default 2 + help + The partition number to use for root filesystem this is the + partition that is typically specified with root=/dev/sdaX or + which gets converted into a root=PARTUUID=some_uuid. + config SYS_FDT_ADDR hex "FDT load address" default 0x83000000 From patchwork Fri Mar 30 14:18:40 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: 132617 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3104205ljb; Fri, 30 Mar 2018 07:26:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/bdBGDm/+UQDsckDYlZXKxvt8LP7AHXdIPifHpmXtxoHWieO0hbXtjXynUdqlIY4bPzFBW X-Received: by 10.80.201.7 with SMTP id o7mr2035584edh.111.1522419963640; Fri, 30 Mar 2018 07:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419963; cv=none; d=google.com; s=arc-20160816; b=kDhCWnT9lpLdiuR9FNoWidGRtXpVl9BPXSLsjsoRT8OCPQXDn8ah/HV7c2HNWGAzzq e1GD3wiCNLZ1b4hNpz2gvYCf+4sQGB4TizdAY7IM6woeoSwRAaHgBTrS47/5zkzNe6O6 2pkBAlGkosi1+uUUOhwFBJjMJEPKd9w3C+sLXLe3gMcE0vI2rEsERNMaADdVDsuri6aN FR5H+hRGMe9rk8T8vVi4/jmSTqberlDRaiaPwU0VcrOIAdPhnn28eAQsfqZapgp39nWr f1UrKQQ0m3rduAAPl1tcjiodNzxF2HxPI4vMI/R6owoyTfxK8J+NqaEy14A6i0J1ed19 mhdw== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=IIdi4JLTUxJ3l7svuck5BKTAWDREgg+cHeWwf0SxUZ8=; b=bu02v9DkDTSEzaO49EtoWCP97gDtInB6fZ91KQ803qUocqXalrBZ4oexoiz1elOrVn sYGDJ+v66czalzzfthCFAm+yv1uw4LZHrFTlYJx4QNk6Mwgs9l5EEnwitQcsvNDNonWT Yriu/pYmJEsX5FrI/9jyxVf9zvQAXE9t1gVs/l1sYXOGtkvtVoKNjDUeC+svBUwaEov5 v1lGkoDDd2nEQE24Yivj07CJA/KuEU9/lniUkmCM4jOFAuxLS4gvqVcebmplUs8POY+r WudAQwEBeGRowiPamAnmaAoR1Q1gaD4fzdSjAIipWBpmrdmLKOS7C6kL7049UJfC16NA 7bkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=P5X18JVx; 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 32si4390588edf.507.2018.03.30.07.26.03; Fri, 30 Mar 2018 07:26:03 -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=P5X18JVx; 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 442B7C2223D; Fri, 30 Mar 2018 14:23:06 +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_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 47EEBC22257; Fri, 30 Mar 2018 14:20:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 67F88C22257; Fri, 30 Mar 2018 14:19:05 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 8DA8CC2223B for ; Fri, 30 Mar 2018 14:19:01 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id r82so17107111wme.0 for ; Fri, 30 Mar 2018 07:19:01 -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=NjxHK3OGsvwRFYTLMQTnpuSC4TAlbWIKSteigctFZZI=; b=P5X18JVxo/kbu0R0HKONFX/BcrKSGoVPOaLCfQWaSX5ksPdZ+t0gYmHW/HybGa9suv eXeTzunBeqRj9CBuA3I4JJ/TsomS8WXPqbMxUh8JaA9O4uM3y5A5ekgKR1Yh3IhJKCqj OG9mRSsFE7rT1OuIKxielxj9S7z7bOMsmrs9M= 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=NjxHK3OGsvwRFYTLMQTnpuSC4TAlbWIKSteigctFZZI=; b=MLG6sfqDBr4l4cY64aBitC/2Mmx9zeW7J4EUgtQ8F/AIGcgCbu4f/Rf55U+mtuVsEd lXEU8PeqQaqpK/HmuVPs767lkjBZqqojeQhbqLt2iRK4I2jnV6VBBfbel2no6Vc1mUUR VT3DvMd77yQO/hUDwQ5W5hKYFevzR1BQ6fRi/68Enz3+gLtBDO/mLXN5zBJ3dmKDXIJe m/5FEKeGSczWwVQra0CQOseClhKPBGuiWUrgJndLQLVcaSEO+nTpsBy+02pOWVRNrTLq Q5xMK2ftOTOH2nZC22Y0w5wka06uN4g4ulAmWKZNVxjwoDGSIilIGnzLIsm7U39JLmFP Tt2g== X-Gm-Message-State: AElRT7ERqkfNf1F7lDw0lGzArthfGaJLr86vd/NNjY8lwmCRYI5kMC+X a7EPYOPwsp/fmd2AyMLdhDZL0Lv5agU= X-Received: by 10.80.145.219 with SMTP id h27mr3168674eda.3.1522419540886; Fri, 30 Mar 2018 07:19:00 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:00 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:40 +0100 Message-Id: <1522419526-29494-13-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 12/18] warp7: select uuid partition based on rootpart 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" Assigning the UUID discovery path to a tweakable environment variable means that later steps in the boot process - particularly a boot script can change the target root partition of a particular Linux boot. Retargeting the rootfs is an important feature when doing ping/pong upgrades allowing a boot script to select ping or pong as necessary without reprogramming the bootloader. Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index a92e675..f2ee09b 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -45,7 +45,8 @@ "ip_dyn=yes\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ - "finduuid=part uuid mmc 0:2 uuid\0" \ + "rootpart=" __stringify(CONFIG_WARP7_ROOT_PART) "\0" \ + "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ "loadbootscript=" \ From patchwork Fri Mar 30 14:18:41 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: 132616 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3103958ljb; Fri, 30 Mar 2018 07:25:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx48plwnnjW6BpBHULVd/kFFFlrdpdqGTDNzvDiG3P7dhOfhrNX83Y0bHK5kAGtyZ6nVwAV35 X-Received: by 10.80.131.198 with SMTP id 64mr3079261edi.273.1522419947619; Fri, 30 Mar 2018 07:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419947; cv=none; d=google.com; s=arc-20160816; b=bJInKLpzwhjhkXtqoYgdXdd0Oa+wMCEggIk1XCv3zSXhC7LDOzqUlY1s4N3cJ3uOya ix5+D7Wj/adP/Zm/t3uYN+Kfk4rw6admMYqpHGrMCrHFPyYNOIG02HLc1GPolE1egLU2 R0j9Bwk6m0Qtuby7TIRZurh2D0px85Ibp8CYTtTkD2ek1NegvtPSCQmu69eY9KSnOUPH qvA52wZoGLk8gIElUJb8wfw3WYyqIFAXUCbZorp5HlJWzJB8oZbMBT9EnOYr/LDqtEQ8 yqtrPQcfUgmfCkACfT6TOBDFqKUQGQBCbU+NT7sRy0+FzGmhwNbG18XOtRcGYDu2ctFP 2+ug== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=54ufGjXjRVzQ5DUqP2dB6RLm6X/Ho9hynItpgV6Efi4=; b=dwFomodff4TMTMEAnaft7CS8DnzPmFS6l0ug7kMOI6Z65lXlB+GhM+SrXLK6kp+zzj d6seNMqu6hcdiDifK3P3UQ1JL+DIVKCFB9Qrw+kAlZfdQ5Wz0iczWdcOqFE2AMd12IGl 61Cm7sDJ8+HM2BOGm3KBwTMh+5oy6RPFoCx364eHqO5jCK8rMpYsYGzHeEGn5+0VYkvd NpmiwBrCwcPmlIA4qS2+hSyYkCKep2K6RjsG9Ao6J2HSomSOZUHn6aw6VGcT10JHbJvL 1HUbBlZyvKxsWv/aV2tpq/our4FSmhomvoDD+Bj74L6Jugi+KtPkHoD5pKlcpcPtvphL SHFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RAzlKvkK; 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 y4si3066525edd.13.2018.03.30.07.25.47; Fri, 30 Mar 2018 07:25:47 -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=RAzlKvkK; 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 27007C2223B; Fri, 30 Mar 2018 14:22:49 +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_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 47AF5C2224F; Fri, 30 Mar 2018 14:20:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C5BADC22275; Fri, 30 Mar 2018 14:19:06 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 536C9C221FE for ; Fri, 30 Mar 2018 14:19:02 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id l9so15920237wmh.2 for ; Fri, 30 Mar 2018 07:19:02 -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=9Wj5j5KuqjVbPYDTOuPNs1dfmOUFvuLWceOcATk07BE=; b=RAzlKvkKxjwMUaV422TM+uT6tehQfckr6HEdZ4bliDfhe0psv/6Sh2wGPdQU3K6Rg9 lkKpbKrAUqnmYcaW7ImOS7BEuiDoCloSiU/n4yN1M1maSmYf4x0olPVCQ8xIwWnqmXLQ 6sfXzKyN6GcNVAX/+XUrgHb4ZqVgLer+6iljM= 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=9Wj5j5KuqjVbPYDTOuPNs1dfmOUFvuLWceOcATk07BE=; b=Xvp/it4eEsRG6B8yILBrE4WEI/Phu68DbsonX1LUP2GoC9teBMcpCSZ7MkQhVJ9yC8 vKrYwF3UP7iEC3LCfPy2yAlSXv/VBdRl8so02kAmZ8zYkUlfmL+cN+437DIBWk8+GUuy erhbiThDqxEaovSXdBd2Q8fhYvjhZxrNV+aenv9FlLlP5F8hytWEyDAx6n5DlSHk4Nkg bXsKpzajWTu8X728u+dIfqZsr5DP2hwgnZ0WRI05wGbGfoE74l7GOl0+KPUf4+aKduuV 9S1n45SBkI0LO6Q/UYOPjtFhQx0O200fg5CniJrc3E6Pd33fV81w8+YcZTkhxbIaiqxV 11UA== X-Gm-Message-State: AElRT7EgxIPrsZwb3RhPU6XT1pg3uwcG75cs1Oc/ZAYuc+TXJaRXXLSh 1H89bJdrteWWqcdNCXRJPdhZFyFdhyY= X-Received: by 10.80.250.1 with SMTP id b1mr3062974edq.157.1522419541851; Fri, 30 Mar 2018 07:19:01 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.19.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:01 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:41 +0100 Message-Id: <1522419526-29494-14-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 13/18] warp7: Define the name of a signed boot-script file 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" We need to know the name of a signed boot-script, its better to have a separate variable for this then to simply append some fixed string to an existing image name. Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index f2ee09b..53fbcb2 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -33,6 +33,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_DFU_ENV_SETTINGS \ "script=boot.scr\0" \ + "script_signed=boot.scr.imx-signed\0" \ "image=zImage\0" \ "console=ttymxc0\0" \ "ethact=usb_ether\0" \ From patchwork Fri Mar 30 14:18:42 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: 132618 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3104614ljb; Fri, 30 Mar 2018 07:26:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx49SqYm0W97kSzT6p53C7XF5pUu8g4Hz2eH07O80dDuMV5SL6KeoVsEDlZi4qqvyEn0FJlG6 X-Received: by 10.80.216.67 with SMTP id v3mr3134659edj.193.1522419989307; Fri, 30 Mar 2018 07:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419989; cv=none; d=google.com; s=arc-20160816; b=seKQiSqQKcGRQSKNHohmqmlcHb2bIT0gw1UeW7nyli7s5kozQDFKPwrbvlLGhadjqV xrxyq6OtZet1VKe5JbZKcCHgwB9irOrYgDiRyGQ4zcMbVs/REypK/0MLiIq06CJyeNZn xJdNuDtqZ6RLFDWi7LQ9fycj5E5eA/iME9OrHh/LMtOnvCaT7Rgr7KykNdFaZi3LqijS fK+FFifJtLMmh3gWVEheQwJuWIpipDbMGqxnAcvL4gjLi5otZYtbBnSjix5lvBBESxNC OewRs1LqzhdPoDx3AKLAmqwn3AyIAE2ue73ZgSaliGSpNN4TGr04e5/b7Py0FuLt2cO8 nBdQ== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=UQpi3octwDnTltW2VuBMbM8YLif4jE1iF5y0P4C9kOw=; b=dnQrprVq/19Nans1fbwFRbYEX1gzDU6dH9q1//VcvJ2khRUVlMBtV1pLM4U8c0u293 ZvDlVs2DQAjYUu+1sFgotmEY3ks9IPm+MTGCYkcjHxQqqAtwT1yzbBH38sRykcSwGpQm J0TISSzPhed9gjAdmT0XYrTxwLpei1ZB7EdwpUWYBzkp8tSety2oprBOyogHT71hOxXI MQfKD6hXX12ebpWxRHvdF+klzuUr0+IhVOG68c9/TaxIrplLpeVX/cD/zKFCJ3QXq1Fd s7u2Vk4E2pW70fubEERc/p1HNtwl1wlytjNPLnZXiuJtRz6XAtzI0AoITvm5Z3dRklPG MrkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Bty/IMVC; 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 y30si3186969edy.473.2018.03.30.07.26.29; Fri, 30 Mar 2018 07:26:29 -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=Bty/IMVC; 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 D92DEC2224B; Fri, 30 Mar 2018 14:21:44 +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_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 AA5B8C22255; Fri, 30 Mar 2018 14:19:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6A157C22252; Fri, 30 Mar 2018 14:19:07 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 4BCDBC2222D for ; Fri, 30 Mar 2018 14:19:03 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id b127so15046909wmf.5 for ; Fri, 30 Mar 2018 07:19:03 -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=v2u7l1c0M2K1Ymy59hhHuBLxnZM3pqA57+elldq+44g=; b=Bty/IMVCxpipdgfh24dJdXiU+9Ie7kDDFHy5nQVQeGNf0uJYblNKPVVhmJxFM2aVRw D63YIes4FhHLHhVkhO/3UcFO5sRP5rFSa7vKADPcasPiQcIYaYsEi0CnQB6dfPn3aNCq 3mWEHwDyCtmn2Q8KBnRynRy82W8EEJWHQgS2A= 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=v2u7l1c0M2K1Ymy59hhHuBLxnZM3pqA57+elldq+44g=; b=bCLY6YBGUztoR6vac5WR1jVA6dj5b518cgjp6rLmvQ1l8G1ndw2owQXV4ABhnl43aX W42Xq9Brj2Re4qdTPr/g7/awgxMif0fcVphLEeJG/brNX4A7uXkUto7pWXtlyKckopDZ mqQmyyDEMDyq4fyxRcxFQGqm/djbwPidfpyFdARnrUat1jaQi9DyJAkryMQ4LIHAvkmo Xmx4xDjfJLSpcl80e/sUCQQC4+dmXNiNon9yrgRfgnOlb3gZef+9Hag52xpD0oQoMj8O h2wIU/D2xp8nuP/v+MuYQ5owOGuAqsZWTKCjePfSdreHran6FsAEHYqACI2zXZM2mExu Bw8Q== X-Gm-Message-State: AElRT7EtJmJnaBkOC9uHfGdzxA7u7zI2f+oJeoFtm1v3yjvw4NSpUqJ9 +bBanvqanOBJTNGUjSLXuzenPebGvDA= X-Received: by 10.80.173.196 with SMTP id b4mr3188620edd.168.1522419542784; Fri, 30 Mar 2018 07:19:02 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.19.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:02 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:42 +0100 Message-Id: <1522419526-29494-15-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 14/18] warp7: add warp7_auth_or_fail 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" Doing secure boot on the WaRP7 using a common image format and the same variable to represent the base address for each call means we can reduce down the command to a single environment command. This patch adds warp7_auth_or_fail as a wrapper around "hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0". Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 53fbcb2..c957b2d 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -50,6 +50,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ From patchwork Fri Mar 30 14:18:43 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: 132623 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3107727ljb; Fri, 30 Mar 2018 07:29:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx495D0Y77yGXmj6ylx8wrZhXMznqyO6Af5n34vj8BFdHcE8f2dP2XWYgXl/hmhROqFxyR1gS X-Received: by 10.80.137.149 with SMTP id g21mr3115695edg.25.1522420186173; Fri, 30 Mar 2018 07:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420186; cv=none; d=google.com; s=arc-20160816; b=ZZo/vPc9Cgoq1PBPf3v68hFr2IY75szG1H9qoCaPZYlRtMxXLbf2jKpZhl+OhAbrBY TUswYSpoVrwac1oSkedLRWPSLB5545C7t3jnh1nWZxNUGqJ2OjAXQpGkiZhK+B8IqiaH v9Wwrsv0M0TJzcmrFXfXoRcobdYYyX2a8HSU4nljHCfNUcF534ArWvHpYhS+yUHGpVTs nGInxUoc9RPyjdLORJz9O0tBMmEXpABdgkaScAsRpLYzbiE/2D0reUOSGYHCnUhcjEkM 4vjxhilpHAIvlX4UOUtlJ/lRo081BdIh+UWzIWPw3bTpAZ/Rpzo0K63bJ9RWrVbt36QS qDtA== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=eTPzj4/kmWnGDlyft9Azpu0Egno0t+7BlwXpXQxjj8E=; b=IggWqMl6qoVeD1A5NTdySh31sCwfMIvLYREI+3qYwkKFk506V/tL7AuhA+XXNTfUjC f/WSeCUWIiQSlvd1Ku86EXlfuxV827J5QYRcfvnQ2T1ZDWet4D+GhryLcQpAe3qRfniT rDa2zwG78X1PNmkWivqcriJXlIJabJutWaccNDJUwKSFVJfOgH1KXbeUYbeG3fjdcvmi W2moS+iIEHJuxHF4kMN1yPbTrQfKx9uE09zPRbr6YP09OiXGJKVmVZO+mK5QE57fd/5q vkTIgV82T11gNjLne0xIfFmPTVRgTTa0JbcP9thTdVh9w4TGvwOG2YiKgkSegC32oGk+ 4/xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZpuLwIVf; 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 i2si113035edb.112.2018.03.30.07.29.45; Fri, 30 Mar 2018 07:29:46 -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=ZpuLwIVf; 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 C772AC2224B; Fri, 30 Mar 2018 14:22:33 +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_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 50942C2226A; Fri, 30 Mar 2018 14:20:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F08EEC22273; Fri, 30 Mar 2018 14:19:08 +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 32ABAC22245 for ; Fri, 30 Mar 2018 14:19:04 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id f125so16960027wme.4 for ; Fri, 30 Mar 2018 07:19:04 -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=8Mgg/MIYIwez2JZu4bkQx7bPGQ99wt2UA7NEJcVK+K8=; b=ZpuLwIVfspiJekOadxpGoz0hEPji3YKR1hz7uq/ZMr7CfHNH+of0dA/Vxifi3lK2W2 P8bPSpvCznh+BiZcRXBKVM/+4l+V43zr2Y1namR/aSCb4oFAEgjlYl5LoEw2Z74zIvvN lDYki7TBLZog8VAoWTXo4SGWQ90mRqJvy7tLM= 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=8Mgg/MIYIwez2JZu4bkQx7bPGQ99wt2UA7NEJcVK+K8=; b=N+fLFZJTzRVzCXx+WLhL0Kpfdp/bxKQNLngyIOBj0zJPSvJcacxl5Y2XRbnMcK04Tv WnYmy02MyBhKra/Dc/YH+pLgst+PWnR4efveEldcL8zufQtW8zmQmtAUMDzFQCJrFGZK 866fz40CDjrg+wRPoa5tjZjJucQuoNArbVMOToOzrR4CyJGOgywc/7bZWBCAJxFKwQ0d LhX/ybQuRyOcnebgibsAM5RG8VBTr66+BVXQ51lSTscP6e1fKNWx2jISw9BzEDiImV1+ q8qrR6bIl3Q8sD2EYef5XPwCNu4HjZMoowKr6dWF2weRK9iUFEVO6yoGfuksdxG6xihj b2BA== X-Gm-Message-State: AElRT7GJlALgD0KAQ/i9xiOMjbaSSFU/iGNoACHYW80oui7uF2GEl/2n RtBWCoc90XqTYvZh4O2BEToaNnTXV+Q= X-Received: by 10.80.145.49 with SMTP id e46mr3141997eda.252.1522419543726; Fri, 30 Mar 2018 07:19:03 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.19.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:03 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:43 +0100 Message-Id: <1522419526-29494-16-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 15/18] warp7: Make load command an environment variable 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 replaces the current "fatload" command with an environment variable. Making the load command into an environment variable means we can change filesystem type in boot.scr and reuse existing commands within that boot script. Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index c957b2d..712850e 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -51,12 +51,13 @@ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ + "loadcmd=fatload\0" \ "loadbootscript=" \ - "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ + "${loadcmd} mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ - "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ - "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ + "loadimage=${loadcmd} mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ + "loadfdt=${loadcmd} mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run finduuid; " \ "run mmcargs; " \ From patchwork Fri Mar 30 14:18:44 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: 132615 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3102612ljb; Fri, 30 Mar 2018 07:24:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/gxHMvoM9G5UWYGguaXUbz7oe6G/zf7Y/gEhVRiSgi4415BleHR3AQtyOt4bqn2N70tTRV X-Received: by 10.80.211.3 with SMTP id g3mr3123889edh.15.1522419869097; Fri, 30 Mar 2018 07:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522419869; cv=none; d=google.com; s=arc-20160816; b=W3eU9OIcLDAf9brOXQjCnTwK4LMncJ6rJrSYbse/pBq9O43s8w4+p0xNjhWEQDxTi0 10tSW16f+4tEucUl8azlwtXrFLDdzzD6J4cQw8ptTIZgBURXebRJo2rZ8EndsnVAvrCu UnLqhllV3lk09WNu+MZSgw//ntPS+m/MRDw5UNOchpuaL7UMAj08ig6fzXK7Sd7Rpvjc TXsvG2LwMEcSNTwk0QQPgFejyE7uL37r4uKrf4hZ4tDh/O3fPJ4++Paapmf2z5rUcjJR MwCvmThQTYgI/EeM3xOp2qoqgRqjfGYxyn5mnTWNhEpAGWAUu6hQh8Mpz19NvLzKC/GO KBSg== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=vpwozuNXIgPn+WTfhQlCETLLKElctXG/tjgJ0YooG4M=; b=gdcpKN2dmuzp78A1+YT/7tE9w0dLdHAr7IBkkC5n2IFSWp6olYVb9Jk493UPVdXczI TaRo0Ja+Nf+41lMgvcngOdi7Kb/Yzi+rrf+6v0K5d8GfTpmSm1KWnvK6bv6cxaRfINvN AQ/utx1vHfgzmUVKSvsYUlHsFu9gnj2CMv3huZ+jmaTIg9+W9Nu5CEsWGbLH6RijeUQY O6xgBXVhcHJC9IBHZv3DrmeR9Ye7n/M7pROhW6OSpZfhmN8JV3r6iCwudmdAQss+jvjz Lr7fHR7sW6mX5QLAXKFpOnWcdunx9L8s+R/RgxPl6UoCi2GrBGMbE88zinZQCGOlXltY AS0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BT9xtJun; 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 90si3611378edq.356.2018.03.30.07.24.28; Fri, 30 Mar 2018 07:24:29 -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=BT9xtJun; 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 A3DDDC22245; Fri, 30 Mar 2018 14:22:17 +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_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 ECBFCC2226F; Fri, 30 Mar 2018 14:20:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DB3D8C2226E; Fri, 30 Mar 2018 14:19:09 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 3A17DC22220 for ; Fri, 30 Mar 2018 14:19:05 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id a20so2393679wmd.1 for ; Fri, 30 Mar 2018 07:19:05 -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=FEXxuRRjvn50FM9szallURquLyaI3hcOnAojN0lxomY=; b=BT9xtJun66WkONWf/xjnY3fbKIqMrLS+FThF3iB03BK9L6Apq91rw+yrG9VHU+Ks10 EWGIDARm/Eh7w/+T/M8WYWQ4QLajMhbmy9ri7jUvNlpIS8Q33/sAdqqqr6qYYaRvuB90 lLmb9Fme+RN59Y6DnO0JlmrSAPrE9S4w7Tvm0= 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=FEXxuRRjvn50FM9szallURquLyaI3hcOnAojN0lxomY=; b=FOVJXCxEGdrz/vc+xOL+hb+XLQ4y6rpB9P0+ZdXeRmlnVxvIraI15LNPBbqI+E9PiP yPMdt1RZ0Bk5OViZnODsk/+V/CblYZRhFV5SG5qegnVlIOZP/piLGjqxAaeDSLgmdS6c 7PlJs3xURxsfr8lDo8dE/LAyzCx1DBHVr+KgM/wIQuwCX/gWDbQyNWAMBqFxxvCcV+BY Nr/fNQ4WJ6X9HjS8HPndArZGPBdAkFb/WFDkB5qsDo6NdFy5ipJGxnZlS7UvJ6ZBf9y+ qi+xouEqZL/6HXAHRPxxaV98fznkHt2Vfm/ZEPpVWOPMyERDQiZKpw/3aoqnF4g+kCKe nbww== X-Gm-Message-State: AElRT7EHzIz+8Q91RMoCaGNFIaGRLNEOONNfUx5ofgd5rrcdRHM+16yl MuiSS0fIYz9cZPz2/+UgYWEQkiXCU/o= X-Received: by 10.80.177.234 with SMTP id n39mr3165429edd.108.1522419544739; Fri, 30 Mar 2018 07:19:04 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.19.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:04 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:44 +0100 Message-Id: <1522419526-29494-17-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 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 --- include/configs/warp7.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 712850e..adf25ac 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" \ "loadcmd=fatload\0" \ "loadbootscript=" \ From patchwork Fri Mar 30 14:18: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: 132619 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3104901ljb; Fri, 30 Mar 2018 07:26:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+jBy4kl3BXte/QzL+MaQmrU4mJvQH5tzpBVVfe7hwjiBv7yIbXES6rCu2N9Z7Xd5Bo3klk X-Received: by 10.80.205.81 with SMTP id d17mr3064729edj.269.1522420005940; Fri, 30 Mar 2018 07:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420005; cv=none; d=google.com; s=arc-20160816; b=cW5yFLK1R1q9U54Y44HYQe2YkT8QMvGYsT7pG2RQtcotn0n+CJ/I98jKd91XfS88kU 8QCmfP7QPZGwGE7Jj2IbwHDa6lOmVML3WjNgEJpuZedSyI1/Noer8eeLDRrDY33ehb9o eh1hjN8rJHEOuqVdfNE0MIww7uHvvw1DJ44M0wejjHQUzomoVKWr+NaW3Mh2s9cBjfmA whGfwgvUNl/sdAZzCLa4LTwgqFr/Gz8alUWZm/aka8aOtWPcOJq6QkhSmnkuagLA3aRx NdIHMlUVPJjUwxX7tZxpdsYyqgrAC+3mAkW5Paj+wJp6zBTmXtiQSx5EjFoQzcc/qIbt /BTw== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=lIWU7+jLKjguIFuwxil4yZTvUVX02M2G8Ts7cjjORvU=; b=jXP/0O4FXGZZGFfYqK8lF/3Y91BmKH5rdwBxThe/9ZZNHCee+4dSFu3x2kQx67aPDL Nx877n4chiaWghknm/mMFbhxilXOFcWXGAzCHuPMwUwT3cNGpQ6n/ASuOFvsQtYXobDT Y8woyoJieC5CM7SfRjeAWOZ9nwHyKnOy0Fi9zWRVtS0+4c72+FQxqNoB4auDcU8tmHHd NBWlzQ/IHjzGSX5MV94YJyVXVhCBRhP2D/K3HnEUYZlBBgDWrcH7BCmFK8QQC/cdUHkq F3eQbKHRXp9HOPq58oux2qksgpippq2anwgzRxRkJx0NTm0wSd1G420hoJZKRgZ2WfiX yPzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZRLttA++; 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 d30si412819edd.423.2018.03.30.07.26.45; Fri, 30 Mar 2018 07:26:45 -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=ZRLttA++; 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 6F651C221BC; Fri, 30 Mar 2018 14:22: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=RCVD_IN_DNSWL_BLOCKED, 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 B9095C22243; Fri, 30 Mar 2018 14:19:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 78C29C22231; Fri, 30 Mar 2018 14:19:10 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 4B8FFC221EC for ; Fri, 30 Mar 2018 14:19:06 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id l9so15920503wmh.2 for ; Fri, 30 Mar 2018 07:19: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:in-reply-to:references; bh=EpSazI2cyU3J62no2kZ/2xgTnG7R52MMBJhJ7CO6zg0=; b=ZRLttA++fKd1FoAqzi66cb2uJgDLFJhRi1h8cS2nEd0fYZMDsj7/QoYGn9wMsHeMV+ O257OiWdc83LppnkXTbOua1Wvig9VX5j+p4BOKlsquTR1wfuo3hMOoTlKeKIs4qnjCWM RcjCgRu51pWq7ZgIFohAACe7WBtBgHgGpjWhI= 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=EpSazI2cyU3J62no2kZ/2xgTnG7R52MMBJhJ7CO6zg0=; b=n3bJJVK2I98BbcDczDb0/Ofd7bq/QSlEbLz0YooPS7Lid76M8QvkmaZMNr/maNjjCV GZluqoD6fXZXMG63DMTvX26HZ3hThaPIajKqsLmEpT6OIg7W2tOXuAMumEAANZ/GMzyQ DWH8EDsBcz8cwXpSXuaA1gmtjNMG4jrt9yG3cwHSsp60vBhx1NmkXPyGw5/UrvC1GSe0 dKibo1hFC6cGmImVc0jL1H+ENTRNeXCnuGe9g0jobZBhx8FrwVUDiSXaji6thnhKeFrE MoOMPAk0a9mINpcF8FDAdgy0ska1vwy1sVOAjCeQb15k7gBSGBTmz1Q80bFjuD7OjRhE TUCg== X-Gm-Message-State: AElRT7F1V7gEYEw8SCMBngBu/hHl27SiarBHc5lt7phlhr5Z/Y9kwF4g Kt1DFAXzxyO9UvxrKgwdJkjZKZ4fenE= X-Received: by 10.80.151.110 with SMTP id d43mr3137169edb.174.1522419545781; Fri, 30 Mar 2018 07:19:05 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.19.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:05 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:45 +0100 Message-Id: <1522419526-29494-18-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 17/18] warp7_secure: defconfig: Enable CMD_SETEXPR 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" setexpr allows us to do arithmetic for env variables - something that is both useful and required when doing HAB authentication without hard-coding HAB load addresses. Enable setexpr in the secure defconfig - it's not required for the unsecure version. Signed-off-by: Bryan O'Donoghue --- configs/warp7_secure_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig index 0d46aa7..3342f54 100644 --- a/configs/warp7_secure_defconfig +++ b/configs/warp7_secure_defconfig @@ -21,7 +21,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PART=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_SETEXPR=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y From patchwork Fri Mar 30 14:18:46 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: 132624 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3108761ljb; Fri, 30 Mar 2018 07:30:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+bS7Mb6hdUhsyjaYuzFPH+xrzVZw+bIFEtIzDoNMrG141kd5WM4EQn7ZTw5131tO2jDlS4 X-Received: by 10.80.174.142 with SMTP id e14mr3067827edd.201.1522420242498; Fri, 30 Mar 2018 07:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420242; cv=none; d=google.com; s=arc-20160816; b=uFHYB/g/TCkqZ1H/RS/oWUe3btXJnRJU4zg6QCfAj7X/IdWuSnhW846dWAO65PU5C0 Z/4DRVFTMiSmlKZL2u3KbfNVT2sFTa2rqn98U68ULhpkDlNPSmOajQWxboJS1J9B+cW6 LGZLS2y4BpKgiWKAnNmLsfL4TlfHr2RYvNSvPQ1+cCKJmdd2TlBL6KRHL6cdxzO3z6V7 A9gSMrvIeb43q1iMlglmbMiz644xPrcIs5LlT4VgRRJpx7qAfBNpBwIuLi169by/JclS YahLggksIsYJuNopFhIIJFvKvcX64pnhb7Qf1fRQxhGvRiXHHyqa2AABiWnrR+uUi3Y5 jJLQ== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=yq8LevhByx6YL3EOaDSV41khlVAN1w0Egcou+fPW66A=; b=zDZadPiKuHL0Vh/YlSQyHx3Oo0zw7zJkA4ieEgfZyZcEei0FJf0CLhat5TllTRrxLp MWVxBy7Bzi0XoWoq5FdUDmhD0+NDbRa0/miVWGdF4+v2Hk1vREQjZc1EdffYyHag1wik lckwXzBHcLdiDDwWAy2/0n/evq8JmH/dX5I2LM8D1LCDx9oHx8oyCvFrEEvrmClIrdK8 tOxjKZBZpxk4OLMowvLegveHO0vnFSM30v4Le/NdHHAm2CdwVCwK+hdd1Nllqbz+KLSI Cvsv2I0uKqmskFNTeIkcUthLWEebhcjLC1Iqqz/UW8b8WAtBb5NyjtqTf73VUHupDmLS +jEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ezAjqBOn; 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 b6si481116edq.6.2018.03.30.07.30.42; Fri, 30 Mar 2018 07:30:42 -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=ezAjqBOn; 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 182EBC22248; Fri, 30 Mar 2018 14:23:37 +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_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 BF0D7C22238; Fri, 30 Mar 2018 14:20:26 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B1470C221BF; Fri, 30 Mar 2018 14:19:11 +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 3B0FCC22246 for ; Fri, 30 Mar 2018 14:19:07 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id x82so16985373wmg.1 for ; Fri, 30 Mar 2018 07:19:07 -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=OcYpZhWBL+tryaHLwBELFdeYvYsloMue1CwgtV6HeNo=; b=ezAjqBOnuTCVs6w0H5CxomJYXC6j4lNHVS+RNKoWN2/juz27W3HEE8L2w+MC90C1JE QrlTQ30LeXjAWozY8YlKkaQ4loBuGQX489iIgrukwoQrOHf90rANH4SRlt8gdof9K1Gq WGgQBRiDSn/dsnVkS6agwGQpKfalB3eTccKeo= 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=OcYpZhWBL+tryaHLwBELFdeYvYsloMue1CwgtV6HeNo=; b=jnR1DUq5QgIVl32oXEO/uKQSxR4hI40bwOh6WwFPVPwYFmdiWUfgFXcoSlL7ZmANh9 g+3gsPsS/ynl4Ou31A1O+RqAWPtG+Z7h9PLP5OBg2ZS9c9FbTFnBAkb5LBaosDKhV0Nj 8SvunG1oX6RRUJbem4pVAfkvR/3v5QZ8u8Jli1lpBfKBbAXaaBne4AO1SC5mXrj33Thc xF1aC1IOz91q4wpTqO9Jt3821XdE1T7lXxJtzpEUKf6O6ht13KhfwJX+Dgbhkddn2xTX Xxe4d9UeOHJZoR5w8LR2SOBHViGuiVYMmaqTQ9mUdGQ9tbt/69SoTdpwWc9nDGu8Z101 PSDQ== X-Gm-Message-State: AElRT7EP6OkxVSih4+2c3leIpWJxjQb3BbsZUFDwj272E8Z5PxvTCKJJ So2CIAwhOmmnDvMTPuJFfenlYsQdXx0= X-Received: by 10.80.164.182 with SMTP id w51mr3137965edb.152.1522419546747; Fri, 30 Mar 2018 07:19:06 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.19.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:06 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:46 +0100 Message-Id: <1522419526-29494-19-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 18/18] warp7: Add support for automated secure boot.scr verification 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 adds support for verifying a signed boot.scr. With this in place it's possible for run-time Linux to update boot.scr to set different variables such as switching between different boot partitions, pointing to different kernels etc and for u-boot to verify these changes via the HAB prior to executing the commands contained in boot.scr. Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index adf25ac..2a2d431 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -54,6 +54,14 @@ "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadcmd=fatload\0" \ + "do_bootscript_hab=" \ + "if test ${hab_enabled} -eq 1; then " \ + "setexpr hab_ivt_addr ${loadaddr} - ${ivt_offset}; " \ + "setenv script ${script_signed}; " \ + "${loadcmd} mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; " \ + "run warp7_auth_or_fail; " \ + "run bootscript; "\ + "fi;\0" \ "loadbootscript=" \ "${loadcmd} mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ @@ -80,6 +88,7 @@ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev};" \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "run do_bootscript_hab;" \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \