From patchwork Sun Jun 3 18:56:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 137609 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp660081lji; Sun, 3 Jun 2018 12:00:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLKlICYJLtzqP3cCLhBwLW0OC5EekoYwh6UNpiqQQ8P5rf48pI6aqAMM6bF6A+ijWgvyYr8 X-Received: by 2002:a50:a45d:: with SMTP id v29-v6mr20734622edb.237.1528052459125; Sun, 03 Jun 2018 12:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528052459; cv=none; d=google.com; s=arc-20160816; b=zjEaz8GWJB0C4npVnngOx/ps/irlToTEN90rYgR8eSZog78U12Mrk0+PIUi+vtKtRy HB1gVvIpMSYJoK5pM6FeAkQ3Nzlo5YxmfxgIohMMtgrOuPGipa9NFm5ZSdg0KDvb/TR3 mPGofxKEs/knDmrj3boEVcDs0yGs5TBN3E/5G5NcgeXTfuYb2dIoTCj0ugHKEUtF4Y9C UeZZg3KNgT3kFtbNavrMAVVArvGTTmSJ93nh9ITnkmAluZZ0I7q5vxRKiFEhRJ/LXIC9 BZ5bNTXPPvzkiLCbxM53jVtDfHsA926WTmYHqe/siSsrHZiVkkxMFBsMuFhUJu/VpIkb xRtQ== 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=tDCdKoVKtdBbUEtqeiLHUGd8jGwGmSoAOIWRiGJDtZU=; b=FkKekNDU+mMhuafUUxlT/HZdn7iw2MhzOlai7qL1Xey7+v66oHN1dKrbfh4ynvIaKe zXCsNnh7iblrHM1vlvR5Lwd3KN0jNymVk0782UB8OFi7EhWH0FjtM6BlTSfwwq+IrqlD J7eSLIuS16wRBlYdfDO5ZsMyCsrZC/QXPq/Qve/9JQoPJLPzBNnXOH6xEqeICbGhzxBQ rhOiJKqn2x5OhI0wCbNvygQOISKQuw+nyiq7IFIh6F9+zOq9bYBjv27ZGRzhNuRAf4ms NfZLr4dqSRGcF5f/1SWoDTfnszguqidjOM9MYlpCEn4lGg6vlJTYxAfIwGS+MLqG92D6 PmyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NWLSAUN1; 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 j2-v6si879084edp.51.2018.06.03.12.00.58; Sun, 03 Jun 2018 12:00:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NWLSAUN1; 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 BAE4EC21D4A; Sun, 3 Jun 2018 18:59:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_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 15B2EC21E16; Sun, 3 Jun 2018 18:57:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0FF8BC21E68; Sun, 3 Jun 2018 18:57:06 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by lists.denx.de (Postfix) with ESMTPS id D0D0AC21DB5 for ; Sun, 3 Jun 2018 18:57:01 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id u4-v6so21853942lff.3 for ; Sun, 03 Jun 2018 11:57: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=PYgGQLBOKuHvtgZYs1rNjB2XfBM4z818TitneLv5+JI=; b=NWLSAUN1KiQ9iwxAORQ+41LnB3UkgmUwH2SHXV6rI2y+6QQab54WkgIP6VCPswf1Yr uGLuzAOxSf0zhzqgGensCHwtI7+hL7sqF0bHIuUoylwyGzFsfb19eoXQjI+AFNlz2FyW TdvgDHd7Aw1BloaP/1JJmTtArF8n3SlCGsX8w= 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=PYgGQLBOKuHvtgZYs1rNjB2XfBM4z818TitneLv5+JI=; b=AJqkWEgqq9nf5HsUR4Dg6kFSdBc/TqLdH1DsdsW3eE90VPQk3u+UNlIJFtL9e7jFHJ gf6/2+78XAL0Ie2J16pzim5iFUX5HRUSMhFhCbGehCOy0LJxPmrPZzm8S3l96vMSQc3i 0WIazoYztAj2PDdCY5ouQz2aHEwG4JxIBEc1MYlchiIOovQ+/RxkYPl0d5mzQRS1/WFH P5W1ln14zFZ+RUIYbRss+uwSnmQelw3DXpBPK/KdOWsyd0h7TTpPgVZREkxfJCJZ/TzD SvYz02dwqZ/r2mTDhy0I7Y6hZi4UXvqy+dDTnEkw+Bqhiq2Jk/x9sL5AYSNIdu6MMW9T 62pA== X-Gm-Message-State: ALKqPwdVa6hBogB6mXqaeaI2AYYMvKnSMIyvg1fvwpsmf161EuUcxEy3 3dZugFHibjYF4i+qAWFbLunIPOKeOTljxg== X-Received: by 2002:a19:db0c:: with SMTP id s12-v6mr11655265lfg.109.1528052221010; Sun, 03 Jun 2018 11:57:01 -0700 (PDT) Received: from localhost (host-176-36-145-117.la.net.ua. [176.36.145.117]) by smtp.gmail.com with ESMTPSA id c20-v6sm657894lji.82.2018.06.03.11.57.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 11:57:00 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Sun, 3 Jun 2018 21:56:41 +0300 Message-Id: <1528052203-29689-7-git-send-email-igor.opaniuk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528052203-29689-1-git-send-email-igor.opaniuk@linaro.org> References: <1528052203-29689-1-git-send-email-igor.opaniuk@linaro.org> Cc: trini@konsulko.com, praneeth@ti.com, misael.lopez@ti.com, erosca@de.adit-jv.com, joakim.bech@linaro.org Subject: [U-Boot] [PATCH v2 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 --- include/configs/am57xx_evm.h | 11 +++++++++++ include/environment/ti/boot.h | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index d1f73f7..b44e283 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -38,6 +38,16 @@ #define CONFIG_SYS_OMAP_ABE_SYSCK +#define VBMETA_PART_SIZE (64 * 1024) + +#if defined(CONFIG_LIBAVB) +#define VBMETA_PART \ + "name=vbmeta,size=" __stringify(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; " \