From patchwork Wed Apr 25 13:18:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 134290 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp860687lji; Wed, 25 Apr 2018 06:22:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+cvU7k6OJ6mDps12MjaZfOjt6T0wfvsjPPa4SpYbr83wfiNg2BSX4vXu2ole4+vVt6SFiA X-Received: by 10.80.136.51 with SMTP id b48mr39283370edb.274.1524662524266; Wed, 25 Apr 2018 06:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524662524; cv=none; d=google.com; s=arc-20160816; b=B9GzNRjKuHzQnZ/0NJ7yUt6gSdNTxetuOAM0wz2475hgItirlvTBl80h0LiWk9Fd8p c/kG3KSc3ae1lvdajJqiPzp69CpGPFcopeglAMwQcAIBQ2PXV8xbYge3RbKoWPlZq13U 2MBYP4iBtI3IhCoWJnsNdDc7fITVdy3Y7oIjopsAxiHZVgLU7xUxycMr4tDhYo2NCSIt rjq3Q9RnEz1UE7Q6DCtvVE3Kn60cPO/ryiRtvdtlbrm1gpJ0fa17VkHdtWzda6swbbwH F15e2CkCLVesR14Us6xlthfEEGBkCPBYKn4h/3VBxe4DbROa1UV4wEnH8tw826aRKLZG fBIA== 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=xtHqDWBkhBYo/Kaaoiv27WwYaIkilbXyyHWcjcw0GZE=; b=BeBkxDEPeY8r/mHkkhQYUvM8RDi0fNFCktsIjwXzYPTDt1vY4e1DSz8AdhscZfuC4j VEOjJ7pusS5HVDUVDQm3n6j+sHqmhIChsg8elXkNqj7Vcxwk/8qSWX46MLJp+OCKGe/a DOtCEcUtZZga9BiPdX9i6vrPP+U7OpsV6e8ffLyqInKJ9YEU36ci2Op1OcBVM8ZseRXl XaOpT3lxv32Hrdycw+GU5kCU0ar33+n+CoUsTEq056u4EsZP8/EP6SiYsamo75pvmtMn gHoZPmw+b9thLM5d7xmwZmCZlzGUao4nepjDF9d/zJzfJDRlGyOqZJQ6XPhYKhPxhSgZ VKWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UQIf46AX; 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 z37si11272294ede.315.2018.04.25.06.22.04; Wed, 25 Apr 2018 06:22:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UQIf46AX; 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 BDE8FC21FB5; Wed, 25 Apr 2018 13:21:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_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 164D4C21FCC; Wed, 25 Apr 2018 13:21:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9D1E0C21FD2; Wed, 25 Apr 2018 13:18:20 +0000 (UTC) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by lists.denx.de (Postfix) with ESMTPS id 934F5C21FEF for ; Wed, 25 Apr 2018 13:18:20 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id m13-v6so11228829lfc.1 for ; Wed, 25 Apr 2018 06:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=e3Tp6Ael/LbmsoyUfp9JfVFH8pYhIbfPTxta3jZ7mU0=; b=UQIf46AXWeoWGx3DDJGQZPE0HWAzBYsb2lJorTNMW7iIIeocfKfP1MuaSSfT3UUPcb TcJYjaTaplT7/4gBE08h7ZkrKFantWV+5ZV9uGnwLYzIvIP4oOiM43SYejCJNUH70F8e /MxvmWQVJqgjCBLCtzJQ/ENDA6Yqge+nY9fZc= 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=e3Tp6Ael/LbmsoyUfp9JfVFH8pYhIbfPTxta3jZ7mU0=; b=m4Mkz4G/YQNLmeJdjHRy+mkwWd7fSI7cRdH37sT9Elwwkde2UsZIog/GFejONU+MSN b77HV8CtQv7H/PbIHaiaWuNs0VIRJOa7dHUBK8mFUizoIYZGjCuFTmjjw4qL/ynndEE3 A24qvdEC6pNp4MZuVFWx0M9MbBvEWGXe28AfL/Ia+xN63f1w27m5CFB3Vxzupm2Rh5xv sWkFMU6ltXq4uIyUF2O4pW/lN+6HT1NNUT83dJSjiksxKVIHbJ2sPUdbdX6ehp/n/4C8 ysBFis9bmKgTDILuuWXB4fOGb/Ez4nAqjwjpiTSj3dux2V1tZDGwLfIcp6RkJsBbabmz aN6A== X-Gm-Message-State: ALQs6tD0RpeF+jbfwVc9mHxoQ+k7xAcGX2eZZw+QSt/bHWoD4Ntu7TkJ DhB93zcDd0k742DW4UfBGZDlzVVo+NE0lA== X-Received: by 10.46.158.85 with SMTP id g21mr18642831ljk.30.1524662299587; Wed, 25 Apr 2018 06:18:19 -0700 (PDT) Received: from localhost ([195.238.93.36]) by smtp.gmail.com with ESMTPSA id f26-v6sm3923535lfl.90.2018.04.25.06.18.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 06:18:18 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Wed, 25 Apr 2018 16:18:03 +0300 Message-Id: <1524662285-19617-7-git-send-email-igor.opaniuk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524662285-19617-1-git-send-email-igor.opaniuk@linaro.org> References: <1524662285-19617-1-git-send-email-igor.opaniuk@linaro.org> X-Mailman-Approved-At: Wed, 25 Apr 2018 13:20:57 +0000 Cc: trini@konsulko.com, praneeth@ti.com, misael.lopez@ti.com, joakim.bech@linaro.org Subject: [U-Boot] [PATCH 6/8] am57xx_hs: avb2.0: add support of AVB 2.0 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" 1. Add vbmeta partition info to android partition layout for am57xx SoC 2. Add support of AVB 2.0 (including avb subset of commands) for am57xx HS Signed-off-by: Igor Opaniuk --- configs/am57xx_hs_evm_defconfig | 3 +++ include/configs/am57xx_evm.h | 11 +++++++++++ include/environment/ti/boot.h | 15 +++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index ca9742f..226537a 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -81,3 +81,6 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 +# CONFIG_LIBAVB is not set +# CONFIG_LIBAVB_AB is not set +# CONFIG_CMD_AVB is not set diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index d1f73f7..020eec1 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -38,6 +38,16 @@ #define CONFIG_SYS_OMAP_ABE_SYSCK +#define str(a) #a +#define VBMETA_PART_SIZE (64 * 1024) + +#if defined(CONFIG_LIBAVB) +#define VBMETA_PART \ + "name=vbmeta,size=" str(VBMETA_PART_SIZE) ",uuid=${uuid_gpt_vbmeta};" +#else +#define VBMETA_PART "" +#endif + /* Define the default GPT table for eMMC */ #define PARTS_DEFAULT \ /* Linux partitions */ \ @@ -61,6 +71,7 @@ "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \ "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \ + VBMETA_PART \ "name=userdata,size=-,uuid=${uuid_gpt_userdata}" #define DFUARGS \ diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index 24b7783..a8336ae 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -18,6 +18,19 @@ #define PARTS_DEFAULT #endif +#if defined(CONFIG_CMD_AVB) +#define AVB_VERIFY_CHECK "if run avb_verify; then " \ + "echo AVB verification OK.;" \ + "set bootargs $bootargs $avb_bootargs;" \ + "else " \ + "echo AVB verification failed.;" \ + "exit; fi;" +#define AVB_VERIFY_CMD "avb_verify=avb init 1; avb verify;\0" +#else +#define AVB_VERIFY_CHECK "" +#define AVB_VERIFY_CMD "" +#endif + #define DEFAULT_COMMON_BOOT_TI_ARGS \ "console=" CONSOLEDEV ",115200n8\0" \ "fdtfile=undefined\0" \ @@ -26,6 +39,7 @@ "bootfile=zImage\0" \ "usbtty=cdc_acm\0" \ "vram=16M\0" \ + AVB_VERIFY_CMD \ "partitions=" PARTS_DEFAULT "\0" \ "optargs=\0" \ "dofastboot=0\0" \ @@ -43,6 +57,7 @@ "setenv machid fe6; " \ "mmc dev $mmcdev; " \ "mmc rescan; " \ + AVB_VERIFY_CHECK \ "part start mmc ${mmcdev} environment fdt_start; " \ "part size mmc ${mmcdev} environment fdt_size; " \ "part start mmc ${mmcdev} boot boot_start; " \