From patchwork Thu May 13 07:18:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 437273 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp77967jao; Thu, 13 May 2021 00:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJmOcbBtemC9SJ9F5VnT//PuJVaz8TEF/RMb54y4vZdSLPwbe3c7lmQGr5hCN49GPC5QgE X-Received: by 2002:a17:906:3ed0:: with SMTP id d16mr18633608ejj.16.1620890328876; Thu, 13 May 2021 00:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620890328; cv=none; d=google.com; s=arc-20160816; b=JFHbnYPG0tgn+LIDBzTFbAkvE63cq7I6vxPuVSC7ZMGvX2X1NBO0eF0ZdfoMxWazpy cmv6AZY+86ihQO2lPiWtqAz4IME1AQmwTQiSgvju4Mw34OKA7aigf/Z95jLE6NwqlLwW ShbLYsCy5v7gac1ADgSjIyQoRaz6baSfPSHzB8o6irG5CdSaFRsyI+ee+oc96JmDeVR9 tAwdN8SgIb2ooIh1v46V6jSWtj+B29ADo1jFAsYhpK8JMqxkNoHlWSZdL8rmWwNs2IOo GjzlDLOO1uoYEoG2VOcOQdQ2ot1WyG6+MHun6j+UzK4IveRV9W2LiOnPx+V8elQB0Lrx xcig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=FsotxWeojcrWGyqGvNaLyDQIw5Hv60FKoO5JQ+rbh5g=; b=fLYwBeK9pMdT82ApEqzJ1X1oEePOXOUO4Lv0S0I7hcoX8+Qe3Y4WUOsQheNoLjURPM 6kK2XYC4c6nZqw1U0VntTc47QmxAHgh3Eviaa3frEtZ3vv8Rmscir7j6ogrIP37hTgQ0 W9lTgfIilhvc0Y3K2CXnjYnuEBH4q4HM4Qv0mPsld0bGrR9Nyipe9KwjzqKoFRRzOaF9 TI6vWobhwfcmElOo4AePYyflqfJ5kKV871ttLO7Xk/GR4wYqD70y2SF1GfR73XH11LkA VkjYl+5hH9bRcmk1kv4vholGydKty8KyJ8lWMfzZbX4wtnb/TsO/i2hcGWTIllQpL3Di xG/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X8CAzyHr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a9si1601411ejx.305.2021.05.13.00.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:18:48 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X8CAzyHr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 77CE982D75; Thu, 13 May 2021 09:18:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="X8CAzyHr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C4B5182D75; Thu, 13 May 2021 09:18:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BCCAA82B42 for ; Thu, 13 May 2021 09:18:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pf1-x435.google.com with SMTP id x188so20887523pfd.7 for ; Thu, 13 May 2021 00:18:33 -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=FsotxWeojcrWGyqGvNaLyDQIw5Hv60FKoO5JQ+rbh5g=; b=X8CAzyHrNRfMEG81l/qlvbR6hs8ZyA/OEmSkeCCLtgdT5aJOHLWZHojN/oZX99LqYT viTO2BaTVXW23edFIT+aeIEX/0KiI/uMRkzVQv9Mb4iYzNlAsFSmCOfA6jhyIOLmzHMh Anmn46Ov4aR0tooubMz3rw4EEJi+vAa4WEdDDbEYRXq3yby3o6UMlLyyRhaAVyOOcBvl jnXGTqq8Xxx6nkQgioCGQJ/+KArxgnSQRO1UmoE3GdTipljrVXp2D+u0Su3Q0ThW+XBL dqVwnZp9wBlvqgn1cOQE0ezXVhPAIf6dZeVz6Qe36zjZUk8+KE8aLYYbY3U/jsGXFHUC 9mQw== 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=FsotxWeojcrWGyqGvNaLyDQIw5Hv60FKoO5JQ+rbh5g=; b=jVbTUg2krhDviVUDLV76/jde5HOqUHsGht+wMSX9Jcg5MeOlSSkER5aW9Sfkd/M1BE TH2kVZMZXZw2VPfI0xS0EaE82CgRuB6PPqmFnNqBgEnkcNtdiTtfpnu60NmHdJQIhVkV 7uwLJF5jAJQozs1d1Snho3cmbDxU8jzN5PgiCo1ocgvC8983kkBRxUVAR9LmLxAiOnY2 1kcrnzUPNGrzHQFQsBwZQUeyZ712qcy2hMlAFiOaR2dhCH+TTXRBV78ZyQZZtSHzec9j j4nV9gTFCbd8rkGOxKBCJaUlRWkM9QwMnbheM90Em6/yySMiEwvHlV3Fp2Icq9QIc3y6 GVxg== X-Gm-Message-State: AOAM533CJnB1KP22ySxNiDKHgpi7yXDa5mibM4cFlDvIlKDAmujt6nvy EUf6/bvFt063k8hHzIE6A/6sMA== X-Received: by 2002:a62:2901:0:b029:28e:ef3d:10d2 with SMTP id p1-20020a6229010000b029028eef3d10d2mr38398471pfp.45.1620890312225; Thu, 13 May 2021 00:18:32 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id cm22sm1625718pjb.32.2021.05.13.00.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:18:31 -0700 (PDT) From: Masahisa Kojima To: Heinrich Schuchardt Cc: Alexander Graf , Simon Glass , Ilias Apalodimas , Masahisa Kojima , Dhananjay Phadke , Takahiro Akashi , Alexandru Gagniuc , u-boot@lists.denx.de Subject: [PATCH v6 1/3] lib: fix build error for secure boot and capsule authentication Date: Thu, 13 May 2021 16:18:29 +0900 Message-Id: <20210513071831.9969-2-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210513071831.9969-1-masahisa.kojima@linaro.org> References: <20210513071831.9969-1-masahisa.kojima@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Build error occurs when CONFIG_EFI_SECURE_BOOT or CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, because hash-checksum.c is not compiled. This commit adds hash-checksum.c as a compilation target if CONFIG_EFI_SECURE_BOOT or CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled. Signed-off-by: Masahisa Kojima --- Changes in v6: - update lib/Makefile to compile hash-checksum.c, instead of selecting FIT_SIGNATURE in secure boot and capsule authentication. Changes in v5: - Missing option for EFI_TCG2_PROTOROL already added in different commit. This commit adds FIT_SIGNATURE only. Changes in v4: - newly added in this patch series, due to rebasing the base code. lib/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/lib/Makefile b/lib/Makefile index 6825671955..bd022dd5d3 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -61,7 +61,10 @@ endif obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi/ obj-$(CONFIG_$(SPL_)MD5) += md5.o obj-$(CONFIG_$(SPL_)RSA) += rsa/ -obj-$(CONFIG_FIT_SIGNATURE) += hash-checksum.o +ifneq (,$(filter y,$(CONFIG_FIT_SIGNATURE)$(CONFIG_EFI_SECURE_BOOT)\ +$(CONFIG_EFI_CAPSULE_AUTHENTICATE))) +obj-y += hash-checksum.o +endif obj-$(CONFIG_SHA1) += sha1.o obj-$(CONFIG_SHA256) += sha256.o obj-$(CONFIG_SHA512_ALGO) += sha512.o