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: 944913 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="iil41Ob4"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41VJ8W5jwzz9rxs for ; Tue, 17 Jul 2018 21:34:19 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 65D96C21DFF; Tue, 17 Jul 2018 11:33:51 +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-Google-Smtp-Source: AAOMgpfaT/vkb+KEG7GwLg/aNTa5PAdf2B7pZg712rjcOPkUChYZr+w4+RHklEVg48Hp0mdiAymYwQ== 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