From patchwork Tue Jul 17 11:33:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 142133 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3539657ljj; Tue, 17 Jul 2018 04:34:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdZwYPWv14N1rvRPLmXG5qsvweB9jApfGuWgZwvJ9TdROqY+SZspCKxEtHRQiJ+ShLQZzXc X-Received: by 2002:a50:9aa4:: with SMTP id p33-v6mr2093234edb.218.1531827267036; Tue, 17 Jul 2018 04:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531827267; cv=none; d=google.com; s=arc-20160816; b=vPKyo+3QrVnmttcnrhXvHKNcVBRonZxqVml6ysxHTAKPGtJyBZUimvWU+1xV1uyLTd RWhmc7uGBFBTwy7/MmozQ9za8Sincrw4OWFMt4N+/5l2Z/PSE62R3HN8aYXwVtNWuLFf 018YyWy3XqxgItJI6bX/GXJ8B5QWGtibXGUCGGIlq6jbE1KbVECgi222GJjIv4+8cmRO S2TlpIZ/+2VBH+o+Xm5affN3e3oeK88GQhh0IHQEOZl+ZkXz2hDECV3yQyrCYD2X/6dv wVvnalOV6B5VB0XUxlYaUwRBtUK3lLnQzzPYZ13LIanOawunDkgO/8kr//aC8LI6zuLl p/yg== 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=1WTOS16BZB2vxrMQJe9ia5ubiD3V81SDBih1DM/BSJM=; b=SRnEXii2shc5r6PBUA+9YWkXxeYm9b+8YKAOZMWRnL+1o7+CcCcuPaSALorjX3F/7Y bjew30peozICeDF3hzU22XQ2g2b+sYsV2f7WQaKugOhoCC7tZa/7UpIBdfF0mPOK/VZJ z03xH7IkqFYNapWOMDxgadFB97uIOC+ewas80AvFaH/UgcGFxiGKT0D+5HGMEKIqY4V9 j+sPz27rmKQc8nfk13aG4nK8AMvdwmY0nNomMEUXYUWjv7PEgFAIL/4avgTL97b66kso vooTnk34L5SEezr/aHuKuJxwWqWfOCgE/qs5DrHLRRkxIDygU7k++L+kGeEw9S+gDDw2 YmFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=iil41Ob4; 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 y15-v6si741668edo.347.2018.07.17.04.34.26; Tue, 17 Jul 2018 04:34:27 -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=iil41Ob4; 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 A87A8C21E07; Tue, 17 Jul 2018 11:33:50 +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 D45E3C21E68; Tue, 17 Jul 2018 11:33:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 43A9CC21DDC; Tue, 17 Jul 2018 11:33:31 +0000 (UTC) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by lists.denx.de (Postfix) with ESMTPS id D3825C21C27 for ; Tue, 17 Jul 2018 11:33:30 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id s12-v6so698163ljj.0 for ; Tue, 17 Jul 2018 04:33:30 -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=E5s1w6wA3WP+pidDuHp27q3At8Em622a61rwFojUk60=; b=iil41Ob4ySlUCyYOW/bGrSqRSY8jrsyowclSHmLNo/LDzWRfEgWbuH8khC1e4G3ypd ML4XMz9e4feNLGVYJwTo+4JUMhVQCBe82eYOEbfpiF5bsDFdZ8suwzZLE3gXtXCSr+NN DJBJJruTnpdmwWoqKbdYmcG3P4p57KcWyCb2E= 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=E5s1w6wA3WP+pidDuHp27q3At8Em622a61rwFojUk60=; b=TFsacfiFQh1uQuW3802Yo7Fa+FvhzpckUNjDJmzyVMYOp+VvI+zSzdCR2CfDFY3U6L vz4UDyWXgRe0ZMVXwrh2IC1I1U6UsaHmmfHUXgdNOHfjKK4HKv9rdRLJbOLwFct7R1LB Y4ZgXN6Jn24J8OdazUml1U14Jwp3wuwzuMG2KrTaYjzYVQ/fwb3GhJoRVGEknw3KnWoD 6L7j2MkTs/k9ZGdiiqXKq+DaohBpqHHbpps5pf6aN2/g/t3vV1mhWoLEY2MehQotXXau MufvOUZrswTSWsBEGd4zHib2adilsuCe+w36jgm8I6N9aM13jqilQemBptSfi9F8F8wn 8YeA== X-Gm-Message-State: AOUpUlEtTIZKiUDE5NksgPuFX66RoYsLGI0GEsUrYDrCnIzhMfdHQFIA FxyJEf0KYDw+70IPa6lFfTLMH7RMGNqKHg== X-Received: by 2002:a2e:9e55:: with SMTP id g21-v6mr1258662ljk.116.1531827209961; Tue, 17 Jul 2018 04:33:29 -0700 (PDT) Received: from localhost (host-176-36-145-117.la.net.ua. [176.36.145.117]) by smtp.gmail.com with ESMTPSA id m66-v6sm124018lfi.17.2018.07.17.04.33.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 04:33:29 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Tue, 17 Jul 2018 14:33:25 +0300 Message-Id: <1531827206-16158-2-git-send-email-igor.opaniuk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531827206-16158-1-git-send-email-igor.opaniuk@linaro.org> References: <1531827206-16158-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 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 bootloader-dependent operations, so it's possible to build libavb separately. AVB bootloader-dependent operations include: * Helpers to process strings in order to build OS bootargs. * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c. * Helpers to alloc/init/free avb ops. 2. Add CONFIG_FASTBOOT dependency, as fastboot buffer is re-used in partition verification operations. Reported-by: Eugeniu Rosca Signed-off-by: Igor Opaniuk Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca --- cmd/Kconfig | 2 +- common/Kconfig | 10 ++++++++++ common/Makefile | 2 +- doc/README.avb2 | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) 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..04fcb91 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -631,6 +631,16 @@ 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). Includes: + * Helpers to process strings in order to build OS bootargs. + * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c. + * Helpers to alloc/init/free avb ops. + endmenu menu "Update support" diff --git a/common/Makefile b/common/Makefile index 66584f8..7100541 100644 --- a/common/Makefile +++ b/common/Makefile @@ -121,4 +121,4 @@ obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o obj-y += s_record.o obj-y += xyzModem.o -obj-$(CONFIG_LIBAVB) += avb_verify.o +obj-$(CONFIG_AVB_VERIFY) += avb_verify.o 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