From patchwork Tue Apr 24 17:46:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134188 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2535688lji; Tue, 24 Apr 2018 11:01:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/HgIsOK7veLjvFlPR6/5jdIhBDXJ0HWEIfIiC78sJr4nrClrjVSr1M6Mu4DthbRMSdOGEC X-Received: by 10.80.216.67 with SMTP id v3mr34686027edj.193.1524592891971; Tue, 24 Apr 2018 11:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592891; cv=none; d=google.com; s=arc-20160816; b=gpMqJzzrdsbWnGrFfH/4robG+Z3+nIXh4k5NIyvGCpEtRX/RZrwFfxoGAQloYD/LHA sll+mktQMfFfHCh5zcJ9i6yWsLVsLx/UlRKSRHnTj9sM9tMZnEdcp1ai9JX/6zw+Ng1d OQGJB6SBoMG7A2M0Ked/99JeKoBpIFmQEkvqkkaOB3Pl3YZ7VZiSj8qP8C1K5norkusG HxLgQeBDqbmprKD16lVZg9pGpOkW8oSRegIXA3BW6xTqEp015tiXSiwpXf4aSHYTpBF5 FTuY3QefUzaDx8QqzOV8IeMAZA72u8V1y6yMaSTiITrNVYUYpZ5ciQVKCM5t+biLp3DX 896w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=tmQIZ50lYbsNtVktN1+49pc69Tg6V2VqBJ8Y//r9olQ=; b=sA3qw/Irk/JAP+KKBWE2yqGwh+RKPHkyDXxWGIiDZO4dSD/UOySWF+Rj68vJwzBXFG 8YGY6gB1nanVYsBlbNH97vFV8bd5dEnTPtUA8quzcLLYY5hscNdf5lToorbqG/E8hZvk KwcGbOAfcDH9I5edWTQl71SIT8MpO0yO4xnhRq7OaXDKB86MT+PUMmJikROc+ZDQ++dB tZTKaHqYbxJTQM19L4ru89ZOYzkKgFObasWm/Vuv66P4AoiKJAaTrdAjzHiyzJTiR+o+ K/f3ItGDOMD+5nFe64V89IPM6kvjgMvydCcuAfNtL12hJBl0kLcxK4qW0MWtl7vA9utE 3meQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CAi9B6zp; 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 v13si202370edk.456.2018.04.24.11.01.31; Tue, 24 Apr 2018 11:01: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=CAi9B6zp; 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 7F65BC21FA0; Tue, 24 Apr 2018 17:55:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2A407C21F9D; Tue, 24 Apr 2018 17:48:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 46F4EC21FBF; Tue, 24 Apr 2018 17:46:53 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 69E98C21F21 for ; Tue, 24 Apr 2018 17:46:53 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id t67so2684632wmt.0 for ; Tue, 24 Apr 2018 10:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qfCt0B89/iYgPDCAEauK+XI6HnI+WNCRSLy8+O4u3yg=; b=CAi9B6zp18UaNtIwi5zThDSgYiqQ6LRqKoDZRGBnpl176eeER58Y04Rw4kcG18SzNz oAeLDNCpTegfzYk0/JXEOdibYQ6h8QYIWMuvd79kxCp1mjMDcJ2LCa6YfS647URe579g o3+imbeQHhJNUpNacc0y6VQOVHwXUFyDiCSuU= 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=qfCt0B89/iYgPDCAEauK+XI6HnI+WNCRSLy8+O4u3yg=; b=j6N54gemoK12hS4ZcFaPnh2DTHKgDVPcB+rPPsWUXT4ggwPEM1pjxTt50B3fjP1aja ECkoLCfZKcCQvT/HXBshLaoWHMZ4qK00wtgoWu0lvt/GjsBeuaAuLF045LO6nwgx8eTd zqPv2pe4Byl9omvmd11y28H+nv+TK9H1B6DLKUWMvbLFv3ugvpixG1ra4bi5zDeTnUAl rt8bh0JxfiueA7Wp+kxgfyIkka7skrVJ8JZpG3TbArd5JG+dO7KjJkk7qjwNlIr5KYkE mw2U08wwCP6wwjkerw655rkRn0fj7/tSkhPbd0iDfLrck9Rk6IRky9lrL1bciVREnFlo GPFA== X-Gm-Message-State: ALQs6tCvZTBw0NvpUAPbyL6kO6wJZn7boUe4pAMlbecTizHWkR1gL2Ju g+yQIEoUluI39qoiZ81iImiQtbYChgk= X-Received: by 10.80.149.219 with SMTP id x27mr34730589eda.99.1524592012900; Tue, 24 Apr 2018 10:46:52 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:52 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:30 +0100 Message-Id: <20180424174647.11840-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 01/18] tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks 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" commit 8519c9c98ad6 ("tools/imximage: use 0x prefix in HAB Blocks line") adds an 0x prefix to each HAB Block number to make it easier for host tools to process the HAB Block output, however it neglects to apply the same prefix to the DCD Blocks directive. You need the DCD Blocks directive if you are making a u-boot recovery image which the BootROM will accept via the USB upload utility. This disparity results in a fruity output like this with HAB Blocks prefixed but DCD Blocks not prefixed - which is pretty inconsistent. This patch fixes the difference assuming the original commit was a legitimate change. Old: Image Type: Freescale IMX Boot Image Image Ver: 2 (i.MX53/6/7 compatible) Mode: DCD Data Size: 430080 Bytes = 420.00 KiB = 0.41 MiB Load Address: 877ff420 Entry Point: 87800000 HAB Blocks: 0x877ff400 0x00000000 0x00066c00 DCD Blocks: 00910000 0000002c 000001d4 New: Image Type: Freescale IMX Boot Image Image Ver: 2 (i.MX53/6/7 compatible) Mode: DCD Data Size: 430080 Bytes = 420.00 KiB = 0.41 MiB Load Address: 877ff420 Entry Point: 87800000 HAB Blocks: 0x877ff400 0x00000000 0x00066c00 DCD Blocks: 0x00910000 0x0000002c 0x000001d4 Signed-off-by: Bryan O'Donoghue Cc: Rasmus Villemoes Cc: Fabio Estevam Cc: Breno Lima Cc: Stefano Babic Reviewed-by: Fabio Estevam --- tools/imximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/imximage.c b/tools/imximage.c index 6dabb13520..6f16d45351 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -520,7 +520,7 @@ static void print_hdr_v2(struct imx_header *imx_hdr) (uint32_t)fhdr_v2->self, 0, hdr_v2->boot_data.size - imximage_ivt_offset - imximage_csf_size); - printf("DCD Blocks: 00910000 %08x %08x\n", + printf("DCD Blocks: 0x00910000 0x%08x 0x%08x\n", offs, be16_to_cpu(dcdlen)); } } else { From patchwork Tue Apr 24 17:46:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134182 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2532861lji; Tue, 24 Apr 2018 10:59:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqfX3ywLl8q0fSQKJth/edTJCQYPW4SER45xu+BZ7oNaVuS0hSzoWm3DGmah6HvLteaHcaR X-Received: by 10.80.163.6 with SMTP id 6mr2440271edn.292.1524592758463; Tue, 24 Apr 2018 10:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592758; cv=none; d=google.com; s=arc-20160816; b=tJVTSR3ndOVt5uszB8vAcw+M5nvhSCf/JzMo2JTkopYIkcH7SGspmX235Lh9q8G7rt N9a00rT+vzYJfmg02ypEvQbhysefD3GOyc9D/g2sWdStJDRerjID4i8Gv0LjbVZJDmdj m2k5+NUMvwp4B9LwoziDNhErkGtw4uGtKT7qnywwiHGSOPFfiSLl4lS2KD1JN7nINdkv fEVx2kaEQlFKs4fMtR5dE85TTIupNW8V6MWSeg2YSh4ZaIZ/Gxj3a73V4bfp0oAJKWb9 661Hbj25xK/Rhps6z+XYdOjQBwReT+fxhm0JKf3jL/Evqfuwy7GyT5nnhFjIIvG9DK3/ 7iDg== 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=r1EmeqFSSQpVQZQK46oAgWha/VObX75N7B063KJLtn8=; b=nLRE6plN+G0HqZG+g2+BMb3FC+Nv2Tmac/LRRl5QC9upHOaU872fgXopymMVNzJ1xb C6MTETFPIjMpSE487KJwhCA+Zd4CrG8BHvrmwUJ9ekzbbHETxYgOOivzPNQ80SMnB52d flJV2Nn5jcrk13tB8FRan7b5z4AbeU38nremE0WmJwVVwP6q401kp/TLev2cWUpqtUO2 EkaUVY2SPzerx5XhhvO7iyxAHd/h1R+IX5CMLpy+88Z4XJnf8bETr0p+EWGdgXSfynsJ r19emUIzLiwAs9LVrOw7DifRGs0x02uD3JrC8OWVOlUNUZfLhlXGDCDS/c+AMZi5qckm j6tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hiPBOmwJ; 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 s19si2245936eda.85.2018.04.24.10.59.18; Tue, 24 Apr 2018 10:59:18 -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=hiPBOmwJ; 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 0E5BFC21F8E; Tue, 24 Apr 2018 17:54:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C6B02C21FC5; Tue, 24 Apr 2018 17:47:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2D001C21F34; Tue, 24 Apr 2018 17:46:54 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 70AE2C21F67 for ; Tue, 24 Apr 2018 17:46:54 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x12so1483186wmc.0 for ; Tue, 24 Apr 2018 10:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yKOyqblyyirFTXF+rpUNwHLLitVBnQ8VEVBPJAYeEJQ=; b=hiPBOmwJjBEqOtvy5FJ3CNyyNbpTgyh7UtTNpeaK8iYP3yBX3iIlD+jO+gar5PXeCB 5dQBzLlgIKamyXakaTsuDmADtKS0lpe0kpT7L5gWGApYt9n9CEiwULKBYQ22vL3ybW+o eyjeb7JqR6BQsjbXExPIpTXqnEEHQCKRKFhI0= 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=yKOyqblyyirFTXF+rpUNwHLLitVBnQ8VEVBPJAYeEJQ=; b=fbNmdIl7558T+AApg0uHZmj25oVlvya8EOkJfGuDc6BgKEZnLynRlHnz/3RK4Us+Be fX79bEBVKcJFKCo69YASHWCAHo6UmPv/E1C8KXVsZG/NQypxWTOE5QHjpTTsSoehV7+v wybDUXf+LKXXHFXL7TLQSxcbNlm80Fn5aHXBcFnlhxPjz/y+wr8XLYzeu5Qmv4UaEgOf ShuVmKS7rzTO2QgeV1qOZ2Wl0gdw/jft2f4GYsWe9qnYsMpRyRwnLQD3HNzY1zv2YKG6 AA3O8R4J2ADjwZgpEYCaa01cZ+RNfVAtHdw/RCV3Ox4HNBZCvU4Fb/Uc07234EoZo4Ua NVNQ== X-Gm-Message-State: ALQs6tBix18hyzyVsbO42YJdFMewb7YcKgeAf/Py7fGwLEsbkL1dwjyo uDTLhNKFZ2bhKaGkChKVXNvacZ+W5YI= X-Received: by 10.80.131.67 with SMTP id 61mr31340623edh.48.1524592013927; Tue, 24 Apr 2018 10:46:53 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:53 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:31 +0100 Message-Id: <20180424174647.11840-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Cc: Utkarsh Gupta Subject: [U-Boot] [PATCH v4 02/18] imximage: Specify default IVT offset in IMX image X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds BOOTROM_IVT_HDR_OFFSET at 0xC00. The BootROM expects to find the IVT header at a particular offset in an i.MX image. Defining the expected offset of the IVT header in the first-stage BootROM image format is of use of later stage authentication routines where those routines continue to follow the first-stage authentication layout. This patch defines the first stage offset which later patch make use of. Signed-off-by: Bryan O'Donoghue Cc: Utkarsh Gupta Cc: Breno Lima Cc: Fabio Estevam Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/imximage.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/imximage.h b/include/imximage.h index 553b852367..800fd6383b 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 Tue Apr 24 17:46:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134172 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2523569lji; Tue, 24 Apr 2018 10:49:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx49cYCWPnv+RTAo2UMZR/WpnO6Ee16CVaqIBGRc9EZYCTU52vMpiAbtftg2ffu3fKTDBKdQd X-Received: by 10.80.148.75 with SMTP id q11mr34817564eda.70.1524592149719; Tue, 24 Apr 2018 10:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592149; cv=none; d=google.com; s=arc-20160816; b=N8T1JL4yiaO9CnoOqElZEWeIEw8W1AYkhKwEsO/WHNnwGe+H7AbzbU7QmMz2yy9S7f Y7CEt5J7ob3TJyh5nhnv1y3EcSzoMNCADkbbh5XEAxSSQZbqozUdkMI6Bqzv6FymIfGq syU5fLxeew8tdRtWf8J6DaCK0JbhTv7e7OjuZRWksJyxp6Jo3J+wOTovSLPc3LhZx7RX 5JTDI+2xklENshlmKDdIrEH2SkH/pNLqoUtgBh4ZpHz7Rb9WCshwAVH/UHHCDQeeyOVL grUTHicsQherFLZTcVLrcSgLMbuZyuYRfBPA23aetxbMK7gwsGz1IKCLGKiFjlkLwUWr Anwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=7ymHt7XOekScpxbek+CZNjUCZuYhimz/fNeetXifAaE=; b=wD2sZWlixGYW5dfGij7p2VbQfMKvgAKsxWHixdxEqO7Db4A4XLuF0CyUGKfkwvZ4+q MPD4CcdaPCymwp0+PUVa4n+Rh6B9U2dINoP/bUOPIyx1X+Kz2pCivEOfiuz+IXDb4nB1 oDoh+XoebciN1mUSgv7sfGdmpcigSoNBQimSWL+n6AVL7e1sewqWcISO1ceatukVyz9y GTxq38QyRR7zNoh5IEB2d8oebb6JspycsyMO8CBmcJMVof95Wk8AsqfRJPRiXFjWa4OC 9orrdEWad4oL/r2pLxUfyyarV0TRk62ITX66z9jv1Cl8NqEjzR5L3UwO4OVn7mVdH+Ew 4GAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KXuy/36T; 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 q27si3492106edq.244.2018.04.24.10.49.09; Tue, 24 Apr 2018 10:49:09 -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=KXuy/36T; 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 3F4AAC21F74; Tue, 24 Apr 2018 17:47:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3B158C21F32; Tue, 24 Apr 2018 17:47:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D7D9AC21F32; Tue, 24 Apr 2018 17:46:56 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 64108C21F79 for ; Tue, 24 Apr 2018 17:46:55 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id 66so2669895wmd.3 for ; Tue, 24 Apr 2018 10:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EkPCXzOdciZFxNMHTTGHkKRoNdn6mN7y67CWCkIvazE=; b=KXuy/36Tw6AJ2h2/GIXwPUy+ndMKUm6qB55KcF5AHB1RIeVO0qv5rGDRvFBNsYnXBy Zh8vHYzvvFdMWrCpdryJc9cGfJnzDuYAcvEbw/qGLY6gCl4O7EeTmeTAN2Q0XNAiHZby 4KGX/dEt37CfoNMK3qN70WzQlzrcncnYqIzc0= 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=EkPCXzOdciZFxNMHTTGHkKRoNdn6mN7y67CWCkIvazE=; b=RYcF2GOjtupbmkwekOqta6Yu5KGmHexQ4tC+cv1dno0nkGV13ArIGTVdFscryy2Jvi yOTrDolF/GClCdCdOXgL+ftZ5b8kUYYcu7Jzww/LomHLFqbZWST+L6Fh4xXjpXNkYxFY VULI4F7p1+UkGpgmNHvsoFmw/XjSFPd9EfBpsAgNz+68OR56EthXGKDEdONScitaRKbd AVzGmMjzAcXirso3xBTkfK4oCm+K+f4dqmK3VqX6UWRnyb86MaQvSou9Yd7dndrPagCp Y8jydEf22/mLbMb6A4pOAQO9QvaWWns9vZbjPBpnTyBm4hPyDl5Byk2hODrEgrSYjWXT mfPg== X-Gm-Message-State: ALQs6tA4cPqiKKIXYYQdHqShqa+EVeaYhfUty39oPP2h44vmE++mi/cd 2BSZIkOGpCLZgZ/AtqSDmccpnkYn2RI= X-Received: by 10.80.183.65 with SMTP id g59mr34668443ede.129.1524592014887; Tue, 24 Apr 2018 10:46:54 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:54 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:32 +0100 Message-Id: <20180424174647.11840-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 03/18] warp7: hab: Add a CSF location definition X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In order to correctly produce an image with a IVT/DCD header we need to define a CSF in imximage.cfg. We just use the mx7 default here. All we have to do with this option switched on is "make u-boot.imx" and we then will get - u-boot.imx - u-boot.imx.log The log file is really important because it gives the addresses for the HAB that we will require to sign the u-boot image using the CST. Since the addresses can change this logfile is a critical output. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/imximage.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/warp7/imximage.cfg b/board/warp7/imximage.cfg index 5b42793786..51a5bff723 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 Tue Apr 24 17:46:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134179 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2530219lji; Tue, 24 Apr 2018 10:56:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx484KdToux4RAGEo8kqWAGXQ03VR2p1LWIHKGGGUHncIZGukZ1psbEBDf227Un+PD+okJ3DZ X-Received: by 10.80.215.215 with SMTP id m23mr28033533edj.19.1524592601848; Tue, 24 Apr 2018 10:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592601; cv=none; d=google.com; s=arc-20160816; b=lpxsyr1fIrZ1inOJ0xcMeoUbCa0BuXZXeLhnlRN7qc1NAb81ZWZP/xndOOFFe7R2v0 PwLAipLuyrDrgEfQx7bvc/mBBdMLctsaCO/SjRPbWSW0/Q/J5K9vGh4Hen0Ed839gzuG g/cz714QSAK19qmNqfPqZQxvq0sQ/Q4YNFQEYaznxESqDd6f0pSvxoX6WLmNxXtmArVa EgycQ/zHmoW3+MoUeJUNTvxcutQ4kTDNJUoFILbIfcc9CJNZ+xnjRJOSovfShPXw+xUQ /fgPto0BhghUFEzRTjNY5pstS5rTsYGvbpxb4tZdOXlj2aBRHRAKthGVcJq4c0gGcS6u mQig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=e59VxYfa/Cgkh+YM5xzbrittduC3TAHJUqoNXSwk8PQ=; b=cxWbKJdhSmlvkfV8M2/zUSkNj2geu9yPucaf4muCA2JxDr/1/nzNTm9q38suAVuEF/ QAtw1WJHzSScH5uCi6nnSB12EL8pmlVwZ2zGEr2xphgsoDabdcUY1l45rP2upFmJgrBI cxZtXxQqriVny+R42Yjv43bfOOZuF+PtLbCjgDx2qL/xMiDMQDT5NnPEnZSQWmMUyTMS 7ERKXlDT4VbZQ84NbTp9iVUAsC0ZjDfDPptVya+yr2R1NHX8GF2KKwa58zvPepc6Qu6k GcjFBmD54e0T+sw8ety6mo6JxZ+lR44Tzbrhmq8R2wVPEbKrM0S7R30LFwbcUYALgymO kbCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hkYojgCo; 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 8si2991414edw.155.2018.04.24.10.56.41; Tue, 24 Apr 2018 10:56:41 -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=hkYojgCo; 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 776CDC21F1D; Tue, 24 Apr 2018 17:53:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 74AABC21F21; Tue, 24 Apr 2018 17:47:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AA6A9C21FA1; Tue, 24 Apr 2018 17:46:56 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by lists.denx.de (Postfix) with ESMTPS id 5E535C21ED6 for ; Tue, 24 Apr 2018 17:46:56 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id t67so2684938wmt.0 for ; Tue, 24 Apr 2018 10:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vJEKqyilK/IAJXVyPhPTBOvlJZRypoCnJv8RPkg6BxU=; b=hkYojgCoa9Ellbwle+r1RFy1lzsV8B5t5A6FApc8JWYA4EZPbEn6v0ausj/0ZzZqlJ kAcXqQLcD1C1sfZCvlaNxvEVJ6SckxGfltz4fvM1jM18pOxi40FDEq8FgNJYi2ak8svO OKbG34r2A+GBFpuH2ILZaDJ1LNJeq08B6n5RU= 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=vJEKqyilK/IAJXVyPhPTBOvlJZRypoCnJv8RPkg6BxU=; b=gznxQ2LxX+wbTBsELyJ2HleLpKOnIlwTZ4aLaWSbZ/QLwelqZpDyZPwPmFcbSybY0r KMlsxKvtPfwJT8n/NcuFGPM9R4PO86srUC4cToDxp22a7u+sWWOiIcbDw3It6U0TfWA9 YoJuWa0jRRzJ3OwKjFwUiub7uTJA/VQ83lh74Aoe2TXMV1cJ9+1iMjHQAARKM66JmO+A bNB+VwJM6cjoaPnsgUwOFdXScuzXiT2m4RvW0kN3LWuXq1y78ZTzwzQQolpQ3fDqQhPk BqyGaO3HRZsoVmcs9OomTzsHkM2ttdWnpDvT/ra+8+DNPFcgUYC1XxhuWGWqAMwngmX2 gYlQ== X-Gm-Message-State: ALQs6tA4jdYI4s4omE6bH7Pe6hrHSR6vuiYed4MTUtVjO/J3oTxkcFgB W44Z2L9RxpsV3pMEYxniN6/g2s6986E= X-Received: by 10.167.211.78 with SMTP id m14mr24316606edr.108.1524592015833; Tue, 24 Apr 2018 10:46:55 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:55 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:33 +0100 Message-Id: <20180424174647.11840-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 04/18] warp7: hab: Set environment variable indicating HAB enable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds an environment variable called "hab_enabled" which gets set to a boolean status indicating whether HAB is enabled or not. Subsequent patches can use this environment variable to determine if its necessary to run a given binary through the hab_auth_img console command. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- 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 327f656c44..0d3d324571 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 0c3b605de3..c6ab29a831 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 Tue Apr 24 17:46:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134173 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2524128lji; Tue, 24 Apr 2018 10:49:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+z3Lkt5iRqeTYfTsbOIy5dhBFpCg17fCP6tziwydFZlZ09EfEmh3OXGQraNJY7z3TjPECp X-Received: by 10.80.177.181 with SMTP id m50mr34906317edd.66.1524592189396; Tue, 24 Apr 2018 10:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592189; cv=none; d=google.com; s=arc-20160816; b=vsTqdYC/Z9vVHwBKkathZ7X1nXfqmg5Tr4oq6wSE+pWKLYu4WepRicags8FgwiCIDW LQPiHqI+UWrZV1vy3U5piXIZ0+GfLxj93nbsAxRCYr+fAyyh5nPN1sIKo18fwE5zsfcr 5giWJ0g3GV+kmbZCmly1UONeLejgG2r5ZLxkKomSFlkp5qy4DerckkC/LO07FhYQJha8 LHLbJzWgJ6MhIZlKbh0AcCKAg79e9AElxtw/TTyjEBwBonlBjBewwpwQbJsVLl7W/DMb izJOT8AY4OGiKveTm9TBajBvlDXExlESKSf1HYlzLxlYNRkIDwjZg1R6bRtCrkaclHV6 3hkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=kn1Aa24UGSfNHaW67NUqOd7dlVeH75NQ/B04MJhAnrA=; b=fjP91Co3OLF9gZ5FGQ5l/l6w5Nw1shWj+xS54DN+Sx8v6rieC5EBy/g+q6Zw8H6UPv 2My+Vdjti1oxhSjy4BSvjCWJD3PoMvgIQZqrqu1wPyfUcZJ2Mano2GkawnP6rfN8+kxU hXdiMMG5eLttNpjjVxzGRwcWYxJql5KOqmduxvDzeYxZVDNYXMB9o7lEp4OX3sLitGzQ lSWevBZBkezcUryINI5lfVpViJGHrcw3FWHuUg2B6hFsPgV8+oGz+PyYBfyjOICudNyr zm1mCAEAlBd5Uac9BvjRG/i5GIqfw1S5VRmiO5fu28nnavxm4WgVbD6DbvhcJKhHvcKd EafA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gAztCWU8; 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 89si1704334edh.72.2018.04.24.10.49.49; Tue, 24 Apr 2018 10:49:49 -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=gAztCWU8; 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 ECF31C21F90; Tue, 24 Apr 2018 17:48: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_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9BC35C21EE8; Tue, 24 Apr 2018 17:47:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 11949C21F05; Tue, 24 Apr 2018 17:46:57 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 71218C21F62 for ; Tue, 24 Apr 2018 17:46:57 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id i3so2256018wmf.3 for ; Tue, 24 Apr 2018 10:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kKU/Jcyh8I5+eaRgzyIZOZpabuM3W7VV3gWccHxzgH0=; b=gAztCWU88nIyv22Cea/R3CvSvVfAdDC1zNsnWYwzkgli0DSQ02u1pP2/Df2w7uux4K oXQbd01EkcY+0/8z4+Az1/eWYEH5Rvb+Q7evUhi1+VSSJnPk+T5zGuWDihOmGFwyvr2G JGw7qXz955ugob9mFWuvTqEKtuS/FmZsG3Oj0= 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=kKU/Jcyh8I5+eaRgzyIZOZpabuM3W7VV3gWccHxzgH0=; b=hfusGWOzBPIZ4PL9ZWycaRQ/1hyWRxXgW4DFKwnPevYljwE3O/miwCku3ily4Kalsz G/Hm/dUObaoguH4GI9OglKZ7UZXCcePcSgmAtgcTsQz61j2/t/XOwfT2yEf8hKTvjxVr d4EE41LLgZThAWAgVmpN22sxbDlkc6BXkK76uRIi0nEHObzvoT2Uog6ikB8uaP6ez4Md 8/6s/EODm4h6BfAfkPpvA7Fjkqw+KZ99JQL5McN4obk8GAj5SEynl0W+rvn8KwGdMiY9 sRk846kfyK4vHk+cnO/oN+orTMqFLds9orL/k1OoXzl/3u02wB7GP6rL7lIPUb/bXljL Yocg== X-Gm-Message-State: ALQs6tCQ3GO+90JQYALijqvZidBF0/mSsqdwuysEQPPwOftlnnOaVI1o RHZ50AZFcxUWr9lvO5JfPrbXBvmwC+s= X-Received: by 10.80.160.133 with SMTP id 5mr28822095edo.261.1524592016898; Tue, 24 Apr 2018 10:46:56 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:56 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:34 +0100 Message-Id: <20180424174647.11840-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 05/18] warp7: defconfig: Enable OPTEE for WaRP7 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Requires setting CONFIG_OPTEE=y and setting an OPTEE TrustZone DRAM base in include/configs/warp7.h. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 73f3f09dc1..75a141b8b9 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -45,3 +45,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 Tue Apr 24 17:46:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134171 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2522097lji; Tue, 24 Apr 2018 10:47:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx49m0RYppuchR2xixwKW64Se7tB0VepmP7vgFf03Sw3CqLIicae1Y0VsQqpBZaYHf3Yp+67/ X-Received: by 10.80.169.89 with SMTP id m25mr34984937edc.244.1524592050565; Tue, 24 Apr 2018 10:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592050; cv=none; d=google.com; s=arc-20160816; b=o0flpYOhQFdrDWZLFS7gPHhLYksrmGD5AqHttIIQ8IuijgEgQBX2X5DxwlREVqxjEY TbbW/Z6un3duEl1z0mTjXcDkbOnzdtntg9qeyB0LeeOsq6gHvqd9P4GummCfJTB3K09M PCb2hu5f4pSiXuy56NeOKxC3y4N+lBomPpgNivEXbDTc6HNDyZIyYoD8u2O88s/4GQKy bzhSJMAE3YIqTSk9fqLsv92iIs6T7kfL6ggrnOf1p2ccyzhDZxzaop4dQc1qPMpCIZ7l 4vz6IpOzi7j8WUdbNDN61N5f2DWL0vkDwLToTKOb09KKJpVIn5V+v2oJCU91x+s5M50A 8Q7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=0XcBh49kzYyl5LB44i2t9XV+ZWRMFykY9MZCX6k/65M=; b=BpAq+Xh8+3+QgNkiD86ur115dDgYPrg+kyNZuCWWC7K+vatP4bOR9+8Wmc0MUMRDAY jf2FT+/XbiszR0M+CyoAXFA8/Z5ZkTmd55Lsee+my4q8wLreJl6mseir6OZQawuzoYPY D4mSpBG3FpPlYvLgrf+E6XkCHfJu6UMyYpqDE311IsDhLnkhQc4Nes6KXYQ7VVoqCweu gs0xtF+BY1cEqQPmgsxB4HjfQMEnkmIjwPwX/IyKlZKT2PShxQ4OXqETDXWxRJYBeF/U YuCf27DMjijSTmUGMjdiqt9rveNW3w0+tCw7GW3wPcQ889qsUG9zPSx3uMh8PaL8mQEO jWng== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IrbJIFJN; 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 b15si412092edh.143.2018.04.24.10.47.30; Tue, 24 Apr 2018 10:47:30 -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=IrbJIFJN; 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 19D8BC21EA8; Tue, 24 Apr 2018 17:47:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B7158C21F59; Tue, 24 Apr 2018 17:47:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5F569C21F6A; Tue, 24 Apr 2018 17:46:58 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 6BA5BC21F50 for ; Tue, 24 Apr 2018 17:46:58 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id j5so2261528wme.5 for ; Tue, 24 Apr 2018 10:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fzreL59h9zv3aEoBkEkGnxh4k3f6J+n3UNaebiP7K+U=; b=IrbJIFJNUalPRzy/h2h1O1fiIVxEaJoL9E13MnbP4sYIUGIPrKRujj5yPC+jz6Pbuy K8rEjCm4cHC/xq6gWz3q6gYH9PpQBVQ4gJJl7S4iFqS+OYUiUZg0dwEaT1tcZSmr6pSq HV74FKXwdyTNs7pqcVjPjEAPOcXIFzxwEJm+I= 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=fzreL59h9zv3aEoBkEkGnxh4k3f6J+n3UNaebiP7K+U=; b=Ij+sg+QmQpGkqU4RhFiHelZsM9SxxpV1n0vh4lXmL/AKo9Ob8Y74KPI8GqPxiUfL+7 oSNQ8vX4nV0FTv4HaLc2yrvpbvcZNfHSv4XPw7GD9OLE7TUyHLow3aUgxhbmScrQxSbc EAvgrTy5MDdv46/k/K2mAEqgoNzj3Xo66/UXwLbHiE/6Ni+fmaNKYT7pvxnocVdWPwI3 JtI/CCKSKx2ZQl7n7uq2stwxBZTgwMqs4LLxzUIJmOIEwTYK6DOzB3FX5DHbvb0qUTwG dF6fImHI3oaxNFcVkNUcEjN3lcFPnHr0wJw4IiAcMMiBeVh8dsi/b1zV9ej5QT4uZNN3 JA9g== X-Gm-Message-State: ALQs6tA8rXOELHWLFc+VBU66l2NG/LfVn1bV3MKdAEBGAK0U1/Qd9JNh PbwHzBV2795+X9/Asqygnx63D1R9abc= X-Received: by 10.80.195.129 with SMTP id h1mr35187030edf.190.1524592017889; Tue, 24 Apr 2018 10:46:57 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:57 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:35 +0100 Message-Id: <20180424174647.11840-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 06/18] warp7: Allocate specific region of memory to OPTEE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size. On WaRP7 we simply define the OPTEE region as from the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE bytes. Note the OPTEE boot process will itself subtract the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/warp7.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 0d3d324571..56f0cdd175 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 Tue Apr 24 17:46:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134176 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2527094lji; Tue, 24 Apr 2018 10:53:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/dB93vnIdTmUlHPqxPJe7svbKRxBJhHwBnCU7scpdJXZqONZ3XjKChcuMh310+UpPAkmoV X-Received: by 10.80.170.135 with SMTP id q7mr34445640edc.124.1524592387776; Tue, 24 Apr 2018 10:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592387; cv=none; d=google.com; s=arc-20160816; b=btZ3r2mcASk15f41sALsnft0g5SmSdtX+zSS9TqwhG3y34k1NMnq2zsbBQmJhG60p5 X02Ho5UjekzcRHRV0yGUuZo8f15Ne18MFqy309lWTFkobmHvPiTCnNQjdYycfcb0dtg/ QsZCkVldhyZ0Cav2GrwDh7ZnqANfL+nvOfy/gusC6CSdLaQPVgYbeALkm0O0Xrw3Eymf MH1sKKhgnJToY7oT7CwFNXamrGtwsDFoLAhBBfc1v4ihkbsUTb2ODWLOvflFXRYpBUEp /9YPTOGYxB9Vl+SvYexx/iQacG3cL1lL8n2ZZrspPS76M45QbJ+6xKd9LegRZb7Rds8t NdZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=Boot6ZqICZsggiJjwpPHMOUmrFk0Kn4/Pt2iNQA1jaw=; b=NgHyvPg9UjE/XawyYE76/gkFCrbnUjKnQj25IlB3/AZcOmVwZNtc+6O4lO+7M5Odks 1HvDMGBHDbZFvA42ujnu9FAXCameyFZegHKfVZ2Ov6d0SyzKuv0XWhhsFEXyRDVr65wz QQPfUS0HJgAgc2cKlZVlgjd3J+/MQdOnr3uTDhlEUkNHUoE3fx4SXHd/rjwKWabdUSbL 6o0rVWiLiTpPjCPYyH9Qvebz33LJelSMjD3y4l49EkcPI110GMy2pbOcza0uinCHH7G+ UIgXBqvhqj8oIcrNNbRTFrt0e3SzXuVlUqhe3j+ek8VhRXQfoP5q4QwMg3CAP2mEx3SG 0EBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KAT+xQzY; 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 j5si209460edq.304.2018.04.24.10.53.07; Tue, 24 Apr 2018 10:53:07 -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=KAT+xQzY; 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 45B74C21EB9; Tue, 24 Apr 2018 17:52:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D7841C21F92; Tue, 24 Apr 2018 17:47:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B6F3CC21F5B; Tue, 24 Apr 2018 17:46:59 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 6D3FEC21ECF for ; Tue, 24 Apr 2018 17:46:59 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id t67so2685184wmt.0 for ; Tue, 24 Apr 2018 10:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8BzIYzpRfFo5NwGhVUm3+UEP9zi6NED7bdgH7ykgg+g=; b=KAT+xQzYnjY5J8PNnHQ04tah66IGiIVSwIZRf0ImZblm04fOFUg8QXwQJj8VdIrlk5 bINVG7tE5T2iHv6pUr3QqbMJJgPBW0r9ymUfDykfKGc072Jpm3imNvB/ZuhpVSAW+/5Y +HOW/hpENdHFWlje4obqCfadRS3XgtaqUfs/4= 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=8BzIYzpRfFo5NwGhVUm3+UEP9zi6NED7bdgH7ykgg+g=; b=TA/u29eb8VSl/XKfe46L3qDb/GpvTJ25/iVNLv9KJ0L0qR8BkwBdc7h+eEGMgHWmNR Sk+GUR6Rid/PGb53hwTJ+VyoHTHkgyM07aek84u+75Hrppy9I+i1f7z/yrgAtgQqsco7 AWdxOyGFiO7AwP0lbCNP76JR8po9eA/721U7yQGfu1QmY23ghkvkEG8aIR/wBugBTs1w x3PNY7oTpyKkImQJ6MfSVusGyfS5o47J7VlIjQiDSR5NBIiXWV0E9bTGxoMVOQpO8Kkb QycvKrcw8iBQHYJv9HOJI4cljeXC6sT7FwRlG2kDzsEdKJwGgr9A2fMkDD2QPeCVr06Z +qLA== X-Gm-Message-State: ALQs6tAEGBfKscPJHJLJjpQuZlK5quhsJ6t3e89YwKBWAVQaFAmeF93N NHQIHHWxGO4/JHeEziWL7Arnb0tSKxo= X-Received: by 10.80.181.131 with SMTP id a3mr1146456ede.207.1524592018898; Tue, 24 Apr 2018 10:46:58 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:58 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:36 +0100 Message-Id: <20180424174647.11840-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 07/18] warp7: Print out the OPTEE DRAM region X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Right now a region of 0x300000 bytes is allocated at the end of DRAM for the purposes of loading an OPTEE firmware inside of it. This patch adds the printout of the relevant address ranges. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/warp7.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 56f0cdd175..da52b183bd 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 Tue Apr 24 17:46:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134186 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2535097lji; Tue, 24 Apr 2018 11:01:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ZggmLGcdrxr2v7vUvhRJxqfLA0XLLinqpDTFcdPC+fGvlXPUyrk7/IgZkieIlfphrBHqF X-Received: by 10.80.143.101 with SMTP id 92mr34240114edy.287.1524592869045; Tue, 24 Apr 2018 11:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592869; cv=none; d=google.com; s=arc-20160816; b=nE0dQfTCG4fGKCrAuN/eELh7Auzm5XhEBcG3Py18F5+vHrsuOQNa0GE9J3EDSK7v14 nj39GdHZLrSLNp1mgQZQlWZVkjoRnDdggUusHLrmh2PT0ntC9N8RXe9dOTWQgJEv3Ccv EI6VLsWelUoMH4mQxeiFG9RbHZ1WoeDpSKFGq43RwZHjHnwxQ6N/f0AkBxpZc50hbUFD DeQtnbvrZHsrQuxk1JFgdBxiSDjqBtG6Ldtad8qj/YiCigCq5cpfmRUKjLokOWKTx8II 5Ul//S4diNfSiWTZtL/qHUSi80ozsdPsqqeBrfAwgP/0SSSRMSpVOJJAY0upSFks6//k 1c6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=ZpD+amR6UfxcvPlqXKu3dt4JgJjAwfwbajyq3WlKtM8=; b=WsEtZUzFRkDg0TTte73XnX+GG4he/IyVaoFw54QqlgPqGpzO5sNSJh0YKWjuUygzPb 48xrZvC7qf5CWHWpTbevJuE1qI1UqhrmRSCPMelZodvDHz5jcXIouYqxmZKzZOJ7fFXI Fd16Yu9mCidvJT/et+k5HrMGELM77zb8qZW6/J0XVKhTj4cfO1xkQL8LAQit4cguc3+y fLrOJWdSRAqj0ZV4iPO+abKwY7U5iupdvXN9SQTPk1QZzF4Rv+yYyXii7KIq8m30slkr BjHbv0AkFN9l20BCQQk1whbgrcCgmdjAPUnBn3WWqle8ECWNEMssSqqLjXbx68cdbTuA hfhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=E59iYMq3; 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 f2si1476720edc.118.2018.04.24.11.01.08; Tue, 24 Apr 2018 11:01:09 -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=E59iYMq3; 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 A3E8BC21F0B; Tue, 24 Apr 2018 17:53: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_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3726BC21F88; Tue, 24 Apr 2018 17:47:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C5753C21FA3; Tue, 24 Apr 2018 17:47:00 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 675C0C21EA8 for ; Tue, 24 Apr 2018 17:47:00 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id j4so2684281wme.1 for ; Tue, 24 Apr 2018 10:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3TaN9kDdJjGTSyseOZIaFYvZ0g5xX+a/HfPH5EbG78U=; b=E59iYMq3CCna2w0mC5UaCp9MXQ+EnAwmrYpkUrfGUAtF1tNHAdZsfUuuTFu91d4cNj lxn2CiVhGmaSkuqBro/Sf20vqvgfw+nY2L7l6u47ZC86jKs27a7GZfXiBWeFUlo4ACbv ywuwI1zMjtI5qwnbIC49S+gDVmnLm9FUGzsxw= 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=3TaN9kDdJjGTSyseOZIaFYvZ0g5xX+a/HfPH5EbG78U=; b=mKzAeu0kzdwtJczhHHt9+6v1SWD5gmCT+G7zbGFliaM5fxHWo73H2PWLbR6dnIlDv9 65gE50u5RZNk1Z5nEG/5+KAXhQTc67I7DiI49A1MhI1HzhNLFXVLA0zlqboNQTd9wZb+ h5waWBIrkEhce3egbPdJS2/Zd+F/PP07IFkfY5RScQiWsR1nAo2DcTpGLlwyGvjLStEr XScGobacSYWz/jh+rm+NxrPOaEf3Ndf3lXlHeupSeisrI8rIO4YRLzIEqw/yR61y9Wpy +jEfAwjr1haT85n8Fq9Jf8MSWWZoeLv1VQUGVV5I9dxDQS2rReTA+Wu0qI/nJeg9B5ja K6zA== X-Gm-Message-State: ALQs6tD1KabFuNNQA38rCMyqoQAbHFj4Qa487Gg0eK1C0B2aShPm567w NJT+k4HT3F3kMer0VaP1sX+laO/x0Ec= X-Received: by 10.80.230.12 with SMTP id y12mr34430215edm.278.1524592019850; Tue, 24 Apr 2018 10:46:59 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:59 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:37 +0100 Message-Id: <20180424174647.11840-9-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 08/18] warp7: Specify CONFIG_OPTEE_LOAD_ADDR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In order to sign images with the IMX code-signing-tool (CST) we need to know the load address of a given image. The best way to derive this load address is to make it into a define - so that u-boot.cfg contains the address - which we can then parse when generating the IMX CST headers. This patch makes the OPTEE_LOAD_ADDR available via u-boot.cfg for further parsing by external tools. Signed-off-by: Bryan O'Donoghue Reviewed-by: Ryan Harkin Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- 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 75a141b8b9..f79c019d0c 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -46,3 +46,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 c6ab29a831..9ae2ca4a53 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 Tue Apr 24 17:46:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134178 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2527641lji; Tue, 24 Apr 2018 10:53:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZooAS0Kbus78IC49mR/FhqOmbzsFuPq0p/qgnfg+nijzNlYhaUZ0qSpSGgp4nHspHwdD9BD X-Received: by 10.80.213.20 with SMTP id u20mr3579272edi.73.1524592433722; Tue, 24 Apr 2018 10:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592433; cv=none; d=google.com; s=arc-20160816; b=VJx8tcRbaXVPhBS1P8R/wXDpu2YNpAFQNFGeEU5696LPnbciyDGDipXS7h8NabW9+C Fp+No46/nrQzuVr7W7S7V5A6UaMBKDWRt0+ZxLSFQ4zIxIa6pacfvKHH8tiqgknYSP+s c30BPK5hY+AW/r0vQLbypL6PNmCBnkLQ1KR7gFuG+yy38oCG72r5mggl5QWaKMQDBOfE +JS/8Yvz3Qs+N7Fg7cVbndd8P4O7uBOE3/Jybcr2yFDWf/uKNx+uwAp77W2LppbzCVko cyZprfN9TRia6d3k8dsTdq0Bb0PgND0XNCTcijn83XOLuZ3dujRcg78zYIEl6vrzzp6e VMug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=8Ii5/EJnJkdT27ZVk05GK72VvtNeTJA1RLFcaiCbqJQ=; b=zJFjIEdQfqTL4PUO5/98S8eYrF9Y/y2UPm7IbWoT3YvjQ6hhH+ByPX7WjFI5aEeahO nUyf47QqiqCw1U3b74l1gIjHOoawKkbXtpgafo/pFj8AHDngDsg8vxdzo59WJhVQneCD kDgrRThBc++K/IZZr/BWnQv1zDeVhoFZc7XlCvnhCUA9h07HATuTEaN/r7kzoxcNO2C2 mdGnI8CcCnnIy8wzcQtGHGcucCE6OBV9UG1alYH85JulLwe8FUwFXQoNDu7s1dWSh+p9 8rW4g6Iwl2Jwg03JhXV5WNXlIlbFRTeIBV1OuTLDG9RHFgRBtKhd6IQrNym+gqf9EH0n 3wpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CZcTEeM+; 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 b26si2642373eda.336.2018.04.24.10.53.53; Tue, 24 Apr 2018 10:53:53 -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=CZcTEeM+; 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 4E0C3C21F68; Tue, 24 Apr 2018 17:53: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_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 119E9C21F32; Tue, 24 Apr 2018 17:47:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 29837C21E42; Tue, 24 Apr 2018 17:47:01 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 5987DC21F34 for ; Tue, 24 Apr 2018 17:47:01 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x12so1483523wmc.0 for ; Tue, 24 Apr 2018 10:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UlVUY0RvQsR8i53fGYm3+tmvRrYPGPQz+D9t5fPhWJ8=; b=CZcTEeM+a34iQrKWJAnqSm/m9k4PwXYpo7u2ljn+FzsqGg7YSYikNQvnhkNic9PDbV J4y3ZgLy20fqYjQCeJUXDFSH/7KsMSjUSD6601BeRjnLj5bYA0B/WjIf0Rm4V+4rPTtC 0uD78sEkLZ+pCkH9CZpgyDldJQMbUOaeIm7FU= 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=UlVUY0RvQsR8i53fGYm3+tmvRrYPGPQz+D9t5fPhWJ8=; b=Jtbl6PfvDKVjEnKZN8WA318Kcj32TmVL2kcgq3LB7TpZjSG0c187uUa5rmjrFu2wCJ QwHmX/wFidU+kU5FQAPGds7qvPVzfWZYRezsrPr1/QA3kO1pBwdQMACRLVRTZFjgOYJ2 yQE8ePoo7juNkFnUTGwGDm9/mHrWzbqNpXZr/JKfve8nrJaC0ItEJW7CL7Yaueb1TbLm CUfemoU0fk+beT1i4dQF270HnK6cQLfGNqrxSWnInnPwHMcfZCxmHQpfzCdqYxxHD+jb jBzn6KwFo1KTvDQaDGd38e6XcrGW8g+xTbjz2UJ9Gh+lvKW9uu8OXCt9/EJqs4UEPzY+ 8zMA== X-Gm-Message-State: ALQs6tBwPOHd1ZW3HfU2kCD3LbVW36M9Q9s6bshOLoABQREKC/WzOBkk 1qUzXTu4gMku8nCfJJI35ww2qe3A64o= X-Received: by 10.167.216.74 with SMTP id f10mr23415736eds.204.1524592020854; Tue, 24 Apr 2018 10:47:00 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:00 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:38 +0100 Message-Id: <20180424174647.11840-10-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 09/18] warp7: defconfig: Enable CONFIG_SECURE_BOOT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Various function associated with booting the WaRP7 in High Assurance Boot (HAB) mode are enabled by switching on CONFIG_SECURE_BOOT. This patch enables CONFIG_SECURE_BOOT for the WaRP7 defconfig. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index f79c019d0c..e251acce04 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 Tue Apr 24 17:46:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134175 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2526437lji; Tue, 24 Apr 2018 10:52:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx49bjRnISW/VcaylJzjtQPIiba6g8szRMESxJ+wHN6E7mpe0TLaIa5DTeRBpXfYqdhHxiayM X-Received: by 10.80.232.136 with SMTP id f8mr34617672edn.8.1524592341384; Tue, 24 Apr 2018 10:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592341; cv=none; d=google.com; s=arc-20160816; b=PiC9nU3Mfx+vR0cS+/u3ApCElNh7Wk0mGKQ9Rau8kGQupgHyyvYnk6jywUpHUaId2h PDH9MTdKroq/WZSDD5EyfvDhYSXl7XlQQzELllPTc3eo7zcX9Ot9YjtlcLdPRf2Q8NWn SLB4l+NBJ9Hpj6CXanWYTsZSQbEhytiBZhhIcLAMrOMg438lCkseg4T01aChrZMHA5XO BYu6ML4Ncf1f2pnNIhsb3ewVT2EYxRhnQWecsCqTjsMfm8fzvCdCOA9C7qeF2sMnhWla IUdt1omHp7OA7rOZCi+kzWt5b+HmKNmCpMpcza2TpYDYcPJa51FCanJJGwHwKA6Eph9c FjDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=Zxqh8otxVw5WuxU2BK2Gw/j1lt9d/xWUPEZQG4bAHsQ=; b=ir4pw0hThULc6bWLJz1fc3XmH1l0iQP/ukZizJyB32Dgxul/sNUKGQkDX+bkIjT0KN ds/cJP+Ksm6JIk+uKyF4lkN6vY5xZk2JKucUpG02bYNuasa8+0rcdb5vBVBRhTbj/LM0 1FoceKJ17GdVrM9tbJeEHip0zVkFRKRUm1618EEmFpJnr5e+sxG4ESggN7TCRfudMEbH p6cPC6L7sMSirFW/l7RaIs+4C0xSb0cUYQDLCnRUlCBaNzjQi6dySu1nZY0EBu9g3s/x AyQqGf5ssAf9triNKv0bUJqzNZjSPmdsG8b7YdhEk+zTxQ6S7NmslJiL8MZ72v5XlViT QlXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LTFXR9CV; 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 c3si132182edd.457.2018.04.24.10.52.21; Tue, 24 Apr 2018 10:52:21 -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=LTFXR9CV; 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 DC341C21F5E; Tue, 24 Apr 2018 17:52:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 79231C21F50; Tue, 24 Apr 2018 17:47:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8B25BC21F45; Tue, 24 Apr 2018 17:47:02 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 6E31AC21EE8 for ; Tue, 24 Apr 2018 17:47:02 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id t67so2685443wmt.0 for ; Tue, 24 Apr 2018 10:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JSTwu/6TFy0B6LrfiVa/1mJN46x0gsguqSgOb42GlYo=; b=LTFXR9CVxq39mNNzzNjJ0cJHoU+44axHYAH1RmggmRosFgZX3M8wmWB3aQngbCZTZp xY816NcGt7xEq4bYty9zA0Z/14qacEmce1HULyq0Rbi+BLgbjRp7e7OobDkyv8sKvup4 2m1HZ2KdsUm3kaX8i9lIjcfFBKlfwaZ9a3vwc= 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=JSTwu/6TFy0B6LrfiVa/1mJN46x0gsguqSgOb42GlYo=; b=em2P37Z8v03PxUhlfilynK3keoIHazh07Wi48/YiTl9W5n8mLC7jhgM4IED6aTT/fF 40LkPqNAPvvMygrGFIn8nbbpx5GfM271DOmasNs3Ptu0s6WVDA4oZQfwN1yFuSDFUApU et/lV+/SsyrSGmFLJBCqHOS28T3iLA/085ZeKT16IqqD9AxNZwoNJE8l2hv2bzDaJpW1 MnjPzJ8sgoqvcS5hvOeWJo4bfAOu6O3kaPFwaoZHhn/NZTCXsUv+EXwO6nvtinz7igxu 2vdJRGfMBuYI5QXwby+1v2APzdIX99Xt7ZtsD8XlJLI5tVxAMQK51j042g5oDOjTstDn YA4Q== X-Gm-Message-State: ALQs6tAV7FaK9Y8dbl/9UaysLbfXQk/0LnxtL6C+ZTC25W2/w6dmz+OE kNBFGI0ZUMlQDX4Hb6O+NolOgGLuOfM= X-Received: by 10.80.180.225 with SMTP id x30mr29366860edd.155.1524592021919; Tue, 24 Apr 2018 10:47:01 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:01 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:39 +0100 Message-Id: <20180424174647.11840-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 10/18] warp7: defconfig: Enable CONFIG_BOOTM_TEE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch enables CONFIG_BOOTM_TEE. Once enabled its possible to chain-load Linux through OPTEE. Loading kernel to 0x80800000 => run loadimage Load FDT to 0x83000000 => run loadfdt Load OPTEE to 0x84000000 => fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee Then chain-load to the kernel via OPTEE => bootm 0x84000000 - 0x83000000 Image Name: Image Type: ARM Trusted Execution Environment Kernel Image (uncompressed) Data Size: 249844 Bytes = 244 KiB Load Address: 9dffffe4 Entry Point: 9e000000 Verifying Checksum ... OK Loading Kernel Image ... OK Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index e251acce04..b72c2262dd 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -48,3 +48,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 Tue Apr 24 17:46:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134180 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2532415lji; Tue, 24 Apr 2018 10:58:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Oc0oSGmur6kWRxuabaV+3XIT/cMKx9UqMSq1W8i0Rprahrqxw8f9jpXCgqlofWGzJZ5SL X-Received: by 10.80.213.158 with SMTP id v30mr26958234edi.167.1524592730689; Tue, 24 Apr 2018 10:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592730; cv=none; d=google.com; s=arc-20160816; b=OCztVemVMLEm85h+XDiVGFe3pdZnK6qycC31tIrRIvHdVWUT9m00nqz88p5y4Meplh 4ZmUqiyi7KX8zVsgoOSFu2xh5ciI4wKKm8OY82BbKSRgTIw4VIpEPuBYGhIxpxm1OUeb QC7mpdunl0f8z+mb7yJTg66dhCxwN/rQabnrV6sRExN3pLQX7S31lINyA1p+SQKbUaxA fytIihL7RV3gQvUxrUWdSyerlcP4gvXYI/EAYUkRFjSpijenoJ+i8mpCvKKirJ1FXvOE ULBfWOGSuWlXycN4J41QsDl7YCV9GyG/hq6kfp+fCO75sHZdHj3V6LafhbvMhBrWxqgm T/cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=E0QodO+iyG2+q9C9meAewMjfVmOdC9ebTZr4r7m0nc8=; b=wDPDq7R9FJpQLh9eWdEeIG5j4JttrFYZc8zUyT1sW8vcCi/CaebKHxt8trrfCwrJfb im/7Ry7Hp4X+CybWLf5e1Q/U4gm253OVngvYNULs2rbiMgjLl2XLbkD7597Qi0ixYM9z jUxuB5hUtQJ764op5gH7TT91/E9fWZRJ0ygkPzRzLOKrY0iGji55sGysH+vIEqrbqQWJ 6WnWsmT1jycZXfJJQimYbZ1FyPafYGvqetnq2HH88w2c6+8z9lqEfvPhIIOFhQaSkD8s SS9CA/kmV7nXoqyHSku8xKKDbJaK4YlVDrOdcf5YZXVbddIv7OOjblwEYS1MI6CRzYtw tbLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UHqpV2KF; 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 a9si5588664edn.115.2018.04.24.10.58.50; Tue, 24 Apr 2018 10:58:50 -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=UHqpV2KF; 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 43362C21F8F; Tue, 24 Apr 2018 17:54:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_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 E5431C21FB0; Tue, 24 Apr 2018 17:47:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 209C3C21FB2; Tue, 24 Apr 2018 17:47:03 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 64D59C21F6A for ; Tue, 24 Apr 2018 17:47:03 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id n10so2250951wmc.1 for ; Tue, 24 Apr 2018 10:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VWnbVLkiutYbj3isBgosE392n6vExkaSsbwdiZDYVF8=; b=UHqpV2KFnIagjyIJnZzOKNAhBOYIqvS+oo99CInci17a0qRhengo2j+eXkmE2rKEHX fkgS4EKAuCxE/VsappftF+dG8dtsuFx3F+DtfONs8qib/YDuZ5jamPTaP92qG4QqlouH 1ae8a0F9sRd7MZxr//XGD3ExEPgMvPV+WGO9g= 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=VWnbVLkiutYbj3isBgosE392n6vExkaSsbwdiZDYVF8=; b=tjfmbwh5+Rkgd7VxOK41gZ+rD9x5nWzeHcc8IMoV6KoPSOXkttDTZ4thQX3RfWDoCF tmDudVzBjN0VhPtfSiBH1R7anpHNoE94BxOBCW+V98Q6YIjPjR8OnMmzT4NxsQKqAGLU pGmo5jSdI8v+wswcC/HccAx7stDPa0usXHAOVHIqowtc2FRU+Ji/yjRlRu9/my7uGFXo V0muwIG5kpTtVdWsswsYLHDv/OwTNjLEsgQgRtzbmTnxADyQkJRCZI5ahPakkqppL4L7 X0i4W87PoviU1I11kSBSERhWKG1fi3pHOtIKm31F+SXGxqsXS6yzQqHy3d17RMPb8a+C 2U1Q== X-Gm-Message-State: ALQs6tBhIOcgFDypBf8gszpatQiyylYbQtojDncFPRTCWNoUFv768LCe zEk0tOadNY16c80fhMJp8bnR4Ze7aKA= X-Received: by 10.80.154.34 with SMTP id o31mr34035116edb.161.1524592022886; Tue, 24 Apr 2018 10:47:02 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:02 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:40 +0100 Message-Id: <20180424174647.11840-12-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 11/18] warp7: Make CONFIG_SYS_FDT_ADDR a define X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In order to sign images with the IMX code-signing-tool (CST) we need to know the load address of a given image. The best way to derive this load address is to make it into a define - so that u-boot.cfg contains the address - which we can then parse when generating the IMX CST headers. Signed-off-by: Bryan O'Donoghue Reviewed-by: Ryan Harkin Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- 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 61c33fb53e..00df19d47f 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 9ae2ca4a53..a92e6758bf 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 Tue Apr 24 17:46:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134174 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2524416lji; Tue, 24 Apr 2018 10:50:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx495XIgW/EOE26srL78ehyDKehPfPYafVu6yARIr/Z1Bv4qti/tfM0ADDOwiu5U/H5wUn97P X-Received: by 10.167.197.83 with SMTP id s19mr17587797edr.139.1524592208809; Tue, 24 Apr 2018 10:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592208; cv=none; d=google.com; s=arc-20160816; b=OdmMatcPXvNmx2L0I6AyUUdbv2QH2XgrnGZyGel1cNtyNhPvNEk0FdsexBGgiGA17C i0OLmkSrxjLBrA2Gl1kJAqAgQDXw9nMKIzYa0ctDtW5nfA3iI5KrY/wzGdCpzNmEkdt+ 1i5Rlwc8Vj2LJhwyVNPrt7V//Z1AFdDDWfljClM6ag5Rkj8G7a9GNecX9NI2vEitLWlB xtgh9Tdna8Ay5aWyRdGSlGdMPG/W7Rt0bjaom3CAOgOk7Y/Ro34gC9wW9ijbufer3aOb 66AV0g7ww54STSZYwh+XH4R63rQmbUz1EfIbpWJDTyUOHo1fHhtN/gaxIw+qaWdulLjO 2QKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=iYNmwW+NBhme+5wDspOAct1opSey9M2hQ0DkF/hzB3E=; b=CnLV1xMT8GRcoLFh/pYAQYBvvRkagKTRf4zOC9Ibeiiu5bUkwE2KG239CANV+jvsvB mWW9RbmdG2m81+kA6KBzxmrIHXoNnATeto7cnmsldjTCQycuOTSzA3oUvXUHZeBDFEqg qobffUTg50eGUQKWldk0ETY7CHp6tvZLD1DRl9nrzF2tp1sDyTH3J8PjaZMX9XUloBDB Nxr1uVmPX9Iu0c8s6H1SnNaZ6P/amLVCxG5ZkLYftlaDVHRRWTWzmNdqj/ZKdx3QTtGy DZG1RzB2jxe/vWkkgdhvz/RPdJ0e5Z0G4qs1mKnLlwAnLzre2Toq/FhN9ogI3qHPXv/k nVaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RSAyFVsj; 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 g20si432418edh.243.2018.04.24.10.50.08; Tue, 24 Apr 2018 10:50:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RSAyFVsj; 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 5573FC21ED6; Tue, 24 Apr 2018 17:48:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AB319C21F35; Tue, 24 Apr 2018 17:47:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 72510C21E6A; Tue, 24 Apr 2018 17:47:04 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 79213C21F68 for ; Tue, 24 Apr 2018 17:47:04 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id o78so2263338wmg.0 for ; Tue, 24 Apr 2018 10:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8OY3zX2k0+thB8b93UCr1TcpJMGILtGhyuQuzgFDZQ0=; b=RSAyFVsjFQXAhatba0mdkExYMWiD5FdNKjwCKVlnf2OlFv+XqLPHzxhQsC3kAfKJaA JZ5+Mv5c4zH1VNItO0t433aLK4NsnUUYD3qtAuDzFThDulHs9r84ChIcnpidziiI+SJa 8r6/rrYBWHA7TYdbcHceVe3oBgAL3m0l8+/mw= 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=8OY3zX2k0+thB8b93UCr1TcpJMGILtGhyuQuzgFDZQ0=; b=qTN/LXf8PaaOljRzJkTGRq3BOFW9xZV58m+ft3MAFUCxPUiUNRf0jnfCtYIASwdqCS I4itXxob8zsNtMFSDF3lSVo3wjp5uxrgGs09BWw1gXX3a4HrV9oYfn78b2sYdR3T4quG lPyOPsc/RKTcdpdqPMgNsT30TRVM4ZIx7iYu80FV7FFr1axxvdsvnAuQjpYPxMg6fRmq D3aTyZvPOU6ujzAsk3CySpvPxP7HpgSLzGBW/Yv/9VkPUGBYBDpcp7R2fHy3kEHzBQSC WHXOMDMrPdGfVZl7RUC0DNPWkyY+s6UvMLWd5YgROGkPn8uSKRUiDR7WvotEX0U+FXLy B4pQ== X-Gm-Message-State: ALQs6tAvzqEOq4Y89RrJX7EjBwK4J85naKz1xoeG1eAaVl7enMMgta1i 1nKHhBCTXlCuK1vAP5p0uoxv2XFKMWU= X-Received: by 10.167.214.140 with SMTP id d12mr17376389edr.6.1524592024000; Tue, 24 Apr 2018 10:47:04 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:03 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:41 +0100 Message-Id: <20180424174647.11840-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 12/18] warp7: Add Kconfig WARP7_ROOT_PART X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Adding CONFIG_WARP7_ROOT_PART allows a defconfig to specify which partition is use as the root partition on WaRP7, this is a desirable change in order to support a different partitioning schemes. The default is the current partition #2. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/board/warp7/Kconfig b/board/warp7/Kconfig index 00df19d47f..c089bca2ba 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 Tue Apr 24 17:46:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134184 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2533452lji; Tue, 24 Apr 2018 11:00:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqExXZZwhp7cn5zi1uri0/wKSIhG4JN9lqXf7F4GRdJRWFM/yyFZk0a2/22ku15tNrvxJKp X-Received: by 10.80.183.237 with SMTP id i42mr4122539ede.284.1524592800612; Tue, 24 Apr 2018 11:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592800; cv=none; d=google.com; s=arc-20160816; b=chRbVRzUz9mD0KRPJ1/MGLr8RGKNOsjw2UjPhIW+OzMARThDGMV12rMkDYahLSN4iO xIqJ77ILOyC2MzAyTQwYSDC5tCWHgFGMLCGMYjZtqTux33L6IZZctVo1OMLvcsqc3FVg TQr8dk30ctWOAu6c8CHLfPRbviqIOyMEg4ST2f+i3bY+ixzjEQZTmloJdNHGeAaI9BNl V8OKEkkTRS83SVTHxxnDg27JlUu7knopwHO4eXw2mwCK4qfN4ACCk0nPo1YW6aXS5k18 u6IiyYW9Z+bdzNxy8B3uKyojMWoUpBuLZE0S4zCmUk29a1d7CfCYck9yxNkTiSD4Mv5+ 5FtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=lSm4YegIvMOUuJ20POi7URG1vGXFROxa7swhUuO9y14=; b=EWjaQQ1tBxDWNfmYkbEKfmAs64hEqKETCnPc/QotDdxfkt+Sb48RNnLjevpZL7n5I4 vjQK3ElvwaY5LuE8/QfJT2zg+2A1+5ZwJt3NJQe/cIKgp30eq5to23lGXN5MQciCBE+D srGCMb4FU8xxonpyPZbYnhB09rfG45QmoGKyJtUdKErvbzQc/2O20nSrw/2Gv0Jme2fA oqIvntCSy/Grog0p9/ZIzMshmi2ZRPbkGTJcLIOtQEs2FpRM1f9ySUtkDi93Bbr1hYQz DY2Zc/1BtYamGVU/2hS9c903mY9H1Bo1RfyQf11Cph7lxd6eR3ipXV1AorNjQ2IAEicV cMwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Mvx/qhgg; 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 g5si3862945eda.413.2018.04.24.11.00.00; Tue, 24 Apr 2018 11:00:00 -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=Mvx/qhgg; 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 38FD4C21F8C; Tue, 24 Apr 2018 17:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 02963C21FA0; Tue, 24 Apr 2018 17:48:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4D829C21FBF; Tue, 24 Apr 2018 17:47:05 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 7FA5AC21F68 for ; Tue, 24 Apr 2018 17:47:05 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id o78so2263410wmg.0 for ; Tue, 24 Apr 2018 10:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y7xOa4cPzJ0yLRv3aj6Wl8C57s/Dp3eESkaRbvT9shc=; b=Mvx/qhggRa0YSzKUp0HM0DXSepX5OXPFguTXKiEjhWFMGkhk2QuYtND8MDEZx3PwF7 y0jh9ExHjHSV5OW8oKqOoVtne4dte4vdgNM7NT/7MSehgHjjROk1+fCuK3gGOqj0MZfg aebqaq3BnrC1R5ullytKx3UGVI6DPL58Nt3Cg= 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=y7xOa4cPzJ0yLRv3aj6Wl8C57s/Dp3eESkaRbvT9shc=; b=oStUBVhtg8wbnfzBKIPKXT1Q6VKem/yCz+p3/bTwTxEYAZ7ZvYpAFBL6m7ltC4pq7g nkSEeDnkjmr5H2+oI5JUwL3ewOpUBMHlizgJeKUMBVjH9MiQBSwNG/e4z/LTk+LqUNkQ 4zSGKxEfMwpYJIqxYBX9scbrHnlN4EQZiZcLSNGAD/vBbBIreb3lUd5f2+3yP/FQWvEc +nlxX6/7N8xFcfTZHXHGgCrtwd1KUuqTg2dFT3nWMhJ011Q2qjoXdRDcoIYlioU+IURL gixIF3MjfyDsjJBqdb0uvFrYxZuJwGaiazgemqaWmm6odi6TXmSA0saOjP8PGqrQlx33 E5FQ== X-Gm-Message-State: ALQs6tAUsh1n/2bdkFF6juD2Bgg9N7iOPkbMcU2qS3PyUdD8VAh9yXwT Sol8YrWekl41hdX/h0SwBIY2WdIpySQ= X-Received: by 10.80.149.219 with SMTP id x27mr34731342eda.99.1524592024930; Tue, 24 Apr 2018 10:47:04 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:04 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:42 +0100 Message-Id: <20180424174647.11840-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 13/18] warp7: select uuid partition based on rootpart X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Assigning the UUID discovery path to a tweakable environment variable means that later steps in the boot process - particularly a boot script can change the target root partition of a particular Linux boot. Retargeting the rootfs is an important feature when doing ping/pong upgrades allowing a boot script to select ping or pong as necessary without reprogramming the bootloader. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- 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 a92e6758bf..f2ee09b831 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 Tue Apr 24 17:46:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134183 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2532863lji; Tue, 24 Apr 2018 10:59:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZouCDHUgWxNuR+pwnF5jbRSHL0I7/cYDL4+XYDu69BmcR5v55Ob/jQ2khjdUBsm/eGbALVE X-Received: by 10.80.162.134 with SMTP id 6mr4619458edm.254.1524592758668; Tue, 24 Apr 2018 10:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592758; cv=none; d=google.com; s=arc-20160816; b=ipJszEyMCwJXhBLOsna/5yFsX+Q479N4y3gKHLm6q4vjGFr/Hb8QS7M63+I27zDbze nRBju6TLiv/1XZm3R/bDJAOuC5nole70crueS3tugyUVAhz4qw86cnLIePHOv7M+sg1Z sC1dbUgry4sUJ8wjgNLR8hOH+PMawwSw6dnDKQ8ZuR1Pd16nMx3/0ui4pvGgYseLPTNS yIjM28NyoSCNcHrMYOkptIqt+i3/GdeN+TNtOYK2EtiqyuJTTohs+fRnsJ0YDMzVfdxA S0+MD5jc3MWh5tRe5uEdVzJz78smsBcUPnuXMdeTBufFuQtq9p/Ymikd7b/oCre0gByq FKYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=4Xiv91R5CP4qnunD5RC5tL9Xeu0KT9sbrxw2FZV+B9M=; b=cHx5GghAuzsljuKYZsOm/u6LxglcR75OqJUjW7nqwxxpteoXxQp+PvciaJ8K0YWMRV v0zuE7Ho256yD3s4G3w+wxTW/w1/4MkU8/L2w8qIi2bMOQKIxCcUyo+oTJFgjy3GSAmC GDwmimv/yn4c6hh+aX8Qm1IEt0M8uyxzGGdxNpY6sXayGZf5XuCsDOjxjB/8JCHcT8Rl XFVfSHRhSBTLTnQENgJ+FFvX3WUkPU9m/OXI99gcagLmCpf3Sb1fcC2JO9kL1qjKVblu uLqacwB4ULb3QIxTQRwjH1qGGrsb523ZoI4gJlXnZfeJ7+kXRZjCCUQ7reqMCsA3tWdh UuBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CjQYX4oX; 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 m88si3916236ede.46.2018.04.24.10.59.18; Tue, 24 Apr 2018 10:59:18 -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=CjQYX4oX; 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 45C66C21F3C; Tue, 24 Apr 2018 17:54: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_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1CB07C21FBB; Tue, 24 Apr 2018 17:47:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 714D3C21FB8; Tue, 24 Apr 2018 17:47:06 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 74612C21F74 for ; Tue, 24 Apr 2018 17:47:06 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id a8so2684318wmg.5 for ; Tue, 24 Apr 2018 10:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K/+e66Nc2iBCAf3pVZzkFQ3xwrc/4tEDYekjiCTug2o=; b=CjQYX4oXEkDdbtidIAqaHFY9CfMvIkUJIG/3IVMthFIdwbYbX37dpzJtwG4rfd9p1p 89IWyh0A0FwlbpWOBbQYjfvGdG5jKjwgthUwiM3kZaSNwEkbjsAiCRGfVPQtjAfkGbSh Xxork9LDX9RYYMI4HweFzBZhL/PDrbs+Lp4Qo= 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=K/+e66Nc2iBCAf3pVZzkFQ3xwrc/4tEDYekjiCTug2o=; b=E58Lcn9NEzGLB/9CeVw9DEuRjuspVn5zg2wK6S8QKNrJfU6hcXIWOgQmoDOKPTdlYf 0at3RtI0ES348Ou3HAVdcr7oXXyBKHPx1sr3eqJ8thkHGiOQir5ElzUzOwe7Uocn6816 m+N9MMyV1yAJCfyX6qpz16BCUlgrbNTGkYAced3O628OELQcbRddQsk3mDG5J8Yhpz0X aSTZYcJuV2i45BqTwdI5paPwIiH2O3vEfjEKuM8ZJznvUNzPxp66ZgzTCcmTZc17LhlD HdC8nbBSuZkQYk4a1sNbflakprTH+uCviqEq/0wiIhRIpsYoY7bIp2R0UdBA/yPro8OI 53qg== X-Gm-Message-State: ALQs6tByQtVK+Da+l+e172K4OBsZVg3zNVMN2QFTq7CdvgUI34w3/B+Q ISm07qI/BZE2D2b7Amb3C3Yl3TKGKFQ= X-Received: by 10.80.131.67 with SMTP id 61mr31341391edh.48.1524592025961; Tue, 24 Apr 2018 10:47:05 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:05 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:43 +0100 Message-Id: <20180424174647.11840-15-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 14/18] warp7: Define the name of a signed boot-script file X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We need to know the name of a signed boot-script, its better to have a separate variable for this then to simply append some fixed string to an existing image name. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index f2ee09b831..53fbcb2f4a 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 Tue Apr 24 17:46:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134181 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2532826lji; Tue, 24 Apr 2018 10:59:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/3ZYtsiksrc6qq0Ql+Qcv9daG3RC70xmYY0FUCNMdIoIMDRdtS5Jsv5qxkt97CrhBTCVJT X-Received: by 10.80.134.15 with SMTP id o15mr33171033edo.243.1524592755935; Tue, 24 Apr 2018 10:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592755; cv=none; d=google.com; s=arc-20160816; b=FtPOMKIiKlNSGoQTnMuhP8iWTmaRd/WTArMsFoSAqgui0IdGUNkOIKDxCzsKrEd02s 9ODhAennGAZaEYQW/rW4GdEIH5O8b3J1SJsd2PyNn1UxLWkdNdws+ZLWPZOAQzkbkbt2 3AxZSQzAGJYFX/lpEttaf6Ig+PJ4CYhligihnhD42A8j0KL+lDBB7Ws0rNtV+2IBWFQw 89LpyG6uxxpcbnwwdSgDVpukwNE7QW05sMU+r1T3LRrlC8suWijSAMGLj7WriUmfpFxb B7Ic8ZwHQKWHLrTWyeH6qR1sUUabr1QdRbBkkERTO5IEoAWFLdrMwwuu5wZUCnRducTs Njqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=nk0e96f14UDZtbp9cR6FUVdXBId7EfNvkBghjz3hd/M=; b=d38E+4WocSm2GkXwL1ftVtL48shJKBO7ZjjOG9/iuLybLlMGsh9zEhEWZjktsU8wny 7mPzB7NMcTmhj0CP90McXAUQE26UoqeXtBLUgMBEUSoZ5oLXpOr7xkd4YrG62CXAJAna KG3Z7wlAwhc7kICNexv+qyMB6K1qKl/ZmnstTfYRUKthkJAJxSkzSCxifc5GnMx4ylRw 1JLUE64kk3IRGjOZy2aXFca/5yklCucKuVI/MtEt+TGMh4F5k+wuUT/wBCy4GwhM2tuV 2g3EIKFQp+47MJosE+S2LEZ7V74StV1Ef8Haa8gTiW1N21w9JtRu6oMzqNfFBuJxW7bm yJoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EAIg6U/d; 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 v12si8653766eda.271.2018.04.24.10.59.15; Tue, 24 Apr 2018 10:59:15 -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=EAIg6U/d; 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 8AA65C21F8A; Tue, 24 Apr 2018 17:53:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 30F93C21FA6; Tue, 24 Apr 2018 17:47:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AAB9DC21F87; Tue, 24 Apr 2018 17:47:07 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 962A7C21F62 for ; Tue, 24 Apr 2018 17:47:07 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id l16so2270624wmh.2 for ; Tue, 24 Apr 2018 10:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7IlQCD3u07uvokxkfd57KyfsyeEq+VXTtO1fZ+Ao0M8=; b=EAIg6U/dOK2ULY0Y2h9gC+/5X3CVt+6vdCkR5t9CyrEms4D9kEFrbbG0kD9GBShhYQ YtcvX9MQkH7cqYCzGC7jDDF7md+jz6WYJgKaXzbhsANZe+nrWlMOxh/dGTh9eao9A04K HBlugI5n6+dJxKQIY76JYMk4F5kxREpYiz+3M= 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=7IlQCD3u07uvokxkfd57KyfsyeEq+VXTtO1fZ+Ao0M8=; b=L9VfHLOCJBCh3w7h2cqlUOEvC6LYITaB9w+mubXyWPwjYJsbOQlbyocKhTAM8mdwFi 32+Ve5z4U0TrwIL+JYndWtC4v7XAcj6ZN8NXl8QmuQX0HhJsKUm9608oX5dLIB9mnueB 0P3A9AFS1Kb89nLqTlvgSM2WIerYlriPIRzFizDU/OVOUt0oHxwUXrIJCx7XY6TyNQG9 Wjgi9ilBzz2lVA+EJaxyD9I0r+y35ifX+FzORaMwSH/wpvsNwAQA2wJ9pEyy+OMhfSix 7iRSbY8rUBQ0LfkXbjfaRf/+a0xv7SoXH7sW0Qrka0UKBYQN4TDaouds3wJeKmbPvuBA b5eQ== X-Gm-Message-State: ALQs6tDq60Thy6pwkLMWn5H1+U0RCyJlPUUBLANNJ6MAI/MSNhPXc36x OdKfeIRYg5Tc+Qn4cfaHgif1NL0+suU= X-Received: by 10.80.182.44 with SMTP id b41mr29290387ede.255.1524592027054; Tue, 24 Apr 2018 10:47:07 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:06 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:44 +0100 Message-Id: <20180424174647.11840-16-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 15/18] warp7: add warp7_auth_or_fail X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Doing secure boot on the WaRP7 using a common image format and the same variable to represent the base address for each call means we can reduce down the command to a single environment command. This patch adds warp7_auth_or_fail as a wrapper around "hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0". Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 53fbcb2f4a..c957b2d579 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -50,6 +50,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ From patchwork Tue Apr 24 17:46:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134177 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2527103lji; Tue, 24 Apr 2018 10:53:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+nVJAlAjJGYKEcaQCCRPvSNTCKAX+6pnHlZIynvWoGpN6AeCVMQePeCx3mOtPixcFEydzh X-Received: by 10.80.152.116 with SMTP id h49mr35192167edb.150.1524592388347; Tue, 24 Apr 2018 10:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592388; cv=none; d=google.com; s=arc-20160816; b=G5FQ4IwW3bZtRcSG9Nw4r3EhgAHtGVpUScKbydlvAJKKpDd2wD58PycrGWT8+nEw5c VdPsh8IcPFHdeYodD+PLB9XeOvPVprPMp5lRQ037ZDUYG3lfQIABZpS1iqrLT1qanABg RK0m6a4sueXZlZiQNV3OcAZqrWqD1G251L+bq3lYMBW4Bi2xv3GolPt875NEpInrgEZF LZWv2Ld+UbsP+AnDZWS/NgfComP7qUmdyvDFAs8H8Hn4lkAYKw5EId8h18r2px5eRyrK ORVnXOPgchK0t32JQA+5Bn5BqwhvbbVBY+jXQvkK3/k9C9DbDEnraeyB3jmc4lpGSgyn TByQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=tDAXsXeBhQv2zKMzXmO6jP3H7Ju1qja9gh73Xgh4cIo=; b=f+x4Gt8MhAfSLFGc7U8Qx1x6SlDZDLR3FgKqFz4xtUgZ9BYcDVQ0Wesxg8YfIiir1q YpyY21fKv4JFsvV4o2zqY8Bdgmhbs6ZDpAk249PwwPZ2iJBARRIw4vldKf6QWDJc0pUp UT8j66UgoNfnKv0AKCzA7cjHB6AorCeCbZuQRryKDldPR9g6dMYhzfNg7Vo9rZLXvppw pGbxXNa4ruY+jX6BqllQjoiwVoqXbe5NbtBfqXqtRzARYTiAJMIuoq/leLc+mg8rcArW LYlcLO82acrO+HMiOrtxzXrPauKeuy+4uSGb2IYa0auQMNaj7xT/21EMCwKeapHNisDn 80hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Q7/NebHM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id i41si272927ede.346.2018.04.24.10.53.08; Tue, 24 Apr 2018 10:53:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Q7/NebHM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id E3D2AC21F1A; Tue, 24 Apr 2018 17:52:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3132EC21F8F; Tue, 24 Apr 2018 17:47:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D6A9EC21F95; Tue, 24 Apr 2018 17:47:09 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id B4C3DC21EA8 for ; Tue, 24 Apr 2018 17:47:08 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id 66so2671124wmd.3 for ; Tue, 24 Apr 2018 10:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ky2Brv8hbcba5qiWCt8sh3smlDw1vzlLhmoKUt78b34=; b=Q7/NebHMWQ86FHT40wbnMwhOoRbe+y0b8yA3t+Hb8zyekM9pEKUg2ZhZRwK4uFCj6d iVxO36Tbyr15rSmk0/xnZKRWNyERcMTOzyClmW6LbGpLYcz5/YQCC/lgf5GW2ycmORpK +hvXXQlv8qL7s5HTh+0UZSRn+VIKg/gju0bNQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ky2Brv8hbcba5qiWCt8sh3smlDw1vzlLhmoKUt78b34=; b=g6M9TGtAvrJXlfkX+24R1lhW/XOb3dAqoL3ljB0dyzrJHvJKFp3rvv01K9fx6KF6dJ HUjCTeRYvIJedRfalivLKGQ4qXFJqkrA/fobKzAhyqzBd8Ojvp37kw8/Vfqe1sFhKv5S eLNmtBcCKg1cGePPjVpFh1sW2LnqVEYdZ7/pf6TQMRh+EAr3Kcn3KK5bWuKz1i271KPK fcr5WktRN8WAMmS0Gsi/cIf/WJnij936foZIAu+xrZCy3UlQ7aB0LlDePeh1surOvyvk 0mngvRLM0WJaB4HWMzEFWdlTWL8Z1toSfADHQ/q2fyBMM/bVQj8iK4HuMS5cFvCl3LHh hBDg== X-Gm-Message-State: ALQs6tC9qNbZbhHoXHwCsOi5Ik/ypjPwSps9Up7sPNo4elea4+ztoBk1 m4Zo/vUKd7ytFFEKiaq+pDZsYyy9/V8= X-Received: by 10.80.181.227 with SMTP id a90mr3165741ede.69.1524592028216; Tue, 24 Apr 2018 10:47:08 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:07 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:45 +0100 Message-Id: <20180424174647.11840-17-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 16/18] warp7: hab: Set environment variable indicating IVT offset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch introduces the environment variable ivt_offset. When we define a load address for Linux or DTB or any file the IVT associated with that file is prepended. We extract the actual load addresses from u-boot.cfg and feed these values into the code-signing process - hence we want u-boot to have the real load addresses exported in uboot.cfg. ivt_offset represents the addition or subtraction from the load address that must happen to find an IVT header. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index c957b2d579..3b1e7c7e88 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -10,6 +10,7 @@ #define __WARP7_CONFIG_H #include "mx7_common.h" +#include #define PHYS_SDRAM_SIZE SZ_512M @@ -50,6 +51,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ From patchwork Tue Apr 24 17:46:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 134185 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2534289lji; Tue, 24 Apr 2018 11:00:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+asp3+YVgwv6tv1XHySWonqP8IdlxjWc2uw/MFh+mogIUW8j5FLT0eRy1hXsqKsiiLgqbR X-Received: by 10.80.131.7 with SMTP id 7mr33335048edh.263.1524592837443; Tue, 24 Apr 2018 11:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592837; cv=none; d=google.com; s=arc-20160816; b=mulJUnKUe3tQnPRYyjY587XL5OrfqAjMtgnwTLC58Uzw/WvgWiP4q8mC1cKF7NfPd1 dFfxjqFBNcAJqmZ4Mlm0/f5KlgQViHJG6FqGTGyl4tyOlhHINuRmhuW+HD3uH0yFkRv7 ckPXKVDZKM3XHavnKkhILUqSobOpzsxif0vY/9q82xdZFWj5d5fJySx5PxSNK/Cf9pxR 8V6zqNZvgRth7TtcfTfKVgTlnnVZZ/M8tGhoKQHUeAT3JyIcKvL0wdvSGxLvBQms4mt5 DSWz1+3BETaP21XMAJt69taJ73KMPZy7NvIyjbEeiQHd0oHdqyboGdlo4ZJ8MUoL6d7w 7F2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=7CWUzUCC4o/rtfaBX6GeoX9NWMneEwgti8gyI5lANjs=; b=f3cL94taL5gKmNN66cPmWtI7+QYHq4Ik6DLgzJbiQusegQNWV+dQl8eDbS6S3IzCvM rcao1cueU2phKmFcwBykvI/CkwK/nkOaq0ffJgn8OE/l/gyr4K5BFE+8cYlpEiX+wSZ2 cqyXYG/tiqqyExqjAaL0/ydOYNmVQbYzd4BCf7uV6Noj+TD+Rjh/IX6F387zncVBx0IO zEz5b4VD9waDKTfae0HZoanV/iNavrL6LblcA7UMP+VMhx5FDyIfxcGKS4U7fDMy5DTu GHAA1P72tC4pK8BPQmKfD7SZK3tbTl4E2CNYQz3DfNbIdXxYTRRNdWWaxU1cy7dysROg flCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EL6tagl+; 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 q6si1957070edh.448.2018.04.24.11.00.36; Tue, 24 Apr 2018 11:00:37 -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=EL6tagl+; 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 9D788C21EB9; Tue, 24 Apr 2018 17:55:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0466AC21FC0; Tue, 24 Apr 2018 17:48:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1DE48C21F34; Tue, 24 Apr 2018 17:47:10 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id B5991C21ED6 for ; Tue, 24 Apr 2018 17:47:09 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id j4so2685082wme.1 for ; Tue, 24 Apr 2018 10:47:09 -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=jE8qpnQLnU0+3qy5fm/oT41PasTm8/KNJdz+VQiXGMg=; b=EL6tagl+VJw7Tx+CGCZpgyNajxOoMI4Yh7S280CAcSCjs8lyIb5r+ZvcisOl6jRgWG xBKVLpVcCBIsIin7N7DC4ophFt2i+5Z/d2bTC4olkqDDGhg3iEamLIyG0vyLhApfXx38 VT7pmDNrvp1o/PO8VBQ7VBODy5NnGaIB06g60= 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=jE8qpnQLnU0+3qy5fm/oT41PasTm8/KNJdz+VQiXGMg=; b=dJQfGLyPx1jaW38gEXOBkmC9sPBbarDQeZm4Qivy8m0WXd0TzttbzcwgWrOKyAYt51 N4u3fi1Y9yrHph9prNSssL1hFYPHEfChxMjo1uXHXZqoq5HcfIiM3MjOrtTLW6fx4LDd PqUMMwHASDtbVHQIHRvLiRfH5DbHNhh5t0tQYuEAm9WQHLUsDb/QutlFy8ZuuDbpN0QM gEhZrvXJLjbj4w0t7IfSQb+y1xcYw+3sgOfLi8jTz2C3i9aXbY+xyXeiaq/NkrLBOlbz oIqVms4FNEVgrBpENRQxtM8wJUAm6VeeGBbMyTjLno3rAegvXWmFYoCjs2JGF+maMrgl 4Lng== X-Gm-Message-State: ALQs6tALJBNTYG43fkv/Tcu4YLu4jWZ+TG2wR0yy2kLODR/dOjRflykP CaTVN9/ALP/amDpJdJhqQw95UzOZbJM= X-Received: by 10.80.183.65 with SMTP id g59mr34669370ede.129.1524592029189; Tue, 24 Apr 2018 10:47:09 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:08 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:46 +0100 Message-Id: <20180424174647.11840-18-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 17/18] 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 Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index b72c2262dd..b936f4aab1 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 Tue Apr 24 17:46:47 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: 134187 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2535680lji; Tue, 24 Apr 2018 11:01:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx491lUYwUxFGeM0sQ/CRTzXI0fFJD/8d6NC1T+gWJJyc1JLk+X6ynojHPvBoKkCEaC2EWWji X-Received: by 10.80.226.193 with SMTP id q1mr34468668edl.253.1524592891829; Tue, 24 Apr 2018 11:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524592891; cv=none; d=google.com; s=arc-20160816; b=l9Cf5qPZzJV6NjrmXst2ebx/4+Fm8lx8mStHJ7FBcEsWhbQY79ehEryYeq3gdAAK3Z ZWMk6S1rDwG8qfe8kTHwW9W5ZIhDaCiEmAZwg/RVYxds1R/VP/AWJSzDdNaZ8isXowi+ BSstLRZtSBlSz1sjBPXpSLyK7dH8QLWDiy8mp6+OhmHYosCNBFuaViQhNWYZNIq5q/tE UyF0FYwxFB93QCbeKhbqndA3H3XAvyonH+g2hvo6nXnCTBkVTYu1l/q7atHuwscAQAq5 EpzNm8n3KaV3MSXaNi54Iipq8BGhXLOky+3/ylY0xEqdEHuhvzl2SRorvoIutIfkYM/m EXUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=/HZSKkKZ4rY1CdkDII281APLGTWH26En28DtsqGxGN0=; b=uq7+quAeqP6jdj4eRQM8r9qXiyp5KIEuuH/tZmdJCYmyg0Xosi/Z7mzI8CSOuWqQy3 036F+ZQFZho06eZ40Uo/wdVE2Ss4F3Sg8ckjQLKKl4tc4BedM2UmDXTG0jrflm4rvTAV 2f4kF7TypFUdIik53vej4j6iyCkbIZikUQk/lDnMuRXh6DS8TCj3mxmBmH8ewk2ZS3K9 +ktLn3G+xTPeeQ8lsvVaozJkvEHea5HlfOEDcj12Q887OX4ByVOrLb2T7NdRImefHXwA HLD9iTSS/f1BdWF4SlzlSLLuyMOflPuCN4+z2H9C9PWZAnizGlk1N5saXLLpN0tcDwlp /X1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OxHGJlHf; 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 s10si409118edc.383.2018.04.24.11.01.31; Tue, 24 Apr 2018 11:01: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=OxHGJlHf; 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 083BCC21F9A; Tue, 24 Apr 2018 17:56:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 09486C21F17; Tue, 24 Apr 2018 17:48:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5B49BC21F84; Tue, 24 Apr 2018 17:47:11 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id B3891C21F62 for ; Tue, 24 Apr 2018 17:47:10 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id w2so1490734wmw.1 for ; Tue, 24 Apr 2018 10:47:10 -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=DMf/oA73RNxqj0+uoeZ2gY6oTI3nNq2R5BQmzqtkL5Q=; b=OxHGJlHfRz6e3d/lusSaigiFQxNX8Yn/zqvmHPhhiFGVjLyLxcpzLv1f+atD3yz1Co ySAVhFUrAnS1Xhg+nvhGrtqmCGvIuyB00hxLTO2Oo4zM75xX8xlrmOuGPPjOfwlDxOGY O52wsczbUJNLURoxID5m99QPzFwBpCvxVLZJU= 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=DMf/oA73RNxqj0+uoeZ2gY6oTI3nNq2R5BQmzqtkL5Q=; b=W0r6SrqpaV/3+gDuh4F5257dLxGSJr0hGjcG4ChIlm6/7ia5hFEWI6bDyX9VXczASC yF94yY2vV7r84WXyXve76kpACMQvlXCLKD7C5CmfQ/4UsfZ2SbGG/f03HjAgGDZkxB9F mpEHDzbZUqNunRjHmqV5NC3jA7oTowumJxKnEX2niFIJqGg/3LBaGf++89YgKcb0oBGq pk1CxU4jhn1BgybFOLir6y8wfUylrdnPkZpPt0LxWg0ztmLmrh9HvM2FezoVZrFc0Hcb agK5lk+98J8E4nG2zM4wkC2LUabPIrQhHQQsPYq4bvs4MASBDukqOpMUIkJsQBGGjtDt 53Yg== X-Gm-Message-State: ALQs6tDJbNony/a8Ufjag0PbIyboTzF4JhP42QQEccck13+54fgvJWv1 pYKhMVmL9AVtJ7Qzcd4pHXMZGI3krzg= X-Received: by 10.80.135.14 with SMTP id i14mr31410626edb.86.1524592030171; Tue, 24 Apr 2018 10:47:10 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:09 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:47 +0100 Message-Id: <20180424174647.11840-19-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 18/18] warp7: Add support for automated secure boot.scr verification X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds support for verifying a signed boot.scr. With this in place it's possible for run-time Linux to update boot.scr to set different variables such as switching between different boot partitions, pointing to different kernels etc and for u-boot to verify these changes via the HAB prior to executing the commands contained in boot.scr. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 3b1e7c7e88..c9be70ca2a 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=" \ "fatload 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 " \