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: 133386 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp848254ljb; Fri, 13 Apr 2018 08:33:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/g1T3G7miOnbfgUGQuIew+YwBVQUJQ+rob9GfaqhETK/dfNQVKq56hY1tUPl0q6+8mODfM X-Received: by 10.80.145.150 with SMTP id g22mr3409903eda.24.1523633586056; Fri, 13 Apr 2018 08:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633586; cv=none; d=google.com; s=arc-20160816; b=gjR4lyKsAXbxS9qL7U7/yKntupHSfKPIViPtU25U/DKGvn+eRdV6BA1VGVcOscfgwn NgPQXa+/gtonM1QjTm6zPZ1cmdtgXGbqw+TcR1EdnvAkAeurslGV+REXUZ1nAE+pyktQ mn2YhiF3/FWk6kbjU6/3Xcv1GLJ8WvuXlEjG3ebr2/zsbMMQ1ePJDj3emhnaAwGmZSeV IDStIn7IXBeoV5pNbdUxhfYONUS1oEWdWqGZt/VpRQ6pfNJJho+kQqWgEGUV7Y20WVtU hQ5Ielgg/EKxVWNL8/THSTWL6eoftlsuYxqYdKYkWWkex8cIgEfC7h8n7MRWHoRpkmj/ PmvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=I8gKKcvg0ChOXiulGqPSbZBiHxe+ezmD43IWCZnxFOo=; b=BXiPRd2YTJnMNYBWUxXlIhTmaoQSnDNtm2ZE9MIQNafRM0OD5FmY5Q1D7fYony4HgV 9sqEUtwtH7E1KmRwJcpofNiqINQ3K1HrlPRHxg79bY3ImjIu0T88Z1jPRN4KwfPo3j69 3G68W7BW6WebEOfxf57b3RaoL9JkdPuNSdNPr9QGgkFJRfuSa+01jnME67vd+IIpVHeQ 0s1wiYTRwh4qy3q6lqCrJ6vPaX4Jl9RC9/XkwmfZx0XZJ5PSyb5McOfTDIj1eBqrTtRT OutVBulANLXg4W22BBv60bqzp1p3EIoHLZzWGlaq0SBU0nGGhxz7WZ1Wm4AK5CGjGgEU MH5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UGGo6qQw; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m28si186799edm.267.2018.04.13.08.33.05; Fri, 13 Apr 2018 08:33:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UGGo6qQw; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id A8612C21D9A; 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-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: 133392 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp851785ljb; Fri, 13 Apr 2018 08:36:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/0RMBi7SCrx7aWH9SZjdFvI028D2FdpX+6gqG6EsBhUxoFYV9COC7GDZ9davCGL4u3HSst X-Received: by 10.80.151.133 with SMTP id e5mr21380591edb.58.1523633816399; Fri, 13 Apr 2018 08:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633816; cv=none; d=google.com; s=arc-20160816; b=CvGMrzrIJ9HKd9eir5br8BZMrmyLxHcNrSIYh+eL1amHEU69hUWS0r3AuXlNGDNteJ BnOe3jEagUdy/VYyUGDb9teORzQsODt6GLh6up+1rIhsi5DW1ARb9a5Zy0YhsH22x1uY Wm5veqMQTl45K9Nguj83+KCguMNKuaRB1RqDnPi9Mv5oxTndQJbFIAAPVyghEPfIabO5 tYAEO8ErW6qtrp7pkYNJFINIUAIWleK1xQYobJ5Sc0tNtRPSMx9VXOPHq2Gyw3m42Gne BIxBZ95fKDgiRYoPsLEgwtICBqVzShPokqwBoHjlPO/0bG/kjuRIRjR9jQO4UIu8NMq7 nYBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=wP/v909xFYGre5ags3Nmyk6UA/y6X71vDRJQXtvrloE=; b=w8u4siQjqLtgTnAkyVNr/BCRZ3u776+QNPxjI7VmA+Ipd50aFSDChRRVOcAtphPlJY zV8Xkv+JtkMB+v3ZAYfvaQBkre+QLAIlK7FwKF9u+o3sRXkmmLTeJtAra9N52rOf+iCq FRZQmIh0ulKl9M6mkZiTwXNW7+PDqBbxH/jpZu5qtMGYXwp1NyWVLJZoTvIzbukJcY6T XGJBaUW+G8Z01O0jMXHHjPGxMBPuwZa4bkEw/1FfsXwlIcSH+wijtuOFVxmDe82epvR9 Vi6iwkHL60u4RF2wWuKz7kvExzMjjMGCyC8owuUuCsvtr3/AJ2VG/O85fGlJGphS3V6f f8Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kkoXpsdS; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 35si1905314edk.410.2018.04.13.08.36.56; Fri, 13 Apr 2018 08:36:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kkoXpsdS; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id F2BD3C21DF3; Fri, 13 Apr 2018 15:34:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_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-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: 133387 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp848719ljb; Fri, 13 Apr 2018 08:33:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+JSCz6Av97GDd0hzpsHsb079s+LuZ9pc+WS5/XeFGkM3wwuX1ain7Voul8WSqdG60L5AcP X-Received: by 10.80.190.6 with SMTP id a6mr20963727edi.269.1523633618763; Fri, 13 Apr 2018 08:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633618; cv=none; d=google.com; s=arc-20160816; b=AvUouUEJqV7QQyiTqbRMRpwutummuQVY2rSWrpua/4GzKJcUmG/QE+BWln2Kucl6Fb jFCR0OGXZY4iTy6kLT7h+I1QTPKfXJ4lB/nzjibPOJuXpdXhclwb4wrGsVzq1ARan85f uEFz7OaeeuZgtzLHVvn62TZ3nZhfimYSo1L9QUN4tTOynVhjpaV9fuxABgTB5j9wKibg 0172/42znK39oSCnSBC1QqRqehIIc5GAiiw2/X+k764F+9cu4o2I5/R3bTKG1TFgkcf9 kkzrVeUmvudE0+htipb7SHUy1GBRc8RNp3JNmiEnA7LBDWALSrfuTeacvdiVLw4px33C Lpeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=1IYszOfkYydCuAHasd4AqVpWZ/pV7C0zaSvkM1I0aGo=; b=eIzZDii7kdEy9YiKSVdzGFvuUEOTHGTUmqi6RreS4jvXeTZPhT59Q0N79OHa9P4PDA EuX4MXp74rLuDT9BgGkJsfR1MpSlsn3C/eeH8NX/jZCS+S7bOgV71x09v6fQjcI8YbHz XHsQwoBWT7ESUlMnW47dQ6h9mGJro4XdUqCuCTsbEhKKHkBw/kFy10LR8F5ybC9mFRMN o5uCkta4CQgsGxj8vBu6/R/qiolTg/ezyQLncn3EwD+MyzrixhGrW6KDSuKhtH/k+bY7 jSGCqI2yrkEbWb0d/FwRkPHG0pwfCgcJtZ3JUfd84D2m/Sj5C9Wfct6kikX4Jt/0vjtA QKcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bVNZcJoD; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 22si1476106edt.374.2018.04.13.08.33.38; Fri, 13 Apr 2018 08:33:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bVNZcJoD; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 49B5DC21D4A; Fri, 13 Apr 2018 15:33: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_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-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: 133393 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp851838ljb; Fri, 13 Apr 2018 08:36:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx48mi7a0ONoxFg306IjMyoxlMW50jcqrHGzap0oyBzDphswS+22lTO2nvQG9pvssdt+N1M6D X-Received: by 10.80.246.3 with SMTP id c3mr20126353edn.185.1523633819405; Fri, 13 Apr 2018 08:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633819; cv=none; d=google.com; s=arc-20160816; b=J87bcGGFWd3GCJz1KIVucAin5fr7yqk6oKFHaBbFnzJlk7x0NG13W7+4I1elMUgBsV bkMoS8764EVr0Q/uDnsMJbko0a6fmOzwjvP1KZceZUPZMF0SFxVZM9lFb0PWR7SXU0NU jnVHvzjp5CauIa+503Vd3gy8e6h7fO99AXq8ysNBFlLkF4gg+kIIq9MRP8P5UXrZNgjw ium2nkN6BKZ63BR7Rys6iYQqBiH/fL8oVE1PKwo+IF2hTqyymH5+glQioKLrevWn6l0x 9oesW6KY7fWjmJJahFBcQkFILm6DIxMf1xzGQW62MSaPHN7aZ9CBjfQeRM/fAah1sg0d gnPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=PVFKhoD/hJ7FG/sTjXPzVm5ZmJa/9+c+6kRkHhcRHRQ=; b=io7a9prjdXtHikWaCNOGwfx1hRPMiNxd7SAqAvoG2XDHGDabyz+io7A0WH6CYG/HXH 1/Lp73UlHa7shQDgvefEedng/pkQNN6iqbw+dH/QrlI1aMyXFZPnDmZBlaDNfEOi6rLZ C+Sq7LzwPi8JLOmz9TxZJB952YYGXEAGFE/KFmzMYXlVlwix5/LdcRZCsJeoYqeV3FLM FxtaPobVg2U9b/paKjNXwJvXgpuCFdZpSNB7I3a9ZjUhCy8JyhHQ2P9g/m3P3Z5Pj8FW b1bIPUrVHB2ELlgCBwlRr9CEx+TR5pXLhJ9kQHR6ONNbBovgHs8AMFw6IX4+qyXTSjfV BYhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BT7BN1Ip; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id y17si1416608edc.117.2018.04.13.08.36.59; Fri, 13 Apr 2018 08:36:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BT7BN1Ip; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id EDFE1C21D9A; 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-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: 133400 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp856503ljb; Fri, 13 Apr 2018 08:42:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx48S/aXBKogKx57/Rl58YzjeCwbLPeMngOQr2eztc6nn1dlnj2948Wl5Yaw5kw8/vbtNxr3s X-Received: by 10.80.240.211 with SMTP id a19mr20624158edm.77.1523634148342; Fri, 13 Apr 2018 08:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634148; cv=none; d=google.com; s=arc-20160816; b=Ko6ST5NbwuHS2BqLsDFRvCU3FjdBBBmQl2sbWecTe/GAUhfCCsy1kBL8t4UJM4DW+p Sv8cdY1A4EMG4wi7/TkzX+8h9GuTmM/syNl+2JSaJcUalniTBluBQO80wTv0tMly45Dj OzSmILv6ofJyE0V02NWugS9AR1p4eGDaQKiAyuat821eapnVbP0rsiUiwgvQ6qgraA5M hbvdsI07RRwy5WvodV2Pv/SstKJZauVxefeCqHrh7MRakKsazrfputKE+SKMXUA22chE kNUR8HvhFDULvQizn/OYQmQPaC/vUWY6H0ExUJgUdANzSfv3Axp7V6ZawsCNVMT76Nui s7Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=rBkpxiGD8KPp6kxNYRZxaaUl6cGgyfdl5DfMU+fQSYM=; b=KESdLNaOhIQ3DBFtf52gbFfM84/TDlNYH3BTK7KlzzlUeXbd00neViyycra5n/ZZNn vH6Xymz6K1Fds/jl01AcIe9MtPyKoKy/3TsiJicmVSN3BCNT4nPLnEunM8P2cvAJw9RR dFlGYBBAJvkx0Lh0YVSQP845PxdRLE0ZBigBUiNDJaVYiRMIGu9snQPveOwCpajXub+v PxEZWchTLJIMRcPPOEoQdg4mHCepr6u02UBetH5LgZbvvIxVt4b1vY/ltT7i92stUy+r 65DylB2SP1b8xPab/tfmbHCQQOOY3g79Mo642ioGs6nN9G0g3P1T9nSAKkc3edthxLnC 2LAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ho8Ej9lN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id c2si3149458ede.447.2018.04.13.08.42.28; Fri, 13 Apr 2018 08:42:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ho8Ej9lN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id E024FC21DA6; Fri, 13 Apr 2018 15:33: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_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-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: 133401 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp856537ljb; Fri, 13 Apr 2018 08:42:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx48B3dhD+I4QDgvIz6tAkPEJR6+/5Mt5bnWmH02j6PVaRFVRXQ8rDvaPDgnCTOYQKwAOszjg X-Received: by 10.80.167.101 with SMTP id h92mr4019703edc.218.1523634151106; Fri, 13 Apr 2018 08:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634151; cv=none; d=google.com; s=arc-20160816; b=RiXEerGuNfTtZOWnHgwYoQsiBOAGtJiHUwSIevYKsZqXghwhuk/mMBenoCHZmDpABK dgVN47QXGO8/CZ966PS5AWwO3OJ13nCzwX1amNM/vZ4l7CWKyL8W3en6nNFJmXBlxCHc xqB0sytvBEze6Ntw2RxsQYDdqr2AttICxMBXfe95Y39sB92f95/SPiU4YLr+QFZYuOL/ 49ejAk2uy+5IJwBh7Pt+mzx10LPsxCvTOZqSDl7Fa7dES520hiUNl6dGoefyj7vStjJq DA/en1AUoH5jPVFrn1cEDj2PHMDm8uAss0efs1iD7+iGAASzO7uB90YmykICI46MJ4A3 2rIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=RRfmoo63du375tRpAsTIK6bsdpqn75A04iMTbsICoh8=; b=V9EkqVbmZ3grbPWneTx2nZKAgXZWpSUAvfLTQnatptco+hGGnfHMD7d7U6MmNS1sZa PVsGN8bzETENyZ7HvfuvP9jagvcgtIjQ15nzEyx/tiGMBYUReUgTzV0mhUqjIjM8EfH2 FhjLymvd4ppQuT2ovADlhM6viYmPb9h208G2kAnKaYjsX50Ey+iJ+SGp4BeLC9YIvClm imv/q1VrRYNonvwKwsZFSGiGeS6BwjhkwHUHCg9ThBVMs8o28uIj2SFMDqJZRp/G3Ew2 6+X67byfqbJid0m914GxCfSX8nDeHv8LxxvvuRsGlAlKG5JaK9b3qpUD4ScxhlpyNMD7 X9EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bulD5IQL; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id r2si5184111edk.294.2018.04.13.08.42.30; Fri, 13 Apr 2018 08:42:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bulD5IQL; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id A2356C21D8E; Fri, 13 Apr 2018 15:33:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_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-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: 133398 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp856279ljb; Fri, 13 Apr 2018 08:42:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx48b+qWTbhQ4XL8k2tn75OzFmk2G5/6dBIbY+4lSH+djQT5c+hf4qPEQY2R0mDN2l8hJoZf4 X-Received: by 10.80.174.249 with SMTP id f54mr20928975edd.72.1523634132029; Fri, 13 Apr 2018 08:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634132; cv=none; d=google.com; s=arc-20160816; b=k9KtHhzxgghmXKgaoZV/7BHSRHA1Xv7tcWVM9NG/ETCcARaXy3uG8WwEjfkvom+aku yU+cdqF6HRDURxGZtV5zwAHfB5wrVQVSuIo8itC4lDRaei3ZAW0exC+SrhpJSxlanMr+ 3Irm7GN2sn9+Lt9FDMoeBNqHvUrWSeOdiJdRb+nNnNv1uLxFhkgANeks9I3Z5ZcPPaIB Y7KvjbHJKCGJma7AAbsQ1z3rKHSTc+cU84hoX4wPEzO3AV1CvOlBY6gFqcTPBC07dJgt JC30ksydYVTZait9jmTKMN3l2pcwGhidc42y7AWQKsNinvUBN+rI8vaDWTiNMDcI8P70 zBJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=Z6W0JcJfnDWMz1Y6D8CblhvPp9xb8XoCYIBU+ObSeHA=; b=SJiruI8sozIHG2sZ5CKZgyZJgXMSPOWbO7N3LKWu5G0Z3+iIVQRjfmm+HZmSIK6ckl N11Y9f3leUrT+FUjI1nIcOKpkGI1/N0eGgj1tYKAZT6b9xHtTDZ/NX5c+kT08QB+BCym cVPVPZ/ZMEBTFcTpFP2+ThF0NHuiKtPhGeX+LrncpILHjxkE8lfjCF6YfB2XcZCMNt60 MoItf52p2wfEvID2Y1m6WuQi6j+PAWS4+c8101Pe2PXKwpEGZxj7e0ULAa/trObBIxR6 OqE1YuigB3wDAgOboAtYersi4GxQrwQD2JcPsHmTMoe5QwwccPfIC/GF0YP6SbGZCUO5 T4rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kfUfA8sr; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id s17si1671026edi.23.2018.04.13.08.42.11; Fri, 13 Apr 2018 08:42:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kfUfA8sr; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id A1E13C21D72; Fri, 13 Apr 2018 15:33: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_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-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: 133389 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp850033ljb; Fri, 13 Apr 2018 08:35:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/NJGZEelexXG8/WjXYdZHw1R8JJAB3+FgoiUBHvfTliaUENA05tQEgyO+VsliCHV6JuiT3 X-Received: by 10.80.181.85 with SMTP id z21mr3004406edd.223.1523633704518; Fri, 13 Apr 2018 08:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633704; cv=none; d=google.com; s=arc-20160816; b=zSV4HfxtGZLn8Kc0nnmB/U/qBHI5QFT3qhBq/RZ7el+IxdrJXnTY3FvApJdDoIk0Lv vM6rwYrzEfB6g05siJ2H3WeN4LcHMxwlXzjWMZsGFUrrh2iacjfavM5TXLMULAXlW1L/ FGPt+05HKgkiEk1c/3pAK+HJ1BzgTC4heuCtFUbOaSGVboQc1uQWWH5h3ixPjAPo7sqb E3LwPfW67s7P3iygA25MfoNvy5zoQcCbVBDnTntyB1yL9+Xo0q4f8HMkiSku3GuI2E6U SOrpLzkJtUUClskp3LyGjtqcTH7Zo8ojQbOB2oXjqw1lA3VYYepYr7TPlAcTnCh0sWs7 FIIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=5cRg8ez1HYgE1u0a/GP8yHNEzI5roO8S7SqpyC9weLE=; b=awuMdk1vXBFMt7htDRCSmnV2MfRormBxvlRUwOQkBYQvd2j7ZJfh/fObb/r/fPDSnI qUFF+BV6xbmCi/MKdc2KruCznaE3SN0Ppk3NcGUqpNslrjGwSC8HjCTeJ15lEp8rR1q+ ZvwmwMC9FOYBLvq/pwLqGT9W9YVW8tb3+3h3iJJWMZdUNsH5U95NVOFTQgLl61FdOv+m 1k0opGzWsYmSEN6VNhQTekJcezomTfsT3w5Lb45dbfcvAH4LNEqBZx+NVN2rMwF3Gfrk XtuZAFjlPUvKoOzDAKggs0KXVS6lCdDm6gqiRf8qEeHc9gdKs8XE50Bb4oYRWVRLEuHe 5IuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=M92yK52r; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id t40si5650184edh.297.2018.04.13.08.35.04; Fri, 13 Apr 2018 08:35:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=M92yK52r; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 16EB3C21D9A; 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-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: 133388 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp849862ljb; Fri, 13 Apr 2018 08:34:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+nbLxvcPuoIJkbJtraIeHr/0fScKFo4rt46BsORiVetolPkDLz7YOE4yyd2gsiHOlBOZ3N X-Received: by 10.80.250.3 with SMTP id b3mr21251065edq.257.1523633692622; Fri, 13 Apr 2018 08:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633692; cv=none; d=google.com; s=arc-20160816; b=Ulgb6GRagwcwSUK65TZqgMKXyX2uQjKtM9kYyLulN4Xn8oCyqTzreRN6PiwjYsTEPj yUjvpdfPNUiW06Xa1NdEeM7N2G0SOfM3sr5LJYZnVR3j6APlHdWTKD4oGGvSN2+qKwFE 8ktAkML0MBg0luor+oPeFi5dFAx+LDcjMFb0WRtTuHCm4csUnmeRt5j61kyixO0qHuPN dBIuk6oa79wMcLRmErk0cu1WUpw7KNHMoYrJLSWeAuDCfTRTafQvWgo3c72FJGPg8NjO WFn9I8MqNfjW+bWPLLJRmbl39jZKRlEJOaOsnwsomiyyn21ET9rQHpemrGZ4WzKuziK6 jjtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=V783Gk5+VApNDVBpkvVMGMrDRqkBELBbYfYcEoPjLCE=; b=X2Et+T7ve56PgOBeXZL+Dn69aNa/NUyCEHc/K2aHVZ8Rhy26X09DI0XfS4pX/yISMN rLCfnDkoo8XpMOL4dPb1jOgWPga0aSJ9JYStyTfYUrqh2be8tJW8++qQHOuGAC1m98mF T9MMvMsYU0sJzwX8YBt+4tuSaJsOw4VKawPRlkDWFO0tojEbUN/mTx5Ig4XburjajrgM JXySRdSa7Br4RfPqiUY+LnGxNWED0aMniQH+WgJtj6jGr8Rz1CpRA3zHcqZlmsVnFi9I ZfPxKneflFOIssXo3bCtLH3ZcqtuGK8evDOPNpZLFtsv4T9qc+vH9CmNCBUHIe7M5bBH Yfhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XkW1Czkl; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id v15si2290405edl.439.2018.04.13.08.34.52; Fri, 13 Apr 2018 08:34:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XkW1Czkl; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 22A7FC21DA6; Fri, 13 Apr 2018 15:32:30 +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-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: 133399 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp856281ljb; Fri, 13 Apr 2018 08:42:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx48gJ/khoahc/o7wzSG1heOGZHaZLiLfHXp/y5djgMJgfauNttwW+LgzSqG9nT8nEsJVCCb4 X-Received: by 10.80.195.6 with SMTP id a6mr21350119edb.178.1523634132280; Fri, 13 Apr 2018 08:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634132; cv=none; d=google.com; s=arc-20160816; b=ITa473O37d6/KlySsnvsW643tCA8GV+/SS1O2HBvB56CRiSKkvzHS84w9S8mmVMAvb vN90OFEJNX8vADDRUl7izEdvw3SQyTHU5oyknZ2ofrSNiTzMeCGBOtZx0TPNHG4qQAFb LKS+Zu4NUGVRAl1M5nolw4IXjj0G5r1XXSXmbml0cnEu5fknEffaiR3GdkH5mylbylmD LldN01z4rMrJIyG5+rvEKn41NAWQtYPqpkxgnTowmGU42YkukpXwqgYZU+jJVLut4rJY 857qC5CF4q/833eY5V2hmBVhYjiMTr9p1qecvLYjJ9UKxl/NRHWNx6rvC/Ohsj9alqp1 ULJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=RmAxXXQbGBxOnk1Z8DYlAjK8h8J46hMi1PHrnfftetE=; b=WA7cPtRAe3tFC80/h7ljq+6w9uoHn/z9AHXmAgZpCxOeb8fAKYPFqD4RA84+EwDEWn 2vJ4lVncxHmxHksPtajgs67oMfinRfnj4Yu8ZAfmt4oEIl3XktRTq463RN0PXATPuxQL Ab1sWM1bjRh7K5b9nI2lVfgtsoY0c2uhroEQOjFEcAeT6gPMMy9nq7u9RIce2IUxtb7S KqR/SbmXfmauUKdq7axSrO8DWrlvEiYRRgmvyEAOq/luDDyGwKpzvJfL1Q4PSDxo4TVY tNL8BgY9PTTKEKmsBqegr17WMxWCiGTJzyetEz+SkEwSpBzgjvjnZqfEmbMReeWgnfyc ZBdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fThyW1UA; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id f8si4572934edm.303.2018.04.13.08.42.12; Fri, 13 Apr 2018 08:42:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fThyW1UA; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id CF920C21DA6; 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-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: 133395 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp854540ljb; Fri, 13 Apr 2018 08:40:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/V7vMBQPVoN5e/KDJofAEe6hI5dHlHqe5g4FboAXs01HK4PQ5odrt1qgbZw70AtI40Q2BE X-Received: by 10.80.165.28 with SMTP id y28mr21065960edb.105.1523634004671; Fri, 13 Apr 2018 08:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634004; cv=none; d=google.com; s=arc-20160816; b=oel2lm4UuQEc/SdNuwg48hJwQMTE1gqOWR4EKWOwZ0oRz4PNGS8RpX89PV1QN1GFSB 5R7T5u5RZT1KCjJDyTuRZILeT8ackMtvkeOofjW9DmNUPWCDlp/KQcPaxmhWnunW2m00 xu5mGeBoGIiZb23BtkEWRTa9+vxoih2Oj8sQQcO5dgpfdLlnHRoHf4PQwFHjD7+DXbds Jb/CEBJQ+wcrfJvNZycLUYHkz3RKaAPZ3u9vegrJThNaKozxBvyUiuKbLqbT4M9sYNdz G5wFoB1kWUTRzs4VyHo9G5wYAPq/hgPOjNqT0D+qRZk/jAUswb5VHsx+8K2N37nlkWLH S1Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=pn8Hvq4XbmzvF5kRpbh+fA33Lc0pK39oKknyiqFVvcg=; b=K/2xqWLaZ6ba1PHt7tfWmqAoE6YLamIJNb8+XD9M6mRcTp2c1pG+yVlqzTngnj3/Av LqkSGwjTdoBakz9k1wEL5zQqrEwtd/nnJ9PTCfq8gHyptnbTU+SgTOaHWTxYDkzRm547 9hO1Pkmj/wU4aslYIVHKrE6m57nrAeqo9wf8Yuc9FH+DNuOHXaIQISaZpFSFwJp0Y93s rT46BadsOYNtjPKI3FFbdn7mr9SDhJ5mpZtG8RWo76R67qg6puacgltsyjFG9HseNChG py9PY7u/06UmpCTCkI+FVuM4ZBPDk3I/1YsV6/OkjnXVmuvcbUxnFIMBuG5ihCHA1Odt I56A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XynCCBG1; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id j30si1081209edc.316.2018.04.13.08.40.04; Fri, 13 Apr 2018 08:40:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XynCCBG1; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 41ABBC21E13; Fri, 13 Apr 2018 15:34:43 +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-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: 133394 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp852684ljb; Fri, 13 Apr 2018 08:37:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx48nnNOC94r0wo9jYBgyNRaVo1Euj/nB5I0ghlNKE+T6ct+3AQvHELBBKpHubHcQmNr8IYzh X-Received: by 10.80.183.65 with SMTP id g59mr21029545ede.129.1523633878508; Fri, 13 Apr 2018 08:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633878; cv=none; d=google.com; s=arc-20160816; b=gbSBwpHweyvYQYxComGtzoiu1Ho2gRLyIh/AemYM6iVPyBBUOLHKPM46W1PvCUZxsn 97bqgNbdyG+SfWq7NL2kZvvoHK0kuXdFUreISpEHD9s3AKQVnFS9FeZ11dImxdYlMHuW 4M9cynVKmY2LL9yNEn2bccMKRRV8m3CxVTJfl/2EoYQF0KjsAIWTgy+7HbEvA70qEnmF LNUkRACBn3IgB9vPjhA6Q3mCfSYtZhg4r/gSl7ZDDgqZ2+8Ray0hi/H+FqjUFyKXkfos pyM0K29lnZjKClfA4bf4BOGjtaGyPoikC95JGmqN/H4rkSDTl984Sqxe24vUHI7iyW9P vQUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=C9UYAeiTsC1Nw4oST2JOhhJIGOzkUXaiXPclmszO33c=; b=h8uFLodEutZcH9/CvQXB7a0R+r7QYHhjlczIhVnlMmHxX/U7WmkUKyZjbh1TPdI3ap HMI+HX/DPmn/0J+bLSlg7wiLZKneO3e0RmT7IPgwtM3KyAi5N0uyZeRRwwr5vwLFfM2x F76JkBmL5P+8XInYKZLsLa15LEaq7+Av6X982wNRyuQU77c9k9XZu9Yb/RRtqOTyXyLL NrSBHKmVDKgvxi/XbcM78fHH4c1bSloPIZ3vRUfk6f0bgo1znpRwugSfbG/wvHhIF04g pt+h0ASXmSbeB0gF8SiyBvtO1eymqTLkgvfWHdsn+QWwr7f3VWctOe/Sp7kpu/0ck8vl g7/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HRo4g0Lr; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id j4si2498740edj.1.2018.04.13.08.37.58; Fri, 13 Apr 2018 08:37:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HRo4g0Lr; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 1B0CFC21D56; Fri, 13 Apr 2018 15:35:50 +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-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: 133396 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp854900ljb; Fri, 13 Apr 2018 08:40:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx49FRvkoQgKa6Z1FEFHnn+iHiQOKv4JCltDVhNWBfSuEtWwlGT0kAKYcJjrGdmQ15XvcIVY+ X-Received: by 10.80.165.164 with SMTP id a33mr20789797edc.289.1523634026775; Fri, 13 Apr 2018 08:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634026; cv=none; d=google.com; s=arc-20160816; b=b7RIWObKtI2fHyQpfm4lNQ2EBVToMKZzJJIxAhDTyZceVUV0QOdXpZu86qAs/gooM7 dwXlQ2AtGAGbaX5/lOBTiGodyne5SaB6pDIdqfWbJHfg5IIqPY5oitF2zuPRBcjjt1t6 f86zGU6WXrHWnkz9std6D3mL7Y5cLvNVO9Aq+GE+HR2gkrbizDLR/KJZTIF89/2ek6Qq Fyg8c8YqM0Gz+U7emz9cACcQhDWCSXfJ7YeWRIEXCHO2kWTxrOC+2/FERCHdSvfk015Y XrohrOgymZ9BpobVGy7zx9BC42bleB1tepU5zL7irnAAtflqdYyspNRFB+SKSxPvDJTF dviQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=QgeunUfCuKN7N9+bM1Yqonc7Lcfqaugkq7UMnxSu9uU=; b=zTKSF6Oo0NTsM92pQy3niSsBLOTWpuNR0A+NF2YP89B85ytgYNvmYLSQ4AYrpW8IUX nJ9gqZfPXmW4IGoGHL4qjNq4F8bmhqgy2/szBOm6bbgZevsCuTUwCUrx/H6ha/xuO12W TMZPuue7eczhDJqWZtb40Y06BHiqI5HnWFGfXPwErLg6iE73AcaKtLKuEjqIovpryUJs jRuPd5gMqnB+B0B221MZXXDmxz3yehRQyNQt54b6IEBluUByW3oC3r9RDdwsy3gcrIuC kgGdjLdGTkEX97XX9W/E/dk6Fd8GVLsiiFPS+gK/1+ZxSET2d23ebVryUKY4ctjIpWBh +N3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fFg2tb8i; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id c8si1336139edc.19.2018.04.13.08.40.26; Fri, 13 Apr 2018 08:40:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fFg2tb8i; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 5C82BC21DD3; Fri, 13 Apr 2018 15:36:08 +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-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: 133390 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp851584ljb; Fri, 13 Apr 2018 08:36:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx48OI9bv1xRJlrRonPqUQyhw5otbsbrxpeyMQcogfhJxyLFeJYrbnKBJw7CMd3RROxm8dW+x X-Received: by 10.80.154.131 with SMTP id p3mr2951661edb.136.1523633802783; Fri, 13 Apr 2018 08:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633802; cv=none; d=google.com; s=arc-20160816; b=Q3/eT/g3QiJ/k3ttMMgZdEXIWZ44BucRqyu3wLAyyJC1zsvboy708mPz7V7m6NqGWr etopJ5VvdVMfe8sZ4BH3qyG54SkZWv2n8SIYBjiUIxLdw8nTzxrX96H0VBe6W3ZaFTYu HSBu41EKZK4x9D1HZBBMuNoHNnO5xkIbR+UpzNuBE0Ozsdwk2QkLDIceZRhiaBHAiUGZ pTOVgA/oe6X/EXkoZhxlG7c5afGdOMXisirpa2+5Vwud4MnEMZdP+JZyuRvHg9RSUsof tro4wnkXX2nvs8Ss20Bo+kTP9mhZEV2HzC3SkjE2IVKJ5uD1JgdPQC7EWNLnQtPDbZFN VaEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=Nwje+9EdbgjXkvFQp12NdA3YQNRAed/bEiUIIndMttM=; b=zPtefW6BO8leVcFiJ5Q7MwVfui+FNlfn/Q9OM85KzN/gNd0GbEx+pnQGNcHc1Ad8qa nOPHbuJndPCrqQi1jbdGkv61ipxk7BORHrYsqt1pY4HPGI7v6fD4Roer0xHOM0O8F7LS eeIXCEwZf5eoWta4aJIIqV0OPu6+zwb4nbXFuzVSWfoNR8A6BF9CZw5ajFAIuQftpPS2 Af/so3/n1v9ScxhMxr2f/34/6VvzI/yniYEt4wXgqx35l2vqJNpyb1vWbpYIuMQDlYz+ Ast1P4FrwO9jB5PeIAFLjfOwtpn9Av48E8no98nyH1KA5R0rVtjKHPhppl8X0IzCquC4 oDFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ke3w+qsJ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id r25si6044760eda.237.2018.04.13.08.36.42; Fri, 13 Apr 2018 08:36:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ke3w+qsJ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 5CE49C21D83; Fri, 13 Apr 2018 15:35:00 +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-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: 133391 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp851605ljb; Fri, 13 Apr 2018 08:36:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/F27fCTmslIdwQkJTi0hYG/GYI77LpjCgFJVATr1ZktVw/X504vgdKJ78ArMJizr6eJN3F X-Received: by 10.80.210.212 with SMTP id q20mr21361817edg.165.1523633804216; Fri, 13 Apr 2018 08:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523633804; cv=none; d=google.com; s=arc-20160816; b=U47kCT7mHy0eMIXTptTy72vDPtSgIgBDupx1vfWJKf53r+Q6gPEpzTyUjUGA4c6tRX btlwbfnyos88l9YFat7nC0p/VbCeLyKVUGo68j0fK8UrzBDPeHhqaCeNOIbdhlEngFlJ Hcd8dM81bEUAZlSBAhUFgSBw/89GnY7uogZvQb1sPmjAlaaEhyxEa8nnR23VEk8FWgPN LBiog0sFeid0/UUmeGXdG66UUvzKgL9ecfG8PL2C2KdP34TZxNnL6SwAChrYwl8wCtra vPNjzEtPHyMz9gS5VyeAY8d6pAwqRYdGiKAd69L75bAxW6UbYHwi5vxq8M6p5/9f9Gi/ aYqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=+3GY7jsHY4IOVIPrtDBTeZp6NikRmdXql7LrHtZGCJU=; b=YnYZV0pnYOwepdSRKCRij7U9C9jp72tAoY01kxAucUDcQLnCSgcugvDHHP482Kztg0 WvgYJMT7xWwsgQeBJqWoVn2WTfofLsMOdaNeDecfR1N04DwHX1gCgc0Vb65SRLr4MRsm F6XNU2AhYe7r3UVwpUJ8TzvgIS1/FSHUM2S2w4Z+o3kQaVi4P6xDpk7MOP4Vi/4Gdm6Z 3KpGzVFgjBimQ7qnqazHJLh8ep11U/8k0Ndhd1ndFXmnP5TehxrUEoy9E3Zkm74ZTiyA CphsXm8lCFZBtntaLSSmH0JVAgBBpJW71S/GDjKjXQwA52L9QtVOGPmQFRyk0AwaCdiP 6Fqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=F52KfFxn; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id b2si1306541edd.216.2018.04.13.08.36.43; Fri, 13 Apr 2018 08:36:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=F52KfFxn; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id C2E52C21DA2; Fri, 13 Apr 2018 15:34:26 +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-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: 133402 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp857405ljb; Fri, 13 Apr 2018 08:43:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/G5sIXz7QbP0XfjeRw1zfPibTZ2erDv1ttcjRbB2+aMeLfLKyiBaBQTuv79J3OmoG1Vv+c X-Received: by 10.80.151.221 with SMTP id f29mr21178910edb.57.1523634212271; Fri, 13 Apr 2018 08:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634212; cv=none; d=google.com; s=arc-20160816; b=PAgD9cM6lN0dY9zoOPuvzOK7yY+qIKQ41f1XovUJDHlIi11w0VgZcwfE8k/ocj9EXw 6uXoLRLFUAwv1ajBSAlosMjLq5OlKgHTwF1TKwa1zn1iS7fx5M5d6h89AGaAVp+TET8t 6m/3wdqTgpPZ68y+lXramz43GOB+k+RlLogxSOQnyw6ZQ3i9e6q5zkZL0bKwTBDE+lTT YtKxh5IPaKUBa6d9TZ66TnUwMYIUSZhoO2HgBfXlywSSr/bjWRJ6gH72DwqXDRj6ffPz 5YHYVQ/bYEFfJ48r9rGd0gSX3dswpAxb1UvKjmT/Tn9BW4v2ldURo6J+4NG1uroPGlCi BpYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=qoPeCX2XyoXCzvWxW+C7t81Oh32pwkNCm2uxiY0WJRM=; b=G0AzotpcA8T5mOBUGUnlGeG7+eP8aRqxbqAAa5C3yVlnxRtsVaXJK8kucUwefM3m8V dIhNM/p8JzZky0j+vzEGZ/PsbmcTYPlAj16xn1eHvltlKeW4MbSVae4Vbn4wqE3HLHj8 Z80EEhNjGnltIKj+COtIjXgYr4m6PrrtE05dan2iiQEnFeS3M3sxxEZPbrtyLlTivHq6 Kk+RwO5QnkhGX19d2nPEFxOHKCyWMdoQK97SaA6Ly24V6xLafDXolk7L3g696EWhMQMf RDIHzykr/0dIQIWkIiT83ahb3Kl89hL5dQ23lAL3eUE96QB3cTxqijlg5G6azKQywg9/ ihZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=g3xEe/rZ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id h33si1848641edd.50.2018.04.13.08.43.31; Fri, 13 Apr 2018 08:43:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=g3xEe/rZ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id D6FB4C21DAF; 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-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: 133397 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp855644ljb; Fri, 13 Apr 2018 08:41:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx483owXIwzgib5aNsxbPOytoREasaazQHQju6HPLg0pAj9dQUHziqoT9DWKca2A0d9LSMe+F X-Received: by 10.80.148.97 with SMTP id q30mr21008338eda.70.1523634087563; Fri, 13 Apr 2018 08:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523634087; cv=none; d=google.com; s=arc-20160816; b=NSp22ZFkaF2ARhgh+Loc6Qa9TUnwsZfoie0PSEhYrzPea11bvbghbwP2MOji92d/AV NfyKQEjqH1AiCS6plVM9hmYMegtox6bIR9v41yT/LVo+9BF3KAUSVKrAxo4v6gHr3Xo1 fxTSmhzw0mEv5+dSLiysMFh8rtd/KpG/kUaFP2fJ4G6KPR3W1uvaW/hoB86cJAKdvtGG 4FhOjSGs6RsUi18ni32XJDcfkcR8v/3f+mqsDc7xNwoVa2/LQvLQ0dILfCDpYyvqMFYe hPP0pojwnW/If6uJASRNq9UNldPxt5WawWbfAvKZASScd4GR0blSLvcLeUXnZE7Ryw5x 2Bjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=+PEQecFXTQRi6QNoMc/OCk5woixB7kz9PlC7HOEfhro=; b=hPnF1BMmejJuhaI4ZgMSXMnoee178I6woZV6wkwm368ty9dOCukl+Q3Jq3MyK5z6Wk Vp4/MIPmWEV39/C42DLeNBOKMcIhiAjT2XjumOmP0wcgFvQ83oo4iHJsGMOUuq89NJyy aLSreuoEPYQS96qGFWM6MFeAq8Mp0kiV3uLiy20uSR7huVd2qsfsMmNBBEasm4x7nzI0 KfI4gIvuiAfu4rB7poPveSZfw3Cq6Guue5koaDzil1FpS6aBkV2XVJUlV1j3CxGgkAPw 4+AzA+Qt97JxcBnvJg7RDsyWUutQEFGbBRoDN+uVXvH+y9rQIbNgz+tRwCDv2rj3uu2t JwfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NZndTEwX; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m8si5814965edl.214.2018.04.13.08.41.27; Fri, 13 Apr 2018 08:41:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NZndTEwX; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 308B8C21E1D; Fri, 13 Apr 2018 15:35:15 +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-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 " \