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: 924746 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="NWLSAUN1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40zSB35hfWz9rxs for ; Mon, 4 Jun 2018 05:02:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7F754C21DE8; 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-Google-Smtp-Source: ADUXVKKDCs4vqEtuZ/185RqihXBQ83cgaZ5XA0Khtzv08BHmSshfDzuTtbKfMdt/XMs8iysIgKV9dQ== 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; " \