From patchwork Fri Jul 13 16:03:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 141914 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp978666ljj; Fri, 13 Jul 2018 09:05:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfqw1lrTjeYENmxAsKardnB0EqtZjZq+g9kr6JOwiISavfHxyWHVvpJkFWDDn0aFu+n2pbF X-Received: by 2002:a50:b807:: with SMTP id j7-v6mr7692251ede.206.1531497905571; Fri, 13 Jul 2018 09:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531497905; cv=none; d=google.com; s=arc-20160816; b=XE51BoUK3384gXRxb2Sxbm9auvSzx2sk1SuodY1wumsX9sKE6Lz6B+wVeAGgXy/PH3 JuewQ6ZhYzGczCBGwNVAi1aGUo/l+JN4Uv5viExBY5+6CC78/16kXqZk4xfSB3wsex26 NbqqECpQLVFTt0VscJKDjFnCcEpDiTEdeRp6w4eT5qGKS4DpWCzUvu35MFgK7VswTkFR cLi+4Z98sMMVubQ7psUoJRBMr0te9na60d59DN6QZqUrL+a3D0JYx+5hQ+okXG06x5Fq rNUqHR7fGKVZdjQBpiK77OVkIO9SRtpPCgZ01gHst8uz0aqDiSwoo+uD/ufYuWMfTEHo 6/LA== 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=rbGkcdCgt6UCWGa2nfFpY3pfEL2mRcA2ZsfZm+N/qDI=; b=OcmgAH4PmclZouj2iBZjYpyu17r8oNOB6mUiKIB1oi7Xhr5J32ZaSv5IIpYrdgITrJ gTrHhyyToGgIBARL7BpcAyd7l4lh8CA+b/Q6j9Lm4E6fgVfKRIGVTwgqp7yLP2JvYog3 1Vix+tPgeHWANRpSEThpXv1NXekgt/oRaOCHJX6Lv3JOnPcSw1130jA90hk6sJ7/Aon/ wpUWVlblSGibJdzCIMOBhhfhfucxIspihK7V3AqAW1hJ5GSLhaVDhbKusCynzeadk7OH AddP2r5K8cS8+9kVPUriLxPU+wikvh6qCgth8bKNrJ0d2jSFGpsvzDfR7l/qFvrVF22S stpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="EtVmhO/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 d4-v6si1109749edq.426.2018.07.13.09.05.05; Fri, 13 Jul 2018 09:05:05 -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="EtVmhO/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 35470C2209D; Fri, 13 Jul 2018 16:04:07 +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 26835C220A1; Fri, 13 Jul 2018 16:03:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DA411C22095; Fri, 13 Jul 2018 16:03:36 +0000 (UTC) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by lists.denx.de (Postfix) with ESMTPS id EB736C22050 for ; Fri, 13 Jul 2018 16:03:32 +0000 (UTC) Received: by mail-lf0-f67.google.com with SMTP id b22-v6so15178774lfa.3 for ; Fri, 13 Jul 2018 09:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PVyxnwB05J/X86kb5vpWJyeS5oAn73pgqToQ1xParrM=; b=EtVmhO/dw635u9XW934n1srRXhvNA+hhfU82nMTzCTTJ+h13tTvu1HkHqEPb1JCr0l XGiIG3p+hdEOODXFvYWHsdVBWjCj8nE3A1UMccjTC8ZIePPiBW2KgmJ15JkTTydeL0QD EViWel+nONJ/LdhDkMr2U1JhoB+FRRak+NTgo= 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=PVyxnwB05J/X86kb5vpWJyeS5oAn73pgqToQ1xParrM=; b=WJOuaUv3Zinb1chn27ljvntkD6B0ricLGyDPArbbA86P5K4ljYvmqOLxHtw3h+fiZS wpFWQwfUoHJt8ROzrBh+IuJ6kgjSNfUxyXaXcS1VOGD+cn4IHi61mht/RJhRNkOztyGj VSI0defNyn2AaFSq6q6oDBpyae4tcWj757PgDS4j8RM25zYmMLbNoOmRydig+o8L+Oji zvJ0PIRPEsTsKnaIun070nTFQcGdUxAVniI9gNa1XwkZQ7Q7qMSB1/YtYrqXQFBsB7U1 H9IhKAbVKK/W2KGmajFUyRjXFfzEm4C7pvH3EqrQGzmTfGV/m5aeMfRrwHZ61GRPcJlV ScoQ== X-Gm-Message-State: AOUpUlHpoOSemD9Gq1p6J8rylyqE+HOpldYBDOMzSPMicFQSPvombm9Q gu4h5hyh4PoNgwbcZpZbeBScfdAlLK2Dmw== X-Received: by 2002:a19:e803:: with SMTP id f3-v6mr5861969lfh.84.1531497812044; Fri, 13 Jul 2018 09:03:32 -0700 (PDT) Received: from localhost ([46.211.143.111]) by smtp.gmail.com with ESMTPSA id 14-v6sm2021072ljc.74.2018.07.13.09.03.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 09:03:31 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Fri, 13 Jul 2018 19:03:26 +0300 Message-Id: <1531497807-4292-2-git-send-email-igor.opaniuk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531497807-4292-1-git-send-email-igor.opaniuk@linaro.org> References: <1531497807-4292-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 1/2] avb2.0: add proper dependencies 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. Since libavb library alone is highly portable, introduce dedicated Kconfig symbol for AVB compiler-dependent operations, so it's possible to build libavb separately. 2. Add CONFIG_FASTBOOT dependency, as fastboot buffer is re-used in partition verification operations. Reported-by: Eugeniu Rosca Signed-off-by: Igor Opaniuk --- cmd/Kconfig | 2 +- common/Kconfig | 7 +++++++ doc/README.avb2 | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index aec2090..b3e030c 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1771,7 +1771,7 @@ config CMD_TRACE config CMD_AVB bool "avb - Android Verified Boot 2.0 operations" - depends on LIBAVB + depends on AVB_VERIFY default n help Enables a "avb" command to perform verification of partitions using diff --git a/common/Kconfig b/common/Kconfig index 4c7a1a9..1d31f9b 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -631,6 +631,13 @@ config HASH and the algorithms it supports are defined in common/hash.c. See also CMD_HASH for command-line access. +config AVB_VERIFY + bool "Build Android Verified Boot operations" + depends on LIBAVB && FASTBOOT + help + This option enables compilation of bootloader-dependent operations, + used by Android Verified Boot 2.0 library (libavb). + endmenu menu "Update support" diff --git a/doc/README.avb2 b/doc/README.avb2 index 67784b5..120279f 100644 --- a/doc/README.avb2 +++ b/doc/README.avb2 @@ -58,6 +58,7 @@ Slot verification result: ERROR_IO ----------------------------------- The following options must be enabled: CONFIG_LIBAVB=y +CONFIG_AVB_VERIFY=y CONFIG_CMD_AVB=y