From patchwork Fri Apr 13 15:31:05 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: 897984 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="UGGo6qQw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N1x813nRz9s15 for ; Sat, 14 Apr 2018 01:32:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B723AC21E73; Fri, 13 Apr 2018 15:31:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B9047C21DEC; Fri, 13 Apr 2018 15:31:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 89FDAC21C2F; Fri, 13 Apr 2018 15:31:25 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 2A7F1C21C38 for ; Fri, 13 Apr 2018 15:31:25 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id y7so9150860wrh.10 for ; Fri, 13 Apr 2018 08:31:25 -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=UGGo6qQw9Xs9ezSaaihDumk2CfEOspuADg0qeEHohW9WKQ7JtET023nWSXTL/JB4GS sLqwOxflB1e6GnGmGHmW/KK8M57BWgl6dyZiVzSYiEJCAP7MS4LEo/6P+odWLrATDSYH 7E6V/EM2e6gpiwNeH06fPbFANJESG1XxLpgXs= 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=MwbtIz3JVfhuCMjND6RNZOquCjE6g1P+sba7KOJZz6KeCZjm2SpD249ceIrOOpWwzD cFWmDFhRCw+hjN5xlAeUFdduos4BXi1dO0M4of1GOy2FB3KI/a7HHGzUT3uVcS7TfyB+ YTCVTpnRXKYnOxSyi4/UgVMAFppGvCUYb8LY9LQi9g9dqyiP6NOBWfZap+WtUq/g/nHl OHP3DgZHSPF7RzmDsRPI7NP/2zkhRGSs2JttTuLGxlu5OipkRwLWOSJceYCfQSSmd/Aw WIz727TZuzNKUH3jltWORf8YDZeKnCWFZtssuK3J4ZWL61l8/Mchln7Fr1SkI3TuPwJS cQjg== X-Gm-Message-State: ALQs6tApcKF3TkRBRZJPARKJ9w4qPZ9Lbl9gTn9YtQ9gfO+isCXSPncn gtYZCNPSwQDlZPNMcGa5TLl/g8KEYRM= X-Google-Smtp-Source: AIpwx4+uFma4EVrKv4TBYFuqaLIDZikt2C4+UV2H4McaiHYJgDDxpKFpU17PnnJtnA/EZlO4jx/omA== X-Received: by 10.80.211.3 with SMTP id g3mr20685782edh.15.1523633484648; Fri, 13 Apr 2018 08:31:24 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:24 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:05 +0100 Message-Id: <1523633481-20914-2-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, Utkarsh Gupta , rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 01/17] 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 Apr 13 15:31:06 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: 897993 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kkoXpsdS"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N2564Z52z9s16 for ; Sat, 14 Apr 2018 01:39:22 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 50847C21DFA; Fri, 13 Apr 2018 15:34:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8F092C21DEC; Fri, 13 Apr 2018 15:32:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AF40DC21E2B; Fri, 13 Apr 2018 15:31:30 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 4F40AC21D8E for ; Fri, 13 Apr 2018 15:31:26 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id l49so9163591wrl.4 for ; Fri, 13 Apr 2018 08:31:26 -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=kkoXpsdS4B50gFLbUXHk3j39iG1VI4P4cZdsrkx1Ifw7pA46ZDTMfpVVZ8U9XEEuw0 E2ZjMIEa43XL2/j2GXDsMMmAG41XViOcF2RqCzC61noWYsihP1S27Dg0O4+80IflspAH 8WXygZwBUrMV4qXfZRZ99U9/88jEdZJUpzTUo= 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=DLxwWhK6sMtkMpS/rCI7IcQy6QxztCk4E0Lm9c39hySPzqg+n8t9FUmSabtyNyv2wT ADqliIgGT7kHHt2me9+2uhI9Y/UfAKLk8AvBqnRUzl5911ceOTVK261tfyoEtoRbeLOc 5BW0l4IFQPSEBzFl/UIQqrvLK0YfkOgeP4WzY4I9FKnsuSvPSbIZqFA7hRG657qqqfPv snMI/VOeTYCL6XGq9Ndvs6yUC1vknAktv9ZyLr98hyudWlwBWMKLFTIJTQDRAZd5Gut8 O//DbN10hOxgYZ5HL2SwGTPscSwPy+4UPGAOAhAviBeBK3lxtU6ykecoJ8LG1zDgM6d5 YGhQ== X-Gm-Message-State: ALQs6tCZ2Bm242d7kk+TOjXfe328ypWDDG3tia50Jxt/vYYyhq7SWJB7 EnPQvmUbS+cwXv7g+2SLIwuvViFuK/Y= X-Google-Smtp-Source: AIpwx49aZG46FXnGbKsqELTZ1iy3lsnbYaXz/fDH3Ix2ISLzelKSo+5tSfTVmWrYMVuRy5W7GQ2/cQ== X-Received: by 10.80.148.97 with SMTP id q30mr20968279eda.70.1523633485807; Fri, 13 Apr 2018 08:31:25 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:25 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:06 +0100 Message-Id: <1523633481-20914-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 02/17] 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 Apr 13 15:31:07 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: 897985 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="bVNZcJoD"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N21n68lQz9s16 for ; Sat, 14 Apr 2018 01:36:29 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7D787C21D9A; Fri, 13 Apr 2018 15:33: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_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AB5A9C21D8E; Fri, 13 Apr 2018 15:31:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F10DCC21C2F; Fri, 13 Apr 2018 15:31:32 +0000 (UTC) Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by lists.denx.de (Postfix) with ESMTPS id 57FB2C21DB6 for ; Fri, 13 Apr 2018 15:31:27 +0000 (UTC) Received: by mail-wr0-f176.google.com with SMTP id d1so9151443wrj.13 for ; Fri, 13 Apr 2018 08:31:27 -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=h6EqZiKNRXZebAavX1JfxB4zDl1X1AgKjbKEYNfKeEM=; b=bVNZcJoDl63ZPsc8hbCU9ZJRB+7P6dHDilRSElQO2X0fVjLDyF11HeGdcYH6QKXN+i lc4J1ukFtnHrS1JBbDadCWeulrKSaE0v8nnD+ucaS8KJSHmw1RzkLHydkkjRub7Nv+ij 3vWvBX9r6YqkcEc5uIr4W2Xms67zOdLUTldpw= 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=h6EqZiKNRXZebAavX1JfxB4zDl1X1AgKjbKEYNfKeEM=; b=KlhjpsMR9klOw/wMFUjP+AHqHiDoL1BCD0wkpwXQEGEmnkOlpGLHAYAMDbat9rQjpJ prnaaCSl4+swGcB++iqeIMM4l0e6PR7OKX49m7f5gB7cgUU8MquBl/9ozylFyuqHQ1Io zWTOFiDFBdLrgTj9b7fgim/Zxfmu/1ymtRA+2WIDya5laaCE2K0HldcwVJksDUOitCLD MDO2vh4L6Upi8n5vteLv+EhlPYTZREa4lli9M8lSGMEpCgrrrKIcAthBfxsI5DaY+N1x sMvOMfudEASggjydKXuxCqeVr+PG6qNQAHSPTGcOu0uu6f3O+dfUHkk8lznNmYC/cBb1 9EtA== X-Gm-Message-State: ALQs6tCR9HTuVq7TtD2DgGMSP4V2NsK+maGMKPqRuqv0w3RmbKnbVzL7 8zq9voLkjzs944cGARMh1MApyfgUZa4= X-Google-Smtp-Source: AIpwx4+kbM4df1Uhk1x2ZflmtkAHI51Bo37ldZZZ0TI0iZA2aC4mM146ePJLO3SEc7/eSmivJEm0kA== X-Received: by 10.80.201.129 with SMTP id w1mr20714167edh.224.1523633486837; Fri, 13 Apr 2018 08:31:26 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:26 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:07 +0100 Message-Id: <1523633481-20914-4-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 03/17] 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 98fedb8..10db716 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 Apr 13 15:31:08 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: 897986 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="BT7BN1Ip"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N22d0sG6z9s16 for ; Sat, 14 Apr 2018 01:37:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D21C1C21E0B; Fri, 13 Apr 2018 15:32: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_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id F1BC7C21DCA; Fri, 13 Apr 2018 15:31:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A6798C21DC1; Fri, 13 Apr 2018 15:31:33 +0000 (UTC) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by lists.denx.de (Postfix) with ESMTPS id 67C04C21DA6 for ; Fri, 13 Apr 2018 15:31:28 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id o3so9178508wri.2 for ; Fri, 13 Apr 2018 08:31:28 -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=C0sny3vVK9FUbANb2k3ag+BlDBiGPUikaYJuZ1wtGC8=; b=BT7BN1IpACQU14Od2JGY481Ljzp3brOk5kk5ff9vk1fBgUR7BMcEFdt+aiU0GuZ/Rx qqit+FfF2dotVyZLX7F/wkj39AN31Feun0fxg9cnpg4aKEoAEQvy0OOV88ACK8hcFj3z 2s1mIQVk0vOA/1zUl390By2nK1uRNTJY1O1SM= 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=C0sny3vVK9FUbANb2k3ag+BlDBiGPUikaYJuZ1wtGC8=; b=YAYyUJtQBMSOqD7MuNvo1aRWsqyjf4i6anfDNqsUyLOlgv9GkeW6ikVbhEa/wn83su 7kVSeNOQSeXWDegwO4ngElx7mxaCNRoyRsaUhwcwiBwOhn1LdeILd9rsAraQbXYpm6uP HPcn92Z484y+b+p0F4Lp6KvJhTyaK+6KwozDpGRDAj5FcotAy5dYCswQ8c/ybMSxR2Of 2QzngnicPIXo1Bu0mrkWCK2Bl/FI2ioo5rSfyyXd9sv8CSUCAhlDFWpbDtcLQPkO9ltr NQyQzAeAJmbqKYLoR4OgNnvDrbgQohv1k7MPxikHX0sM5sS8JZnMiqdh09pCgPbOIEpE Z6hQ== X-Gm-Message-State: ALQs6tDaqfhz/GkaTjexRjES/tF0HfaOZHw13i5MqzHx/SSbhOCw/O3E /V9OMMzl/Qsx6M8TUTxRjWUYdt4T9OE= X-Google-Smtp-Source: AIpwx483z/y+05732q97Ki3qxclWG1HpJkSq3aY/mySYBrLaDI2nCK4XeHkQefXLcZgbDFh9QPIFpg== X-Received: by 10.80.210.212 with SMTP id q20mr21339889edg.165.1523633487920; Fri, 13 Apr 2018 08:31:27 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:27 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:08 +0100 Message-Id: <1523633481-20914-5-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 04/17] 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_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index d720bac..3dbcd69 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -44,3 +44,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 Apr 13 15:31:09 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: 897998 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ho8Ej9lN"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N26n39xXz9s21 for ; Sat, 14 Apr 2018 01:40:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 242F8C21E15; Fri, 13 Apr 2018 15:33: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, 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 C0CC7C21E2F; Fri, 13 Apr 2018 15:31:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CB96FC21E2B; Fri, 13 Apr 2018 15:31:34 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by lists.denx.de (Postfix) with ESMTPS id AD052C21DD9 for ; Fri, 13 Apr 2018 15:31:29 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id d19so9176874wre.1 for ; Fri, 13 Apr 2018 08:31:29 -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=ho8Ej9lNdIv5EbZbNsNTzyIe0ic/ObRCBUdJBJFfzKB1xUo6zej84Mv/nQTlUKQq7+ g7UZ+rbHyrxbnlgMp4iUvob2kFEWsi6XradPhI68yo8iqJ5OAHA3nA/uHXlwzKDMm+Fe x7eB2SF3FG2zUP0qyb/5H8dXyD6ODRa5Dt9YQ= 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=BtWY35MqZz86Cs2v+CPglwVahLH19o356zH2VS4KlRosXddiQ5T6n4r1Fx55nCCF43 S1loA5hXcCM8gTZIfoXpR7S7SoYDFEOfJ8yMcxyqtDspeLFjTb+NPUAbUMBMetJMAcxT KovqjJccdbu2GVq9syfBFsCZy+s71cBBGtu39NkRoVrS5r2AmBtgPtVKUFwGsW3O0919 QkJF2lBmj3Y7VdXkMAMTjxVsl+eV5u4kh7CUBXlE60MuC6gf9CK4ZOSkV7HKfItNL2Jk oUlkjqE3KLYh4K9nfD6HpM+GH31R3b9TAPAWl3sBnGzBww9yggVVEdXsjSZLG6YBdB/a ZdNQ== X-Gm-Message-State: ALQs6tDjE4akIGNvqcPwDDew7kTUwpqRKTMn5TY/R1ZM1A1Sn1ycbO3j Lusr/sOsF5yDWT8z0V+HUyC4CYNN0OA= X-Google-Smtp-Source: AIpwx48IyO21/BDAuhLhPl5AyWzsY1QpyOQmjjDppKkKxf+QSb6wPXjtUMgG9G4i6vaZdd5kyCSb3A== X-Received: by 10.80.169.117 with SMTP id m50mr20704813edc.242.1523633489200; Fri, 13 Apr 2018 08:31:29 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:28 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:09 +0100 Message-Id: <1523633481-20914-6-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 05/17] 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 Apr 13 15:31:10 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: 897996 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="bulD5IQL"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N2662G9hz9s16 for ; Sat, 14 Apr 2018 01:40:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F2FB7C21DF8; Fri, 13 Apr 2018 15:33:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2512CC21E2B; Fri, 13 Apr 2018 15:32:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 01ECCC21E08; Fri, 13 Apr 2018 15:31:35 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id CE79FC21D8E for ; Fri, 13 Apr 2018 15:31:30 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id f7so2252390wrh.6 for ; Fri, 13 Apr 2018 08:31:30 -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=bulD5IQLQYi6wMXCyx54DxGeWNEltk5+e/LVf8/i3Wo/qzSJRGwPAJALRZKs0QV5Ai VqFVSqKd2yXWN9JnXZMcXvYvnfbShqkjrZnrQGfdz3Wo6FHkR1HCU+QvTkw5M8Ys0hI3 nv4EYn1em+vhyPVTUg+wgnvrVgmJgzPaIPpUE= 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=dh8JolfFomawc9FbLQM4/qDYmBVJgSrYTXoredLFw2BYn0O8egluM5kwv47xYrW844 aBwD7OBse1YgWJ2Eazt2dE4XHpn/flaOoHOO0/x22l5NNPCezRwoEXo7Ev+HfvoIPi/C +n9zeF7Cr8qJFUs8WKw5GeDs/JKRE+hiDJtRI1Xo6aFNsIoudLlQwOwFdrBWPIZ4r9lK C5ykAeBD4KS9lzrdKTqJ9c2qrB2SmiPahS6FjRydoFoDF0K3NVR4UnpFRYUmZVzAT79h Be+rvdeCBT9bWx7R8P8Rb+PnQuh04m7Tpw1M4P3PlSz9Y5jjI2zUgrW9yG/RA/Gb2aoA 2dtQ== X-Gm-Message-State: ALQs6tDN1IwCRGWGd5Ysz42XlP87ePWRtNudsJzdetaplClc941miSJg qWDd6j1+a2x5syQRZlIIH25yZYmMa8Y= X-Google-Smtp-Source: AIpwx4/27JG0du65wJQVfzjlc2U47L6R9gzQumkC8xQ5gpGIGpFUVJS1U1ZosxOxQAi964xgz9kuMA== X-Received: by 10.80.230.19 with SMTP id y19mr20361506edm.160.1523633490325; Fri, 13 Apr 2018 08:31:30 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:29 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:10 +0100 Message-Id: <1523633481-20914-7-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 06/17] 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 Apr 13 15:31:11 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: 897994 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kfUfA8sr"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N25j1tpjz9s16 for ; Sat, 14 Apr 2018 01:39:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E5099C21D72; Fri, 13 Apr 2018 15:33: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_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E302EC21E2C; Fri, 13 Apr 2018 15:31:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 42BD2C21DAF; Fri, 13 Apr 2018 15:31:36 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 0069AC21DCA for ; Fri, 13 Apr 2018 15:31:32 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id l13so8123332wrb.5 for ; Fri, 13 Apr 2018 08:31:31 -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=lmGswfnO4JBLqVcYz/fMo3k/jRcv8rEN3ZTfeotYkRY=; b=kfUfA8srMAE/3KqDVcsh9MJhfBjR5kXrVVXiNJOlVwxVfQp1JRjx4MCZ33m1CPPJB/ GI+VDTkfVn1TkJwDIT1Wv2xp4C3Yr/03eyJPUhwrKf8L6MOhAM12yRbNGw1KaqPyR2b+ NiDrGx+/nQXSnxVM0Vrir4U04M0BGfxRlsgGg= 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=lmGswfnO4JBLqVcYz/fMo3k/jRcv8rEN3ZTfeotYkRY=; b=Qgyhy3WMIOqg+avLdB2s/pcRjGGjuhJXGvu7G3vd3xawf04l61UDt0p/XnOsamyd9S /BGIceEmp/ozV04I55bXYxP3nuWcYyqF1C/zGxwWTu65h+yVYH4mH6OYCKiW8RHEGobP xBfbEZE/yNsTNjt4qxP/HCW+jXgSZN4NMjTEXK7ndOBMHIEzopd6XuLl4dxl9IhDuCrl 09+BIHjr0WXXXIhr0mJQ8gg/MFyR4rgnqyfJuy0RiPcIypH4g/oahqA2lwoLqFtcbW3S mA4XW355lhmxntfAuzo+iSvMLkieNwgl7BQlHQlQs56oy41dZxlfvRa//H26ZWtm3GJQ tZ6w== X-Gm-Message-State: ALQs6tAcGREjDF33UbitPEodpiBZh0zojARX2nuYk2QiCWQ+Gi0Zq65C UU7nZe+dRMaUQBYlp7RVH0jYiXB0xTE= X-Google-Smtp-Source: AIpwx4/xSt9JGHDGBU/jTW5IwNWc6PGkJ6Wrw19Ou3jxA0j1KeO1aih5q2mGcboDhSulJbfLVATbPQ== X-Received: by 10.80.174.177 with SMTP id e46mr21209211edd.61.1523633491446; Fri, 13 Apr 2018 08:31:31 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:30 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:11 +0100 Message-Id: <1523633481-20914-8-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 07/17] 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_defconfig | 1 + include/configs/warp7.h | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 3dbcd69..c647cd0 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -45,3 +45,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 10db716..e12b90b 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 Apr 13 15:31:12 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: 897987 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="M92yK52r"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N23H5Rfkz9s16 for ; Sat, 14 Apr 2018 01:37:47 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6D3ADC21D83; Fri, 13 Apr 2018 15:32:47 +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_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 507ECC21E13; Fri, 13 Apr 2018 15:31:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6EDB4C21E0B; Fri, 13 Apr 2018 15:31:37 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by lists.denx.de (Postfix) with ESMTPS id F0C22C21DC1 for ; Fri, 13 Apr 2018 15:31:32 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id z73so9173690wrb.0 for ; Fri, 13 Apr 2018 08:31:32 -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=VSGD7e4ky5DKmlDTuYNRjPCMufmihoax4/YMwg9zaPM=; b=M92yK52rInQW6MNYZgN3Wor89XVmXQDkXUHoQ43PKakJxGZbmthG9pCbSXq5OiluvL vBLSgDCqOQkUxWHCccbaS72iRcmCLRVDKL61vxlrLWQSnG1FDfcXIHVnSI29QOPjoavj Jdrwsu5QX9lXfON7ynevEPV0NEd2Ch8f9koQ4= 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=VSGD7e4ky5DKmlDTuYNRjPCMufmihoax4/YMwg9zaPM=; b=l5wIXvQ8M/7SAzDQ4laS7Z9k0qWkPMeVbX3LUkSZ1I+ozofVsYj+W5+pPrbXulcf6Y b4r2DyKv4sSQPIb7ubyYnSkGfm9arJfIl3EmYxS17KOv4/Nbvy3r29pllqQFtx4s9kta 7T6zc3kdd+U7HwLQbVnYwa5v80DYy1FjKUTX+0iz1dQptBAXB+mHCg9dtcfrTKQI/rbA PXW+XtN/vm/Z8QnAa7WI4K+pDfLnBcL+NMcSNikIfgVRPo5elOUJae6Ed8YBkOOEAO8f 2FOZc1mzsB/5leAI9UmR48JuzaK8SsSo8S5Am/K4c/ufR7f9vOBh6Q+8j+Uxpl2bzj/k DbHw== X-Gm-Message-State: ALQs6tAAhsZlEaEN+dBMA2AABL9YNeEQFp34JNXahQrupyZWp+tyD/QM t5aN9SX9CUWH6z8Jq0C/ba+MjWma9pA= X-Google-Smtp-Source: AIpwx48/TFHJfS8hv7HKw2F++wta4h0KU2Y0QvBfVGi8Um4Z36KFsG9GyJ9LqGaz9zMWwFANVhbIAA== X-Received: by 10.80.177.25 with SMTP id k25mr3447308edd.217.1523633492479; Fri, 13 Apr 2018 08:31:32 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:31 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:12 +0100 Message-Id: <1523633481-20914-9-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 08/17] 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_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index c647cd0..efb6f51 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_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 Apr 13 15:31:13 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: 897992 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XkW1Czkl"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N25161jFz9s16 for ; Sat, 14 Apr 2018 01:39:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 86559C21E02; Fri, 13 Apr 2018 15:32:31 +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, 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 27255C21E02; Fri, 13 Apr 2018 15:31:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 16013C21DB6; Fri, 13 Apr 2018 15:31:38 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by lists.denx.de (Postfix) with ESMTPS id 11E87C21DE8 for ; Fri, 13 Apr 2018 15:31:34 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id y7so9151946wrh.10 for ; Fri, 13 Apr 2018 08:31:34 -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=+nwn5lRaFWst3UwOtqR/ryFHXvSyVue8HZITpt8D1UE=; b=XkW1Czkl59AJMbweORt45uD4zItRJKhNa++FnJ/hnAzgo583IZtu0ppZhYJd2V6wxy wu7YGnOTZxec1IWUAQk7Ra5tdDBAiy1/FVdauV6UPHRmfRU0viFf6Y+fsnpFRnktPEij bJQjrOB45rtsRf9sHsKo8fp9fTJD19OoktIqE= 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=+nwn5lRaFWst3UwOtqR/ryFHXvSyVue8HZITpt8D1UE=; b=teqQXxQ4R9ML7NYAkfhYauUYxWo6GvQvZ+/lc+YDlRpN1/uPv5GBtZ3b/tYDb1ORe/ TzrsXx4501ukFbJvpCyhzEBsqXObKcqdz77mLnhXrEonhjv/kGZ5Rw0OSPhbmjw7xsUq vJ5P6fv4gwb0gLSgCn3tOm1J4bSrc2pKsCgVetr7lKkl4V/HVZLaT91194Ps8cC2WK9w nt65hqVfuwnOVU3PV/Sj9LN7DF0nfSR6+5JmujvySE1a7tYnw3mqpsXbzH0L4GOrVD/t 058fDL3yhv3hFz7IqyfvxA/d78d4K1naBKvR/rdYTrFz2F8WwUDd3mqBl3WAYplhTL4V 7YvA== X-Gm-Message-State: ALQs6tBKiKuZlLSPQbbuWYNLq27lZ6YbOCIAlHYDoiH5NITQc+kuhCh2 fWATyuXb6fp8UUIEC4tg98Als+IprJU= X-Google-Smtp-Source: AIpwx4/LCd31N9uMHxYhmrE9S4vJanHV+o6T0JgzM1JIHCnUE7AA78qXurB1/kW2hEUQhM6qwrAeeA== X-Received: by 10.80.145.219 with SMTP id h27mr21269732eda.3.1523633493509; Fri, 13 Apr 2018 08:31:33 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:32 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:13 +0100 Message-Id: <1523633481-20914-10-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 09/17] 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_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index efb6f51..d5dc009 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -47,3 +47,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 Apr 13 15:31:14 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: 898000 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="fThyW1UA"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N2BK3vG8z9s16 for ; Sat, 14 Apr 2018 01:43:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 46462C21C38; Fri, 13 Apr 2018 15:35:34 +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, 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 2B7E1C21E16; Fri, 13 Apr 2018 15:32:26 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1A2B0C21DF9; Fri, 13 Apr 2018 15:31:39 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by lists.denx.de (Postfix) with ESMTPS id 2742FC21DD3 for ; Fri, 13 Apr 2018 15:31:35 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id v60so5264017wrc.7 for ; Fri, 13 Apr 2018 08:31:35 -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=jEJ2K86Wbbdpj7z+Xd0250Q+apqTUT7spA9kXplFwfQ=; b=fThyW1UAAI00Fh+QNZQ/xJUIu4DVDl6hQPtuGJmbZBORG4vDZWF3f70t1GSeDnfxEC SOnSILfFHgesramGYAW4XNVJDZEUDRx1EJvszu+N3YjQ64hgjwjjCfXknIRICXDrWGOm T5d8NhfckgNXKkqg38Uyz8fPLWrqGLpoj2a1I= 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=jEJ2K86Wbbdpj7z+Xd0250Q+apqTUT7spA9kXplFwfQ=; b=ub0M5ToLrolSIGD/FD3TIXEUVcUp/qccKLj0+Rd2Gla6Xi0rM/5rvjtJbOrgGhFTGo 2SVdCDBpVSXWs/bMTPC2FpBx3wZoj6W6amA3OtxHLv5wszQzOxR2w8YyUXqQs9TkWdpO L1xT0l2rSGNMwkroxqqB40VsN0gECcLYlD7p96QYYNFEnlNaMLF+uwMdr70QyIb4y015 LLe5qhS9lLViw4Qjx3qp/XJWVmcq3sw0YspgRT8ZAs2vFOlmuiXI0YJMAHv6Sjhe73W1 YbT5phUy8Y05Ilcywac7mefnubbC0k5LOwEjra1xGmO2EwgOQUfyAqUWUbKCYT4RHbUA iEDw== X-Gm-Message-State: ALQs6tDTk+lLEk1RrdRonB4kpO7g2s5eub3ZNS+f2VlZCo1HwDSWrUKW OAJ6P/Cz4+8hoo8m6G1/GQVtCTAHvbs= X-Google-Smtp-Source: AIpwx49zFKI6wuHiWb98l3VpaX6NnDqExErBuiMkhr0kyVa3HZlce+QyV3cNTyVT8gv/1WWfkDVRzg== X-Received: by 10.80.222.9 with SMTP id z9mr21020298edk.245.1523633494583; Fri, 13 Apr 2018 08:31:34 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:34 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:14 +0100 Message-Id: <1523633481-20914-11-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 10/17] 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 e12b90b..344042c 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 Apr 13 15:31:15 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: 897990 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XynCCBG1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N24m0BLmz9s1R for ; Sat, 14 Apr 2018 01:39:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C0942C21DEC; Fri, 13 Apr 2018 15:34: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_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 44D98C21E4E; Fri, 13 Apr 2018 15:32:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D9411C21E4F; Fri, 13 Apr 2018 15:31:40 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 2B417C21DB6 for ; Fri, 13 Apr 2018 15:31:36 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id l49so9164964wrl.4 for ; Fri, 13 Apr 2018 08:31:36 -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=/2tvjMqvheFPaxDToxnSUfvJvW4njbPu/uUoO+4TLH8=; b=XynCCBG1LmERflGqweIF3d6ckD8s1wT172+48/+Ug1vvp79FlAlTSvNFSDZfLbHpZ5 uCw3yuBIF9HXUeISSR51x4EQslpDuHjsSKwOWaBAZ5fvSBkujKdodd6qjfA4zVqSJiGf DIJ9GFQR0kRINyoXkre9vGl1rTPIAGzSVMhEE= 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=/2tvjMqvheFPaxDToxnSUfvJvW4njbPu/uUoO+4TLH8=; b=dT3hxyvO5WX/YlH2VuEUfyzPD+cjq9+W4qsnDOTFmwA1tvGrBKjxoSKUpgnSzbZUoW 1nRRID4WG/9a4geFwmm8SbBlptc+FNZt++lHGGpvHsDOO/MqjQz4RxpnGfgQdputAbOJ mPBo66oaaV9QpfLeU9odft3LPQhEc7s9gB4Cm3uA9vew4eCMi/BXfPXUUQNVZKwMXIi0 ZVAMPKDKSW2ULMxJ99SueyImRbTt/c3gtPHIV4wIm9bu0xCCULqP68zg1+gVWo4XbhNc SiZ09AozkhKbIIkMI0URzFiRZhkaRHA7u+8DqpQWfSs2w5+33wFPxaTdPOdcjvA3LT7r yf9w== X-Gm-Message-State: ALQs6tAnHMeurw0a49EsORjqc/Ac3/lwa4FGz9R8C3jIjhSjmrUP3N4K J9K1YlUuDH0rF29QJb4xpNNUHDUwMKs= X-Google-Smtp-Source: AIpwx4+fdVRq44S2OAC5tys1cD5yT0++B1/gYo7mOQ8bBus0XTqvruq3PWM5tUVDSD5dOEFtoOpxhQ== X-Received: by 10.80.215.19 with SMTP id t19mr21253658edi.85.1523633495642; Fri, 13 Apr 2018 08:31:35 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:35 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:15 +0100 Message-Id: <1523633481-20914-12-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 11/17] 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 #2. 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 Apr 13 15:31:16 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: 897989 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="HRo4g0Lr"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N24S1Pn2z9s16 for ; Sat, 14 Apr 2018 01:38:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C3FD9C21DB5; Fri, 13 Apr 2018 15:35:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CED73C21E73; Fri, 13 Apr 2018 15:32:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 33869C21E02; Fri, 13 Apr 2018 15:31:41 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 38EFDC21D74 for ; Fri, 13 Apr 2018 15:31:37 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id u46so9164516wrc.11 for ; Fri, 13 Apr 2018 08:31:37 -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=KgrE6YnsKs+4xDftmSHKc3zTTtDMLVB3jc+2BUJ5WCU=; b=HRo4g0LrkkRbV7J5iWXVI8J4CziPa7hitCsaQaUlNrnFH3oS7f77oApR38PQl2G6DU 1rQ4y2WsKGDY6w5rWBeiGVaihja4QmyYJuJCdxWebZ4MvzojYEKU9JAtE+2LNh87EQo3 9e/hKdK8Me0bSjBwLJi0fe0WMbmpBUk1hv4y0= 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=KgrE6YnsKs+4xDftmSHKc3zTTtDMLVB3jc+2BUJ5WCU=; b=FIeNOXxaKfdxW3BQHSMSFAcvPNoYa+0zQTxEtt4nh74MnxXPAcJ8fA2fqV36j+oiZB /EBt10McGPL5O9Wo2ib9rw4Ib5j9K+Ry2dfagUy0BIhO2b/NCZwnuXJIzdamoNPFOJ9g XtKP1zKxhXY/1h5Y6yoZ/S6/rZk/M2w2ZaVh4e4vt1b4mT1oEIRU+Nqyi/MN890mxni4 EW9s1SM7k2Q24iyvNUiUfylHdAWyw49YE3fOZ+rDL8Fdaeqzl+MRe67IHjHM8ybrPRZg XGYDpeofVw1JNyCyXJ12KwMbOORxSFd9xHYOt5rYHj+VqtUCfOWvXaX/XdHr/ycQ8oAS klRQ== X-Gm-Message-State: ALQs6tBiT/9Swle3kFF9vMKpkdsEtSJMsUzzxgh1Ri4tqb3koVHVc7o5 q/WQTxarDDhiPY/G+3Xmgvk+YaJnzoA= X-Google-Smtp-Source: AIpwx49jRYhEZtKV6H5StSaXVxMyH6fEaCCws9yimbRUU2w8il8Ym2kPKR5bq3CopLJBzIyD025Rzw== X-Received: by 10.80.165.28 with SMTP id y28mr21032224edb.105.1523633496694; Fri, 13 Apr 2018 08:31:36 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:36 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:16 +0100 Message-Id: <1523633481-20914-13-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 12/17] 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 344042c..54b3b31 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 Apr 13 15:31:17 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: 898001 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="fFg2tb8i"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N2BM6zs6z9s16 for ; Sat, 14 Apr 2018 01:43:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A1906C21E08; Fri, 13 Apr 2018 15:36:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 68365C21DA2; Fri, 13 Apr 2018 15:32:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A85D2C21DA2; Fri, 13 Apr 2018 15:31:42 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 3AE73C21DF9 for ; Fri, 13 Apr 2018 15:31:38 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id s18so9178784wrg.9 for ; Fri, 13 Apr 2018 08:31:38 -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=I8ilgkoGvjpGEZgG/JpqUFbj6BMprlamKSA/Wtdwwuc=; b=fFg2tb8ih8tvM8r+zfAbr+ZjiKKpgZpXP8wBs0dGkmQv5h9nMP+vjhd9N8Bfihd6LG OXm8H3P3ikPTOuDH+tzNP2D/pICePKQeH7T58Rf832AZBf95ImdHrvZ6Ur+JUWFgpNGl gVDaXnnk6ivvAO1GbA/qMrJwFDJlE5HsaoVgw= 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=I8ilgkoGvjpGEZgG/JpqUFbj6BMprlamKSA/Wtdwwuc=; b=AZOrm4i+7mwlKdYURSE8rh7J4R1sXHib1/p1wbs0T7s9yRYp8WDn56L7TMwuf/34lw lQ3LFTrQFRz+aGpkX0F4EE4rTIQSC+il+EoupI+DHNsP1WLd23LoSHjjgPL5EfR9Kh/U 0eZTaL6XjSfnd6sUpi4BUegf0RxCw9H1GMVlxQ5SnmZMSxEmRLWAkTNV09xo7dAks76x 82Vlp5vzg4JoUrRn2Tb6n2Zax7IbeMrm2ecrWFQY8R1JTpW/O+TG+ztKSEikfAvlTphj caYg043L70Qfrw1e+ImlKDbkv0d66LeGOctwz3wuq+3E/xdvknTjCnyhuX9wEGXNe3CN GA1A== X-Gm-Message-State: ALQs6tDoGx1uIQNlyu0RBj1Nx2fxqTrgQqONfYOenhc0T9yk3FtwpQA2 ERvYUA02Gzaxqj1E8epNaO3hJ6k/xGA= X-Google-Smtp-Source: AIpwx49ZKdx4c+ZixHE7BrBk5vg3QKU+49y+dbS8xMcgCTPf5Fm6Fdxk327Tl4obgiDaBWVCftjKGA== X-Received: by 10.80.201.129 with SMTP id w1mr20714929edh.224.1523633497705; Fri, 13 Apr 2018 08:31:37 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:37 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:17 +0100 Message-Id: <1523633481-20914-14-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 13/17] 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 54b3b31..0ed95d8 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 Apr 13 15:31:18 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: 897995 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Ke3w+qsJ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N25v4MVCz9s16 for ; Sat, 14 Apr 2018 01:40:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 55E77C21CB6; Fri, 13 Apr 2018 15:35: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_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 77B18C21E57; Fri, 13 Apr 2018 15:32:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 14034C21DD3; Fri, 13 Apr 2018 15:31:43 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 5DC29C21E0B for ; Fri, 13 Apr 2018 15:31:39 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id u46so9164816wrc.11 for ; Fri, 13 Apr 2018 08:31:39 -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=bbFAncBFRkexED0uhJw8cduRh56y9IoLFmos07tqqVc=; b=Ke3w+qsJ08fPrp8gdzMhVb1k9toYZH5dshXym9VlVP3RA00we8iS64vPSnRG8spxI3 z+DwVB8Lfqu3SPydEZAAYJ1NA6ZnjbzYjmQGeyXIBw/E4k3HNdp9En9Wahzpq8Nsov5F eamGXLXc/D6RHyuqm3ecQbBBQNqs+52Gizum0= 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=bbFAncBFRkexED0uhJw8cduRh56y9IoLFmos07tqqVc=; b=oj5+yPRCViSz51WKBiEuUmr1V5y1fXS0m9SuRn357n3ti2hfOUHuwZie2yNwOwd8ek uo2GK1medOd9iT3unPdA+gNV2gnH/Pue3eXgm1GJdityOekhtN+5NF5WnRDfC3JkWcwG 3z65S0G0btWC2g8sBX5kYHiKEeeQtjdLcRGXHFl4QXqV1cmKs4zF4tyZ+/Sry4yDD8iU mi2WvINGEYZAHbhLEe9ZRIApeMt+J3hhwjUynOBewwXup3MnMjEiY4EzCxHeS+iX3Vuw eXkxW/XODBdeBR2DFNwFMe9y0Wswa9Vg1gPBhtkq3aAdw1iHm2KkUUNbmhogOw5wIeF9 Taug== X-Gm-Message-State: ALQs6tCGKi43zo40BRY7ev58Y2Y/5O/1tUfoCcycZVRwZyrnvXj0F0Ej k0Ej2mdkNhwgXYoHWM0RdkbSKr6tmTU= X-Google-Smtp-Source: AIpwx49reifEtbn6HhtkbNDL6ZJ+8fYovIV0TErpsS3/uSD4uYi4NmhCEIoA2dskWVDYvKpSihRMgQ== X-Received: by 10.80.246.3 with SMTP id c3mr20105528edn.185.1523633498855; Fri, 13 Apr 2018 08:31:38 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:38 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:18 +0100 Message-Id: <1523633481-20914-15-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 14/17] 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 0ed95d8..454bc1c 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=" \ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ From patchwork Fri Apr 13 15:31:19 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: 897999 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="F52KfFxn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N29r286jz9s16 for ; Sat, 14 Apr 2018 01:43:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F22F5C21E07; Fri, 13 Apr 2018 15:34: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_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EE427C21E45; Fri, 13 Apr 2018 15:32:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 45E7BC21DB5; Fri, 13 Apr 2018 15:31:45 +0000 (UTC) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by lists.denx.de (Postfix) with ESMTPS id AE386C21DD4 for ; Fri, 13 Apr 2018 15:31:40 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id d19so9178371wre.1 for ; Fri, 13 Apr 2018 08:31:40 -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=guTPV85x+THIISQjael5JIJYgZEJI5AyKYRcOCLdmuI=; b=F52KfFxngGezVNBMdEFSIa9dfVEbZRbv0lSKTd0P7R6RWRXRMUaFcNQCpA16h0ZpNX to8ZZAPvpMO0bpYSDMvLQSEpdwrxi0UdItFKZlOZwivDWJXQE2yeuUgg8ice+iuliFFT ENbQsgyeV8AjArslIT9DU7rMBC81Ls5RALtg0= 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=guTPV85x+THIISQjael5JIJYgZEJI5AyKYRcOCLdmuI=; b=BBUgdIW/1xbhi1mh9hN2GVM6Q2c8z3gHmGLTk2UAEghLficUSlAPh11QKhgW+weN2/ TfLOKr/wdBb6/fe8T3JRpLUA5Gqfm3Xpm9dRNKmFPyVbeYKbVvtjJ6XK1lNY7Z5qAu9Z 4uMXn0NDK4kx1SgQql8YcgvH7nmeadxvPCjqCsqG3+InGWVaf8Cs/nDmbQADG0zAtSbT tG3nzcCCFBYtR6vYH9yNQHslVHmf160k7RdhYIrnOCWYv40iG7qho5PlTRn9r2+V/ugC /6jRBNoezM9rvRT1qQ8+BO6z7XnND74wZQvpdtg4aO0gTh/sWoijtNBsTNlnUdQLYn6h oSPg== X-Gm-Message-State: ALQs6tDqxjLmgyxTCxUVhySgHGdXDxUvrFgP8yBHfflnPk3c7XJOmCa7 DuTxZ0v6tVlceFbu5f/hyAN44JIwrVI= X-Google-Smtp-Source: AIpwx4+oDu20ooN65nJcvxIBRLvyhPPpXUQJVdPQOHbqxjfgd9wTQnXgE9whf0DUw5MrAx4Kw60L/Q== X-Received: by 10.80.136.197 with SMTP id d63mr20193556edd.122.1523633500179; Fri, 13 Apr 2018 08:31:40 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:39 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:19 +0100 Message-Id: <1523633481-20914-16-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 15/17] 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 454bc1c..fe9b7d5 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -10,6 +10,7 @@ #define __WARP7_CONFIG_H #include "mx7_common.h" +#include #define PHYS_SDRAM_SIZE SZ_512M @@ -50,6 +51,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ From patchwork Fri Apr 13 15:31:20 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: 897991 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="g3xEe/rZ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N24w1QrMz9s16 for ; Sat, 14 Apr 2018 01:39:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D4E39C21E2C; Fri, 13 Apr 2018 15:36:25 +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, 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 B61ABC21D8A; Fri, 13 Apr 2018 15:33:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A8418C21DD3; Fri, 13 Apr 2018 15:31:46 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by lists.denx.de (Postfix) with ESMTPS id CA018C21D83 for ; Fri, 13 Apr 2018 15:31:41 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id l49so9165728wrl.4 for ; Fri, 13 Apr 2018 08:31:41 -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=ZrwB4bb7fmJb/9cKO0VTXqKN8Ijw1oOYzNnMvRSCY5w=; b=g3xEe/rZBp2takPtUvVWugyn+bUZF4RZJYG4bYkSLRmrhPTM/8jBXsWK/9teduCNSg YoEWaWCriMvaeHAuVYYvDRPaXT8KokwFS5Wnc9iK66KMtCOm5MYVEub8kptGZQUHFSbL 9cwtHZ2ZpOERr7fNo663Um0ht2gdCxg+yKe/E= 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=ZrwB4bb7fmJb/9cKO0VTXqKN8Ijw1oOYzNnMvRSCY5w=; b=UHdqmjB6ZwKyVxftbQKx3JZVZ0tXGtOSX6lEzvqsricS9Hf7n6wtjeWhBLAuHpmJv5 F+JMKKlSPmP7eb5T4ytWx47iUrlFggldygjjCFwQYYbtgcyVSF1tEN2iL1vg54FGZ2Wk YQmIGIBJLfjsPfJF7cabOEYb+ipa8KkT69HDSirJf2CYNsaPPb1jGbRN6aWV6i0i8Ly1 TLhL1yYP0E/HuGZZoxasd8m6BIsu4XGcnUeslfF/ZGsggrwj44QNrYGH5uAukeMxN0Dq Hu0tmymMk2mEn1iy0A0p+L47rqF0IKUO1HThJ9VIiXPHIeayWx9BGBk17cIj/hHDT1Hh aHEw== X-Gm-Message-State: ALQs6tCQ5ZNyg6+tXCWiCwC0IkQE64ygyUx6QiB1mpFrSbnL0y3howyi zfJzSEWJNcjHuAy81g6yBqvbz0jlAxw= X-Google-Smtp-Source: AIpwx49kbmO//ttnl1r35CFmF7PYo3HZnZnEVWHyloGVPAkUMBsFHx1Rb/ECg4zoGGw0nSkRgT6llQ== X-Received: by 10.80.235.65 with SMTP id z1mr20870766edp.154.1523633501283; Fri, 13 Apr 2018 08:31:41 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:40 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:20 +0100 Message-Id: <1523633481-20914-17-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 16/17] warp7: 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. This patch enables CMD_SETEXPR for the WaRP7 defconfig. Signed-off-by: Bryan O'Donoghue --- configs/warp7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index d5dc009..13c760d 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_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_DHCP=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT2=y From patchwork Fri Apr 13 15:31:21 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: 897997 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="NZndTEwX"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N26n2wHKz9s1R for ; Sat, 14 Apr 2018 01:40:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 130F7C21DF9; Fri, 13 Apr 2018 15:35: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, 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 E8E34C21E18; Fri, 13 Apr 2018 15:32:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6399CC21E36; Fri, 13 Apr 2018 15:31:47 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by lists.denx.de (Postfix) with ESMTPS id E44B9C21D4A for ; Fri, 13 Apr 2018 15:31:42 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id l49so9165890wrl.4 for ; Fri, 13 Apr 2018 08:31:42 -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=yVd1fav2PFmIPoPApPmBdYX5VkmcZ/lsc1NXAuRRRfY=; b=NZndTEwXNKPlJabIBaPgdlNr5ovn0iKItG+rQpYK9A8IQYEpaNtICVZEv0Fdc7Er0r VThkRBGv17Htf0GN68eaFIjFuVLMmQ/taNAhzF81dFlrfhgjVnIX5JaF/jQRGRxgfTQz 03shnsY7JU9E2oiJC416mK3SNoldlKrHMwQlU= 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=yVd1fav2PFmIPoPApPmBdYX5VkmcZ/lsc1NXAuRRRfY=; b=mXjLTZXVLm+S7fXJw2sW+rRfTiRz+Iq3GEkzNKK2HhjsiT+USv69UWWh7d1l9n6qiR U2rNLQjV+8UaFIAu8zh5CRLplXfZZdpflv6poAofvPoZGIYIATO728C9TRN0nvqGL8Ef GeS+b+hK0csUDwOTNmdJnTl1NrTWiX9dMVG3kp8xlMRYQar3h0+oW6jSrSB1693UQECn 1DAIDXSK8NhikUwz3ihniirepU75w+lYbxW60DR8Faa0VnnFf3ONTuZwoWhrVnbkhQqd 64655IadRveNE0tLeNKCkwfyjQBUorhPd/Ex+OpjL3DeV4jvpP1fO2xG+rkxgug3tXoz dJoA== X-Gm-Message-State: ALQs6tBV6ry+wao97K0BaT5CMry/RUxYo5k9bExcNNiDm19+6wB7021W uq+8KWNJFaE9fqTEOYDzaDUcxRLBLlQ= X-Google-Smtp-Source: AIpwx49LxOoN2CLGA79uRpkzlUuxtmf+OwFtMz95W3dupKAjUJqrqrleP2adaZYBxQg7OF5ro5NaVg== X-Received: by 10.80.174.177 with SMTP id e46mr21209968edd.61.1523633502370; Fri, 13 Apr 2018 08:31:42 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:41 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:21 +0100 Message-Id: <1523633481-20914-18-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 17/17] 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 fe9b7d5..f340bff 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -53,6 +53,14 @@ "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" \ + "do_bootscript_hab=" \ + "if test ${hab_enabled} -eq 1; then " \ + "setexpr hab_ivt_addr ${loadaddr} - ${ivt_offset}; " \ + "setenv script ${script_signed}; " \ + "load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; " \ + "run warp7_auth_or_fail; " \ + "run bootscript; "\ + "fi;\0" \ "loadbootscript=" \ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ @@ -79,6 +87,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 " \