From patchwork Mon Apr 2 22:42:00 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: 894387 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="B7aYO7p2"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS2F1S54z9s1r for ; Tue, 3 Apr 2018 08:44:05 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D95E5C21EF0; Mon, 2 Apr 2018 22:42:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 345C0C21DFA; Mon, 2 Apr 2018 22:42:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 09D08C21DB3; Mon, 2 Apr 2018 22:42:20 +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 791A8C21CB1 for ; Mon, 2 Apr 2018 22:42:20 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id v21so29029969wmc.1 for ; Mon, 02 Apr 2018 15:42:20 -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=B7aYO7p2qZK8jWalKoc1+N0VmvoX26LGmY9TNf9rlENhX+1pd2iHSrj2Zfvyw6jhT+ 1Hm8axaDPMhXxerpN65flWxIM9Vo7WzxWTpdFNUJOBdM9EEUoAYjNCn+sGWvB4F+/xc0 GHxNzFkedUaqXv38+y/3V6p/ZIM76nO1pQzAQ= 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=a6q23GdAWy1SSYeC32Q2spG8SR3bf5wGzVghzy4QpG1uIfPoOtD9sUhK3VyFclHUUN SA9kJmgl8fABMNALkfPG4y+jezK35hFTCsbX06Dk2RkXp6dDiEv/G0KzmInB4NKMFy3J Of9fdq/5okONS8o3qnWWjAazg6gnSMiB8Hp416TdftQXEJ74/4lAlPHdhM4ETE4VdKN3 crQTYE8HvdU/dHQiHfcUW/yhZZHNr09xjt7htrJw9zYeV9b2+/J4tFsPaLTSAhpLYSlB Ya/ZYf2KEM+xp45JFAk8b8E2f2y+ssjp8VmvFig3j3m0MEkUcwEi81K+6V5ihyktcTwL vP7A== X-Gm-Message-State: AElRT7H4sVtDC5Ng5b9zOADI9l7ngLAMkv78Bad/fjnd0VeNdCB6s5XY THmK+NMB1yb7PEQG9g+tSjzvbtMOXRM= X-Google-Smtp-Source: AIpwx4/+ICH7rJ8KMjBSb+09LiSQceEvgroJQef4X3sJD6bz/Ms0rWLdORjMj3847HAMDfinuqvG5Q== X-Received: by 10.80.164.182 with SMTP id w51mr10677424edb.152.1522708939893; Mon, 02 Apr 2018 15:42:19 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:19 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:00 +0100 Message-Id: <1522708936-7603-2-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42:01 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: 894389 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="Cp11bVGa"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS5b0XjFz9s0q for ; Tue, 3 Apr 2018 08:46:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 92FCBC21CB1; Mon, 2 Apr 2018 22:43:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 25D61C21EE4; Mon, 2 Apr 2018 22:42:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 541A6C21EDE; Mon, 2 Apr 2018 22:42:26 +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 8FBCCC21DD7 for ; Mon, 2 Apr 2018 22:42:21 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id w2so8389776wmw.1 for ; Mon, 02 Apr 2018 15:42:21 -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=Cp11bVGamGf8g63+zc2+eBmFInovQM2jeXmdN8MbXTDQ4yprhC4i7gDVhJ8t0ZG063 2AOcZ81cqtYisrVioVsKUBUD7qxyP5Dv+8yvviYq49gbFr4QCFlfn9GqhmZz9wlTK3Qj EkJahQFK1IjQ5ZmDJySUL05Im+7xxozzPQFFc= 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=tgRois6kR4h7m5rxe+83cc+hdbVJETSHlUqCj3VaHRoV4f54EO2kTnA6SC/67rUa3Q QNdEJGttAsdNjng+Ba6phKrwRxu8gNtfZol4tiwLxSTE7lbvluPBbSafDC/Qq+a2hpNd mXc2HWCsEaPi32wdx3Gy+v4w0qwXyZLBnYLIeuUsdEcPTrUsF9qpWZn0nAIdAEJHHMBL JRpftleKMQqcHdzxTmX0fIQl4taPnMyBlOx1Q+AlRBhWb42kdW/zsb0tHHLLDtqtNDr6 d3tb+NV6QoSrYq48f+Z2MVlGnJUcu+NR+62+hCXre3Eplf3zCozIF+fcYcADiEzltOjq F+vw== X-Gm-Message-State: AElRT7GRzmaJs/VsmK2OxHhHzOi8eSH1emJMbvBxjdoezVdL9kvt5n1H +l70Olwv/w8vb9lAYrmCSCP9BsN6aoM= X-Google-Smtp-Source: AIpwx4+Q88eNBQn7nQQ7kRvO3e8yvM2lDrAuTurbEA/YjZCreqEp2qLtxBvkq4qEap//VDfuapp2Sw== X-Received: by 10.80.137.149 with SMTP id g21mr14183330edg.25.1522708940922; Mon, 02 Apr 2018 15:42:20 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:20 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:01 +0100 Message-Id: <1522708936-7603-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42:02 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: 894386 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="SHMCNmmn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS1G32P8z9s1r for ; Tue, 3 Apr 2018 08:43:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E2EF1C21EDC; Mon, 2 Apr 2018 22:43:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_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 257C1C21E90; Mon, 2 Apr 2018 22:42:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E5B0AC21E90; Mon, 2 Apr 2018 22:42:27 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by lists.denx.de (Postfix) with ESMTPS id 9F21BC21E34 for ; Mon, 2 Apr 2018 22:42:22 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id r82so30718317wme.0 for ; Mon, 02 Apr 2018 15:42:22 -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=SHMCNmmnac9GRKN6XDxB8hh8hnyeAvxmzdDIxju6p1rpeyr1jZOJVaOiCZAVsNahA+ iOF5VLhSS+t9zyj2IyHT3XYrl2RUxKbDDfFpP9Gtr7OiE2p2pjUtzMuN8uYkhvdIXr4+ plKpmHmUfYSxRU3iATwphkM69cyGJrLQL8Kms= 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=UhddMUCN2e0LrGQCGyuBxilySkUWg7deTufggYtzkUrSOSrvXKdHTjiJKck+PgVahh J8S2FGyGl1HtKoLqynk2k5maJHDAJD3UsJm4Qvq8kMaeCbjX79xmEMjBQ/szCyNC2wRM aH4O5qYxE8C6TL35piI5nWfyDE7KBFOzziKMtFYEzkPMYybj6TFwTWzGHr4bWQuxmWwL GVriMx2fa9EhxZHJ9MJdWTpbgDza1/GTGTFGGFL5xa115P0rX7fiz//cBbisqSVScXRU XsdmsxQF/2C0xdP/yvRkFTYu0SlCo3OyqEp7yYHmCPHraALiuoKk4i0T9K3liSOCcR94 mC+g== X-Gm-Message-State: ALQs6tArLf6FJtG9MkoU6DgTTKB65IA7MLgOgxQ42ThNRR7RWGRbQasL OGMSrAcls0HFjYVbXOL2yeYmY6H5fc4= X-Google-Smtp-Source: AIpwx48vLbs9krTYOrH9xvo1DQ7R9dXxpD1PoHH+rEkOK4jk8RwsHRuJ0NitTy7IeeKcEAxx8qEqBg== X-Received: by 10.80.232.131 with SMTP id f3mr2249719edn.240.1522708942012; Mon, 02 Apr 2018 15:42:22 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:21 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:02 +0100 Message-Id: <1522708936-7603-4-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 894388 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="Q02wrl+s"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS4j6YNnz9s1r for ; Tue, 3 Apr 2018 08:46:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 90D3BC21CB1; Mon, 2 Apr 2018 22:43: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_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 23980C21E08; Mon, 2 Apr 2018 22:42:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6DA67C21E56; Mon, 2 Apr 2018 22:42:29 +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 C996FC21E30 for ; Mon, 2 Apr 2018 22:42:23 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id x4so30420026wmh.5 for ; Mon, 02 Apr 2018 15:42:23 -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=Q02wrl+sjEalJoGW06m7MN+256qvydmkwR0NE4JxYTYHI3lXlC7YV6uqh7FLnL6cvj aL50cEDEGZahwfqldV9matNvLy7NTVjySJTnhNGZAUoxwBIaPfJ7GtNIyM6lDcsKA9pT Le9pIKdE8+kBm8aYY+Zs2SzClzfvSW44VDVJQ= 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=kEVvQ3lAjoLtwUDD8iG6dKXkdzi8WjiIzzy2FOvA23IGwwQKsoxjOxbIUONkskMKvp lTmSCTclaeT/7pHizuKTQc5s3iGlQQFBGuLvprHdD/mCiqtBy/wFSCl+edTIjurQfVwV 7jZbG+zm/JdXBKKIKCvlkP9yYyQ5KRfSYRdtkVKpoWDC+dzX/pqxkquvgOFIFfZ7CAAu jMA5c8txXwpwlqBmKyczy1zHQ/IXuFQXSnOWhvoDPhyyJRD/0K7EgYG5pHN+6sWQ617N PJBOFZtamQmePd72thDr8gWUdj+ZRnDMe4Xv8BSDmwwM2UeqZ1MHATLY9gnaLeJvEsbu Nwxw== X-Gm-Message-State: AElRT7EBgTTxtRQO3DCQhnjMqbEbu5+/3wQZ++b0+2SYoQ0eHRX/uTmb lBlplKiGO+fCSkaU3jAVViEfHxdCjuc= X-Google-Smtp-Source: AIpwx4+8e3xw9yp91JJ/hL4Sg8fH4hRFnUFWuzLP927PnJUCTkAdcg86V6SAYTAtafY2FZRnC58x2A== X-Received: by 10.80.189.130 with SMTP id y2mr13847123edh.138.1522708943089; Mon, 02 Apr 2018 15:42:23 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:22 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:03 +0100 Message-Id: <1522708936-7603-5-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42:04 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: 894393 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="eL49gY2z"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS5s50XNz9s0q for ; Tue, 3 Apr 2018 08:47:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 46C2FC21E31; Mon, 2 Apr 2018 22:45: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_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 811B8C21E12; Mon, 2 Apr 2018 22:43:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A0A34C21F05; Mon, 2 Apr 2018 22:42:29 +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 DC224C21EB1 for ; Mon, 2 Apr 2018 22:42:24 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id r131so30460079wmb.2 for ; Mon, 02 Apr 2018 15:42:24 -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=eL49gY2zBZ+vZbB9IQ9q1UHZEfkxYpvr90c6nJE07CE4Y8kUVCL4vkX8ahCg6sX0W7 SVz3RaPFuJIgOZLGy/35HPXBRur/9Ui7qcm1Jq+LvbQIobHNXiVtKEMPRsPRlg0r94ky k+oVHK9ZsAZiVIP/15t9ot9EFYfniM88c3Oo8= 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=sq+9J234HFXHKDbygZdZnqfwsjoahKnIUhItcY2qjG9q3aXg+2jpfakz1G6yOfFVUy G7i9KRGV3oPyPMocTteK+Ja92JsQPszzdDpJDyb43oOSvr/xJ6giArNtRxgNUWxeRnoe KB82T+fDrXOGUUjLHXph0jZLDdNhveLGB/MwhnD22p7oxP1vBVnvBFBHLtUxq3PNlAhm NhsWGPCKiIQo0yR2szQPk0vCtzYkJG3bZmxN3mpde1o7W+Iqv8RrW0J5xOfCOigb+6se 3UQyHBNaTAC5OBx5Z0p5QE5AimAEhh11VExGVUkcemtiIMhBwKYN9KrZK8EBnL7Bm94i LVGQ== X-Gm-Message-State: AElRT7EU7/IJGTTISQ4AJWjQ3ARYeS4kKumsIhBBOXybErvAXu9Njo6V xB1rQNvMlJMgInKv4yG8JSSh/y7PV8A= X-Google-Smtp-Source: AIpwx4+I/M9t9NjXaLDkUFfXPRsnm9qBJKJEV7HjEn8X7ARHaM7M+IWrb8JlzHGGyhNulys6LEtkMA== X-Received: by 10.80.136.107 with SMTP id c40mr14140728edc.231.1522708944143; Mon, 02 Apr 2018 15:42:24 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:23 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:04 +0100 Message-Id: <1522708936-7603-6-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894397 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="X5rayfKC"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS9j0HJYz9s0q for ; Tue, 3 Apr 2018 08:50:32 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BE407C21E45; Mon, 2 Apr 2018 22:45: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_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 C135CC21F0C; Mon, 2 Apr 2018 22:42:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 99E1AC21EDE; Mon, 2 Apr 2018 22:42:30 +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 2878DC21E07 for ; Mon, 2 Apr 2018 22:42:26 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id x82so30477278wmg.1 for ; Mon, 02 Apr 2018 15:42: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=QYUQjDXk16GnMGixelcOEuFlaSZ/V4B2B/jP3GH8tgI=; b=X5rayfKC3u6pZuM543zgPfpPbaLiUrYpQMQFqAxJgWnhLOt7KOKiEO4Sg/RZp8LUQ3 8T80oHo/Aph+XvXgUBWFc488F0/OnbkQstte4NTNrnssFrC6PB/JD47z3VAEP6/SCjLR OAk9yoFDh+Qrmn6/xunsNMmtUwMVDegXocm90= 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=cpLVDkYGU94jl5pmkTeKmc/pF6bFQAwO8+yOzfyzgGjoKuE9KlXOOpzdIjm0Sk5Zsw YIcjMrW+ynPi3Q+5HWV/cJsSBlbIK75PC4fT/wDDX5fEme7u71Z+TXfxr0/kXd9znlvf 34P8ZhvlFYn94eOxDlsSTnFdhk+IA/Z5cH3mLz7S75ct9raJiDLLivI9KLUZz2AiJ4Bz lM8IExdoH6P0mZghSEmKjAalPuZI1ik7zmG3oYPrbXWVDqPL8NbELRKO7hARzjew+ffg osRJqyS/B6xXlvCyPZmADZofoPOVypL/xc1QK0JX1xyZai7DIk9geZmlkEC6k6qlNnIZ VQuA== X-Gm-Message-State: AElRT7FM8v7BEjGqVhAqa0yGW4p5pXULYId+w2Wu+NKkfPFj75pJjMP7 GluiecWSjouB/whNNpYgs/FWtZMSCY4= X-Google-Smtp-Source: AIpwx481sA8RYdnahkuCcJhcyMG29Thh1/LUx8hvIms/TLjJ7B83ZzUziifGkDnET157ujE/2aeCXw== X-Received: by 10.80.144.119 with SMTP id z52mr14051641edz.79.1522708945150; Mon, 02 Apr 2018 15:42:25 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:24 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:05 +0100 Message-Id: <1522708936-7603-7-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894394 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="kox7l3BF"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS6r0K6Nz9s0q for ; Tue, 3 Apr 2018 08:48:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BFFD5C21E53; Mon, 2 Apr 2018 22:44:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6A6D5C21E53; Mon, 2 Apr 2018 22:42:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 992A4C21E30; Mon, 2 Apr 2018 22:42:31 +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 27221C21E90 for ; Mon, 2 Apr 2018 22:42:27 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id h76so29005156wme.4 for ; Mon, 02 Apr 2018 15:42: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=lmGswfnO4JBLqVcYz/fMo3k/jRcv8rEN3ZTfeotYkRY=; b=kox7l3BFRESlcSe+pb0iA3oIfhov+a28qs4rg4mqSk3HK34HaUxTjp/GtRdxEkH/gJ G5Byb5G41eTFqmqyX5QMHCZmtHg3hvugtTbS9YH63fc02mlstNmU3LuK0ECMHZs0MvJd 5f1+fM3Xwx4m4G4ceUdlgTN3XShHSFlmLFeOM= 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=fH/c7HrS5aLpBgk6pn4mlobFqik6Ut2gYdBdsTjM1gJ3pQ3zQ7jRGMxeQYyBeBAI3a 6OcRYYC+gKBz89mxHzUzVa8WFljFmRRgP6G7/EW/TjYSzYpHjipTYsF8d0lSTowmh7+b KOfZOb+za+2kJKQ+SXoJjyd1yKHJe9IkOioCy2Dm4IqLtcG9zbFtkHNHTFa9qU0/Nket BnY+GjKK5RLmkkJh82R0xtWXBsisNQIN1rQ4NmGOJ3mUES2tY5CA6r5n3DTwTalw693l 1jl5XRYjcsjqULESyNtFoLoWGamToAK4khkbdpPY+tT1LCqxaXnyaZXAej7SvuaKfzoX iq3A== X-Gm-Message-State: ALQs6tDZF7wCh9qiqDJwUSi0vMcuyxpRmf4V4CPiPKZnZgNrsggl2pqx 8U81478gX7h5p7KJs4nG1CfWvxtejas= X-Google-Smtp-Source: AIpwx48K8LIzPSPJD7idGOVLwy4/C4euvVzJ0alXjULpZSvHmyv80CqJP7gSGTxAksLt5Jc6Jort/A== X-Received: by 10.80.242.140 with SMTP id f12mr1168446edm.130.1522708946166; Mon, 02 Apr 2018 15:42:26 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:25 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:06 +0100 Message-Id: <1522708936-7603-8-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894404 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="YSD9BNtx"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FSFV1NQpz9s1r for ; Tue, 3 Apr 2018 08:53:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B3BD3C21E90; Mon, 2 Apr 2018 22:45: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_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 93E51C21F29; Mon, 2 Apr 2018 22:43:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C5BD4C21DD7; Mon, 2 Apr 2018 22:42:32 +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 4C957C21E53 for ; Mon, 2 Apr 2018 22:42:28 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id b127so28139719wmf.5 for ; Mon, 02 Apr 2018 15:42: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=VSGD7e4ky5DKmlDTuYNRjPCMufmihoax4/YMwg9zaPM=; b=YSD9BNtx/ffbWEropazkckUA0AWtqXCMmyGAhW6UO+CnJAYbqGH9dwiHfRTHfEipA+ 2s+/LxlodaG3Bf2qpDPecARCP+elyDwaAFJEy8nxxD8n0aQo5dnX13A6ydVSPCkUTBfJ BmjR5n1PpL766yKne+d7Ajny9axG9PyxyTW5M= 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=Gu6qbyORGHoLuUyn1NibTSa1fdHqL7cigf4CJXddJmMIB0iWARqCH+b3PGH1CQSKhg DpwU8Rk7Kj2+0bKeWN+Iy6hpXUkV+n06DQC+ifhxcL8vJoZqwAgNAkKxgaGejqVGp75c mHnl7lPY4zny1AswWhR0Uteg+9gVH8VrMGUDyyFyZqOHb+6AwnxKScG6wF7Gc+MNgp0L sm4RPqddkTU3Gc/lCZFHBVT5Fqon4EaBBcKGDL1TJtqRBK4kplCmwJ/0FXCrjwU3I5W1 ObaTWUlNaDEjQfKzhikHXpD3Y4SwKp301D+1cf9B7LWiuyiapoWSmvGafkrJ5LwoOxse SXOQ== X-Gm-Message-State: AElRT7FoSM5mPXni04bJpg09RABB6rBmJ5Fvi5J2ARDzmgbPWB+1npqP kwhgHoFHTon3ajSANQgYCn/eGFMSx0I= X-Google-Smtp-Source: AIpwx4/HoTNmpNMeYBYLDL3I8SXbO7/EKAwMfQDGronTAsM7a6JvkXMF4XAhQzzaG1ZsH1lXgfY3ag== X-Received: by 10.80.190.67 with SMTP id b3mr3014341edi.84.1522708947164; Mon, 02 Apr 2018 15:42:27 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:26 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:07 +0100 Message-Id: <1522708936-7603-9-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894398 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="Xx3UN2uf"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS9k4r32z9s0q for ; Tue, 3 Apr 2018 08:50:34 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6514AC21DD7; Mon, 2 Apr 2018 22:46: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_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 BCE25C21F32; Mon, 2 Apr 2018 22:43:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 58920C21EC9; Mon, 2 Apr 2018 22:42:33 +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 C18B5C21E56 for ; Mon, 2 Apr 2018 22:42:28 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id h76so29005279wme.4 for ; Mon, 02 Apr 2018 15:42: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=+nwn5lRaFWst3UwOtqR/ryFHXvSyVue8HZITpt8D1UE=; b=Xx3UN2uf/YvmtUGqcFwkHJF/RETvEi20xeg5K23DCzxg74TqsRjP6acOGLgv4i5Mkx YH0AM984pxEXtXaR5t611ym/1kMBL++22elfY8JOvJdWQvHupAhFmKrQYt+RR7voSG4X dDh0eZw6DcqetDr45NYmTOBKInQy5AMqjU5fc= 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=e2y0/IItdlDpawNGJUDl9I6cwOAqctM4csxkaFlJqj1TjVt93candTJD1vkLLcSo2t GzPCDhqNbRKAYmdtHHgNYeCysdac1l1XqSv59MlRrG6d+kqgHW+98YS4533IfEV/qV9C 55vQb+hPfKfuwdjh9FiI5YIwL1Uj664wZ9uGpmQ9hYnJ+OJ69PE8kqFJTCOkXXG/8jIB wxBRtOM4Hjf+UXk/N9di2TFNXt2ecujSGo77oVIq2tfPlJl5stBW4xtvTCxUb3KEWLZK cBkdvff0DbiBZJkhUcEeseB/Wxgr6caAOnTDEnAH+qJwkrby6Q5YT36qkdkiqorEqRw2 /hBg== X-Gm-Message-State: AElRT7HijhhdoN/NPx86XPN1Ax9quxXDh8feqis0YwZWlKrqgmO98mp9 UBXwdsujOvqxb7MADv2vCxKkycXnG8Y= X-Google-Smtp-Source: AIpwx4/P6VopBI22fGwZQPx9o+kptbT4SaT8MK2GAhRgXBoPRK2qDDmH8kvQkCB9Bes0gh6uPwh3nQ== X-Received: by 10.80.181.117 with SMTP id z50mr13938003edd.223.1522708948227; Mon, 02 Apr 2018 15:42:28 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:27 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:08 +0100 Message-Id: <1522708936-7603-10-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894395 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="ItxYiZeM"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS7q4JrBz9s27 for ; Tue, 3 Apr 2018 08:48:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D58F8C21EDE; Mon, 2 Apr 2018 22:44: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_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 6441AC21EBE; Mon, 2 Apr 2018 22:42:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E3533C21E7E; Mon, 2 Apr 2018 22:42:35 +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 89FDDC21EB1 for ; Mon, 2 Apr 2018 22:42:30 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id x82so30477527wmg.1 for ; Mon, 02 Apr 2018 15:42: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=jEJ2K86Wbbdpj7z+Xd0250Q+apqTUT7spA9kXplFwfQ=; b=ItxYiZeMucAlO1k+igfQYuYARwkd8QtGuhsc7bozSeqpPOZzl6KhWcAVHYwNkOhVLE uThoK2ytaHNt1iFXu5OGw/gouYxp95f4NMof0jB8mOon0uZ/r5OZJDPOqnfLTy6PrAJi 06oGIe9dAL5zmDd4G87eOEtBJhczHij6k82Bg= 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=L62Y9UzYEk7Xj3q8QESxS8AHTUv9D3TGbr58n4ML/mjqPwjVDpYqkuOlYnJIEjFkBG rtRR45OAm2qsh1efqRLgRewgyjaMdGVSizsYEWIUObBKx+HRGWuYM1X8iYijJD/dI+Yf AzGxLnnGoySnaKnk9XBKw2LXfi9mI4OvgX4COuyPVzBbCyD2PWnGOF69H8Ka3XuBP+X1 33nxdfmOk+GpKYSF/ZRGOKH+MAu8Dv5LFGZpIvxG/xY4/oMgtc5u+JZiM3DHvFTpMjSF Uv192kyxhvt/du7NAjMQniwfjhmUwpSBuvamVJiMkM5Y5Yk70lhnNi+pfw7YitygzL4G A1gw== X-Gm-Message-State: AElRT7GSYJNFAW+eYRCYNHPmI0ZFOFA1YQc5A17rwv2uNHN0Hm07jeWP 7oWhtGKRBf4Drox4m+C4Nvyxy+zYjeA= X-Google-Smtp-Source: AIpwx4+zDRDdzsNxp393cuKsXxkwjG8JZHNR9KuL2x8VXj9+cWzPghq0RhYrgeGSZos8rl415SNbNA== X-Received: by 10.80.170.152 with SMTP id q24mr14558439edc.43.1522708949238; Mon, 02 Apr 2018 15:42:29 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:28 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:09 +0100 Message-Id: <1522708936-7603-11-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894400 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="eaPpAApA"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FSB60WGMz9s1r for ; Tue, 3 Apr 2018 08:50:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 89EC5C21EDC; Mon, 2 Apr 2018 22:44:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 89D01C21DFB; Mon, 2 Apr 2018 22:42:45 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 43341C21EC2; Mon, 2 Apr 2018 22:42:36 +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 A47FCC21EF0 for ; Mon, 2 Apr 2018 22:42:31 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id f125so30446659wme.4 for ; Mon, 02 Apr 2018 15:42: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=/2tvjMqvheFPaxDToxnSUfvJvW4njbPu/uUoO+4TLH8=; b=eaPpAApAljrw9+SbfYs0mqiU9LwkvbM1YsZf2YC1WgJ9ncFTGxYlKMvwX8nlxEY+Eq 4e/+gmKsfA2f/yC42fP3HERL5qEHU6eYnDrw7YxLdgAP67+/lt32Lt5alBSjlofTn7nJ GEl2EWnAMR25F+iefY3RLJNNLatmvnUcgiKg4= 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=JjIxpfVhuTaCCoYmN/+Ixgf59Mh8cOcyvJHQxBrgoklK+kF3nepTgOqU33fSlgyGbZ gdm+edsQarbBosBuQYVhK0S8M2Thm1ntJLFUNiR6/JIn4o8MPabaPa/+tK5TauHMO+by A2PU9AkJTg+0X34eoBKxgkyjEu67pvkk86VdOg6AZxGx+965bajvoMaiyyL6IwHhvKyH lSNxB9Mq7wyFOYIc2vPEFhjiLw/3mBG7gADwIeBTfUo80SiyKzP1FOBtcWsnrVaU783d 1wPtbXPlBRQnnx1g9JrYWxdixJC4jbVtFCV4Di17Zd49x7p/QRUv59vdtLz81v9M43wW DlMg== X-Gm-Message-State: AElRT7GsS/wEYNakoHla+Tm8075kj+/5IY+mAoO/zwX0r3CVGlCM+2Sg UUN7iXJYcnQFnuMEwYs3WD6fCJkuB68= X-Google-Smtp-Source: AIpwx4/ObdDuAni+4UqoIo/2NtmoCKxvnQwUOBmGjGOI2TOZAxjeU0WJcKRbGgWl72fgELS7741ZKQ== X-Received: by 10.80.144.195 with SMTP id d3mr13905117eda.54.1522708950249; Mon, 02 Apr 2018 15:42:30 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:29 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:10 +0100 Message-Id: <1522708936-7603-12-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894401 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="RLs5jwHT"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FSCD3qc6z9s1r for ; Tue, 3 Apr 2018 08:51:52 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2F80BC21DF3; Mon, 2 Apr 2018 22:43:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4690EC21EB1; Mon, 2 Apr 2018 22:42:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A8B3EC21EB1; Mon, 2 Apr 2018 22:42:36 +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 8AA93C21E8A for ; Mon, 2 Apr 2018 22:42:32 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x82so30477652wmg.1 for ; Mon, 02 Apr 2018 15:42: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=KgrE6YnsKs+4xDftmSHKc3zTTtDMLVB3jc+2BUJ5WCU=; b=RLs5jwHTrd+p+8pxnHBmfk9IOC+1bOQhLy68ZvE9Sz0PxbHkHbB85O+6Ri0Hp0rbdG 6fJnZ0afbi4hJbdxCPYxfQPqHbjg1+Ezxs/lRR8Qipa9aO9zmkX0i1nuxr5DzGzRUy2n 5WVazC9/AVuAeaor7akryR7Rxhy9gt8ehvj3E= 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=ACZCIHF+TP+nU7gTmyERq6ySu62AmEGtqJcEymMJMrMtoI5BapLJspG7wLrNqH/6iU u6PpDQYmNdro3+Vqqys2ei/GAIBrB1+1UifZ5JnBdU3ViojK+jFsW74tTlddjpcM77FL 35kf+l+0Kburpkm4H+Pe67hsN1EhOJm/CaesH8tKAEuC/eQvY2JJPoy7oYFNV1FP+/OQ KobiUuehWqiHD4zOuG9nQTI95F92UZKGcn6w4WUpCgrrT6sN19OZvyyvi5Of0Wbk9McS F8EUa7JsogALxcqbckdIH5USwQ2/8E0/tpV/0CruSooLNFBYAsQrvomCRUnDBnVYXWMd Nqeg== X-Gm-Message-State: AElRT7HAYJ3W9mO6yhvUJNCh7KQCCBQhc5OiCPfu54scS7jNKp5eEPJ7 xlPCwhz/eKYRbUyN6r8+XFBZCoGwKeI= X-Google-Smtp-Source: AIpwx4/8k1aMbKE8j7Tfe6l76thMdjW5fPIMUB4i0lsOWdzeBb1bg/f+XEE3zoSKOa6zD6ASyKP3fA== X-Received: by 10.80.232.195 with SMTP id l3mr14092262edn.307.1522708951220; Mon, 02 Apr 2018 15:42:31 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:30 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:11 +0100 Message-Id: <1522708936-7603-13-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894392 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="cqwZo3Xs"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS5n20Qcz9s28 for ; Tue, 3 Apr 2018 08:47:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BE08BC21E73; Mon, 2 Apr 2018 22:45:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 065D8C21E26; Mon, 2 Apr 2018 22:42:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B5211C21F02; Mon, 2 Apr 2018 22:42:38 +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 62CD4C21E07 for ; Mon, 2 Apr 2018 22:42:33 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id r82so30719048wme.0 for ; Mon, 02 Apr 2018 15:42:33 -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=cqwZo3Xsdd65LJiFAFDyPKbMZujcioV3ByPqsTZLCBlepeqxQRo1884h1S+AxQJudn PRb0io8QHGW/Bsn8GGXVN20IVUz0iaUQgdwTK9X7gu7nOZxfyylw/+2WxCfF4YEq5d76 eEfpMC4bdswPoBgCgyqD4r8pP4V12eBKRAdEY= 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=Hwm/vo4YMgvGrS+ftaL68dHmhgJwuhlXU1XMr0MMU5KsXgV+KWFJmWAblvzW9s3p8R b/TP3DWdAI/9XUuu8EQEIBTjfPZGSJjHfea27VqpdZJZ7SxKelPMyvCf48VynM/CjD7i pwtT2XRd3EdDSKCJuJGuNN3gPSmn9Ns77MK6aDLS3anJM05KUfeUWQbOXVNdLZcj3jNY QmK1Fd+BpsDC1if9iKjOhU5kcuVhv6OWW5GIT3Gw86Yr0m9s3cPCGtzhXJcnjF3noH8S D7MOvoqRqDr6iSnwB/uxJdaR0GlwWSAN2sozKJOf4dPzkg+k+GhI7Evibnh6pz7L07bO 4syQ== X-Gm-Message-State: AElRT7HqmG67ho2svEcfczN3Tm4SO5hLFHjGUQMM4EaydzNihZHlOJyI ZiqYCU1/scfhxlETn4Jyu1+LsPJ2OJY= X-Google-Smtp-Source: AIpwx49ZneeVUStkkgxYRP1IrekMuamiNx0VZfD6GFUiIBIL1LUMDevVifrV2+tFfYprhybRFTo7jw== X-Received: by 10.80.147.89 with SMTP id n25mr14229423eda.189.1522708952213; Mon, 02 Apr 2018 15:42:32 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:31 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:12 +0100 Message-Id: <1522708936-7603-14-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894403 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="jB6jGIgq"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FSCV6GD0z9s1r for ; Tue, 3 Apr 2018 08:52:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8D3FEC21ED5; Mon, 2 Apr 2018 22:46:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 94ECCC21F01; Mon, 2 Apr 2018 22:44:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0EBA6C21EF2; Mon, 2 Apr 2018 22:42:38 +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 85499C21DFB for ; Mon, 2 Apr 2018 22:42:34 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id x4so30420751wmh.5 for ; Mon, 02 Apr 2018 15:42: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=bbFAncBFRkexED0uhJw8cduRh56y9IoLFmos07tqqVc=; b=jB6jGIgqBXE0QwdqxdxUZvVyagJmPcm184j2xMSJ1V+/lG8VJz+vzzJOyxSlMbuQ6O cID+4co7w3G1LWU5Yas7Itx5KWaePLz5LOz63xHpHyR7yj16Nw2ten2+cJWTF9dG1Ec9 P2Q8od+UTyBaY2ssjQNSp1yhjeVvjyAdoKxpA= 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=lxifx0M4sZgOEEToRuArkl/lhvTJ44+XIquFDZ3Dhvrr6/b4n0J4FIxGuNLbS22rdw vrXI1SRtJCi7JYikeCNBkP/zcR6GH4F/x0EWeG6LVVHf3xdqY56ZL/+JqK1qhpn/8AR8 6YLcIlhnJYGMn5I1y+KHywOnQW68lHLEnToZvchefDnGloM13XtZ9ib3XaDQ+8hHS8Mx qk0aCsTXnHvfp/7xxUg+xVcf6YeZW0brIEcy1w5/8rUXiBb3vOjw6BoxzO985MM6JKNe ztACa2U7Vtrc93EkfhDUli29ImMSHDUvtTpVdHyAatLnMblD22p7edNl6jP/j9eYYgmn K4WA== X-Gm-Message-State: AElRT7HZy17pwPIK/GicV5kJwpOOaX9GZe/QCcP9y6RqSHYpWGDmhwkw Gs4FHJSwichhWPmmJjd5CNv7AcSvu3A= X-Google-Smtp-Source: AIpwx4+PW8ELKN9KCzGRgkw+gDN6qUuSj4aafzOPpfq11/L4Rej4hDabEMzdKOwiG3mPc29vrSxQ9w== X-Received: by 10.80.192.72 with SMTP id u8mr13996491edd.16.1522708953220; Mon, 02 Apr 2018 15:42:33 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:32 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:13 +0100 Message-Id: <1522708936-7603-15-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894399 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="OCdndTmh"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS9s45Lfz9s27 for ; Tue, 3 Apr 2018 08:50:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3566BC21EA6; Mon, 2 Apr 2018 22:47: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_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 2783EC21EF2; Mon, 2 Apr 2018 22:44:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5D3E6C21F1B; Mon, 2 Apr 2018 22:42:39 +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 BDEBBC21E85 for ; Mon, 2 Apr 2018 22:42:35 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id t67so9088985wmt.0 for ; Mon, 02 Apr 2018 15:42: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=guTPV85x+THIISQjael5JIJYgZEJI5AyKYRcOCLdmuI=; b=OCdndTmhn8YPSm9TAjTDqYe0p054u2EA0VdrpyIjUubLJQHFWvrB8kp+q9CS1FPPHa x58lWsksO58YnNAU1pwyeBqjcQPnCZHJyvUu1GN8lQTfwQuSsQfgDqOrwP8YTDQ81Js8 tWwpXur++M3ajhg6ruc/KsvIV8MV5jRKP62FE= 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=joUms73z0/IjzEsrXDklVcgs+RYYrnvSErcST4mRsuYbq0gUAeJtUvLOnjqX3iJ1sh NJlAWPsHIUwXbEdktoYfX8qkgVyMxT5vtog11igVz2YSJYbYdVRCtHROOgALeNQdAZA5 Gx+kZxmOLq5IDnYlaNtBvRqOVM/wJwRXKPeKnvf30I79s1vNEblPChIOcNK16DCtJ+yR 2RJSS9TlZHVpB/Ag+yoa5sN+ZcpmauOvo9JXLNAWowtfoSfmssBckW2VSAKGpsGzATiI egjC5o1+6dIrNEfVSksZYCp62Fpd0vElJHnuNBWxrbvzt2/5unn0r0zQNYDHJEdkmW0W CBpA== X-Gm-Message-State: AElRT7HEY8m6VvHyfC17fK8g+mc4rm+lL6I9PCJ0CRp/3WwajGK9D5gQ YiLv+SIx5xYs57t5DSwYOqvSJA5IKbE= X-Google-Smtp-Source: AIpwx49MOm/EdLBeVP1vYVXjIBLMOLm5kNUyIIPjESZGVdsYkFZgUotOJrWho8EPTZLhFNUi40gJTQ== X-Received: by 10.80.184.225 with SMTP id l88mr13972491ede.209.1522708954564; Mon, 02 Apr 2018 15:42:34 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:33 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:14 +0100 Message-Id: <1522708936-7603-16-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 Mon Apr 2 22:42: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: 894405 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="c4myxT0I"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FSFr46c9z9s1r for ; Tue, 3 Apr 2018 08:54:08 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 35ED6C21EE4; Mon, 2 Apr 2018 22:46: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_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 3727FC21E2C; Mon, 2 Apr 2018 22:43:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DF619C21EC9; Mon, 2 Apr 2018 22:42:41 +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 E90B1C21E56 for ; Mon, 2 Apr 2018 22:42:36 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x4so30420922wmh.5 for ; Mon, 02 Apr 2018 15:42: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=NoOuJsslD8u7MngS0JkNYqbMms4lh4K/97xJlI8wXSo=; b=c4myxT0I3+Z0vPyaQ3UvQ5Aa1WCm7E2wtcdFCxqEJpVKOgJzKpQ/UvmHRjkJmHX0fP k0XMH/k84b9BYgh6Y43JPi6w6onm61MBukibxaig5SxxiYLdsob9IZZzGDV2PMs1lg5L tjNM5zxNRrWNIvQJrImE56IOAIzWdqL7K+VRc= 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=NoOuJsslD8u7MngS0JkNYqbMms4lh4K/97xJlI8wXSo=; b=ddNWAwg8tEc1AGJSVR0Rbt+0hBUz6zMsa/9klAxDm34INy8Q85LnJ/SmyFzl9NFBih 9xiQC18Ry7UpF15/jQ773CRIJslOQdkMy7KbkU4qjLN9/rwyqr61hxUFKYqWI3gTY1d5 bed6pviLJ/sMspHSX4eZ34ar4Nry0fb1bG7Byi4C21IGO2AlIm26KScy2ZnG95lLxLEv hGdwaOB20c0KWnHN/CPlIn7nRv1tCIBvbJm4wZx4Vwue8HkQYSv9FCD+tuWq4pOz9xZt aWRnZwWNJ/LXOntTN2aCWWMGOPo3IJ2cT3pomHPOe2bNjEYlqx0TnL/dqMzrtXu1Xruy iPHA== X-Gm-Message-State: AElRT7HgDu4skbvb6PQv1z5F3zVj5r0vY2RrFCSKdxHHulEWipQl71eN rRHVWpSMKuD6CQTtqRbPjPrd5033bY8= X-Google-Smtp-Source: AIpwx487v/hEpG+SiL0/F2X1GsMeXrRyfxZOpWiXh+sE+pIe0Nh8lZQGAaQALpavWGzDM/RUZBQcow== X-Received: by 10.80.164.182 with SMTP id w51mr10677895edb.152.1522708955623; Mon, 02 Apr 2018 15:42:35 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:35 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:15 +0100 Message-Id: <1522708936-7603-17-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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. Enable setexpr in the secure defconfig - it's not required for the unsecure version. 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 Mon Apr 2 22:42: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: 894396 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="f5G3dbPx"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS951lzdz9s1r for ; Tue, 3 Apr 2018 08:50:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E7BD3C21EBB; Mon, 2 Apr 2018 22:46: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_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 BEE6BC21F04; Mon, 2 Apr 2018 22:44:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 87406C21EE7; Mon, 2 Apr 2018 22:42:42 +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 E0A0BC21DB5 for ; Mon, 2 Apr 2018 22:42:37 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id h76so29005809wme.4 for ; Mon, 02 Apr 2018 15:42: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=yVd1fav2PFmIPoPApPmBdYX5VkmcZ/lsc1NXAuRRRfY=; b=f5G3dbPxu1Mgeak3B1sgHSiFPHhgZ+AeSkyVuiGzEVv7LkEN9beOLQqZSFM2OCaN+f PsOQL+mwNX/ysH1Zc4WB1SDSN03z4Kz/21M1rYA8sx+PVTMFANn5Be8EHAsy3iLZEIVr OvPJrpnwTboihRUDTij3bPvegeZ5mX/cyu5/A= 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=IFkbU0bSUVsLumgdr3wIjtfQ8HZx55KtkWTrE3FLDKLPtHyJGO3ZZSrXdYqDXwcd+q Pc0cZGf7c8pAGYigGLaxJtJMFwM3fjNvDzXas6EgDdeBeaeI8BhPrAhnBZjrDC2XjsUE dhIjI14zUCgeXa+Xjjx3IVe9BDQQY/joAPujaQnAtl7mJvh12/Ni5RDk3mDJooJPpVhE hDEprWentykcFZn45l0GIoFSh3GOzLiH70nqufxs0fze3N7z6ykU55d65kLGN1iYbYlH TuFWYd1mALhNUj3NbVyClByk5kN9tDdunzo5LmjdhAucyYXFIZPCh8ef3SlQUxbeBJLq 2Utg== X-Gm-Message-State: AElRT7E2K4/nYvNlXbDAdeKqVvu+N38Q05fliejO7gpKnfy8aOTEUTVs rFDNE6htEg/Xp+7+uex98mXUcelHWO0= X-Google-Smtp-Source: AIpwx49iHcxXNEEmPGUJS3TBI6RuOBAFq1RFnxK+RIL7YMcWjM0CaMB1M3y204ThCtwIx3rH//rr3w== X-Received: by 10.80.152.227 with SMTP id j90mr14266005edb.89.1522708956609; Mon, 02 Apr 2018 15:42:36 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:36 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:16 +0100 Message-Id: <1522708936-7603-18-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-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 v2 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 " \