From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BC32C433F5 for ; Thu, 9 Sep 2021 12:47:38 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EBD061059 for ; Thu, 9 Sep 2021 12:47:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9EBD061059 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D73B833BE; Thu, 9 Sep 2021 14:47:35 +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="voIFDv9G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A73C7833CD; Thu, 9 Sep 2021 14:47:32 +0200 (CEST) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 9A844833BB for ; Thu, 9 Sep 2021 14:47:28 +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=takahiro.akashi@linaro.org Received: by mail-pl1-x62a.google.com with SMTP id d17so981015plr.12 for ; Thu, 09 Sep 2021 05:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=92pLddv8/09eFFVJO1Y+luqLsr4Hsj/glwwC59a1fgA=; b=voIFDv9GaW0BLJbeF3orNfKOXkI5z3FUedOzwvSEYCl1gQYrIT5NtLqEvQa82O1oQ0 +Q5Pb7xUmDUmiDHe+jzFJysA3EqYJLKRtX0+nTrd79DhEsHtd49d05IJnRfm8B7PXpF4 Y0c3UnYFgfCqZ2Z/RB92G3sO/JpqcXmzE74XmBePjQqLxDQs6VIUVuSJaBQIBc+mfp9V Gtuf/uGBlF2sS/Q3t5AgBBhKq2M5W5pVYI9dcrxeTypT+0x5wM5FqaUte8bTc7bZ4sh5 5z+HCFObOL5tvknGQYvbeJmWs/ymir58PSLN0VE/4WHpkfgmISJ7j7VhUsZt/PD1kxAl GNjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=92pLddv8/09eFFVJO1Y+luqLsr4Hsj/glwwC59a1fgA=; b=O88lmaTDy87mwgwol/WykOv26XiP8uuL7jx2vP087dXrTjUajCoUUWGHSUm9Kvoe32 pTpRMNeqLg/llo98H0iZxfJpmTyJE79QKmdvasuOTZnd5XFtYw4f0n5AcQ28oLCHxvz3 X0LLupfS0Cz9XVQ7Sad2r105MZo8wGC1QhM8qmxwUId3bUkRHi+ceSTqsCtuB0wfowL5 dlh+vcOLosBAfmjA05XOsvgKwkyDXy/nAWN2oHhMXBnAjlXWgHdT9c8g1MG+h6ZVP6yy iFL0n1X1w1cQedvo7CeorcmkRorM01w+3CVzqcjXo3IFRr2YOBxgwq4EnCs9lri7vIN/ 7tZA== X-Gm-Message-State: AOAM531qute+dafdiLncYZTNdx/t4rbbPwiFPZBUjbv4CGoniKyUlJxV NbYxk1r79gYayzOJPfwFV7We+g== X-Google-Smtp-Source: ABdhPJzdKAhqhPsaP/o3xMe421Fwpv5FcF9NrewseWP6wofNPhj87luqU0jBDxrzRly/SFdxip1SkQ== X-Received: by 2002:a17:90b:3882:: with SMTP id mu2mr2392880pjb.96.1631191646567; Thu, 09 Sep 2021 05:47:26 -0700 (PDT) Received: from laputa (p784a2304.tkyea130.ap.so-net.ne.jp. [120.74.35.4]) by smtp.gmail.com with ESMTPSA id ds15sm2132483pjb.19.2021.09.09.05.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 05:47:26 -0700 (PDT) Date: Thu, 9 Sep 2021 21:47:21 +0900 From: AKASHI Takahiro To: Tom Rini Cc: Heinrich Schuchardt , Simon Glass , Vagrant Cascadian , u-boot@lists.denx.de, Sughosh Ganu Subject: Re: [PATCH 1/1] configs: add mkeficapsule to tools-only_defconfig Message-ID: <20210909124721.GF56666@laputa> Mail-Followup-To: AKASHI Takahiro , Tom Rini , Heinrich Schuchardt , Simon Glass , Vagrant Cascadian , u-boot@lists.denx.de, Sughosh Ganu References: <20210909052710.22015-1-xypron.glpk@gmx.de> <20210909060939.GC56666@laputa> <20210909083036.GD56666@laputa> <20210909114615.GW12964@bill-the-cat> <20210909121023.GE56666@laputa> <20210909121543.GZ12964@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210909121543.GZ12964@bill-the-cat> 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.103.2 at phobos.denx.de X-Virus-Status: Clean On Thu, Sep 09, 2021 at 08:15:43AM -0400, Tom Rini wrote: > On Thu, Sep 09, 2021 at 09:10:23PM +0900, AKASHI Takahiro wrote: > > Tom, > > > > On Thu, Sep 09, 2021 at 07:46:15AM -0400, Tom Rini wrote: > > > On Thu, Sep 09, 2021 at 05:30:36PM +0900, AKASHI Takahiro wrote: > > > > On Thu, Sep 09, 2021 at 09:27:50AM +0200, Heinrich Schuchardt wrote: > > > > > On 9/9/21 8:09 AM, AKASHI Takahiro wrote: > > > > > > On Thu, Sep 09, 2021 at 07:27:10AM +0200, Heinrich Schuchardt wrote: > > > > > > > mkeficapsule is used to create capsules for UEFI firmware update. > > > > > > > To ease inclusion into U-Boot tools packages of Linux distributions we > > > > > > > should add it to the tools-only_defconfig. > > > > > > > > > > > > > > Provide dummy values for CONFIG_AVB_BUF_ADDR, CONFIG_AVB_BUF_SIZE to > > > > > > > satisfy Kconfig. > > > > > > > > > > > > > > Suggested-by: Vagrant Cascadian > > > > > > > Signed-off-by: Heinrich Schuchardt > > > > > > > --- > > > > > > > configs/tools-only_defconfig | 7 ++++++- > > > > > > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > > > > > > > > > > > diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig > > > > > > > index f54bc1802c..8a20d3fb05 100644 > > > > > > > --- a/configs/tools-only_defconfig > > > > > > > +++ b/configs/tools-only_defconfig > > > > > > > @@ -5,6 +5,8 @@ CONFIG_ANDROID_BOOT_IMAGE=y > > > > > > > CONFIG_FIT=y > > > > > > > CONFIG_FIT_SIGNATURE=y > > > > > > > CONFIG_MISC_INIT_F=y > > > > > > > +CONFIG_AVB_BUF_ADDR=0x0 > > > > > > > +CONFIG_AVB_BUF_SIZE=0x8192 > > > > > > > # CONFIG_CMD_BOOTD is not set > > > > > > > # CONFIG_CMD_BOOTM is not set > > > > > > > # CONFIG_CMD_ELF is not set > > > > > > > @@ -29,4 +31,7 @@ CONFIG_SYSRESET=y > > > > > > > # CONFIG_VIRTIO_MMIO is not set > > > > > > > # CONFIG_VIRTIO_PCI is not set > > > > > > > # CONFIG_VIRTIO_SANDBOX is not set > > > > > > > -# CONFIG_EFI_LOADER is not set > > > > > > > +CONFIG_EFI_CAPSULE_ON_DISK=y > > > > > > > +CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y > > > > > > > +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y > > > > > > > +CONFIG_EFI_CAPSULE_AUTHENTICATE=y > > > > > > > > > > > > I think that we should use the way that I suggested in my patch[1]. > > > > > > > > > > > > -Takahiro Akashi > > > > > > > > > > > > [1] https://lists.denx.de/pipermail/u-boot/2021-August/459349.html > > > > > > > > > > Your patch [1] still requires some rework: > > > > > https://patchwork.ozlabs.org/project/uboot/patch/20210831024659.53464-2-takahiro.akashi@linaro.org/ > > > > > > > > > > [1] changes what mkeficapsule looks like and this patch makes it > > > > > available in tools-only_defconfig? > > > > > > > > > > Aren't these two patches complementary? > > > > > > > > With my patch applied, the only option we need to compile mkeficapsule is: > > > > CONFIG_TOOLS_MKEFICAPSULE > > > > (and optionally CONFIG_TOOLS_LIBCRYPTO) > > > > > > > > There is no target-config dependency as you have expected. > > > > > > There's two issues. First, the general one is that when just building > > > host tools (typically to package up in a distribution of some sort), it > > > shouldn't depend on how "U-Boot" was configured (set aside the default > > > environment problem). > > > > I don't get your point. CONFIG_TOOLS_MKEFICAPSULE is only for building > > mkeficapsule. It has nothing to do with U-Boot itself. > > My point is that "make tools-only" must build all the tools that would > be packaged up in a distribution or otherwise sent to end users. It > must not depend on (with the exceptions above) how we configured the > build. I can see bunch of "hostprogs-$(CONFIG_...) += ...", and some of them are not always built. So what do you mean by "all the tools"? Which tools be packed in is totally up to a distro, isn't it? -Takahiro Akashi > > > CONFIG_TOOLS_LIBCRYPTO is the exception here as > > > it's how we make things reproducible at least, with respect to libcrypto > > > related requirements. The second is that "tools-only_defconfig" is > > > what's used when configuring U-Boot (as tools care about > > > CONFIG_TOOLS_LIBCRYPTO but also LOCALVERSION). > > > > Again, I don't get your point. > > Do you mean that we don't need "make tools-only_defconfig" for > > "make tools"? > > I mean that for all real configurations of U-Boot, "make tools" (or, > "make tools-only") is expected to work. And also that > "tools-only_defconfig" isn't a real U-Boot config, but a dummy config to > support distributions being able to build and package the host tools, > and use the "tools-only" build target. > > > > That said, I would like to know why AVB stuff comes in for building > > > mkeficapsule. Is there shared code? If so, are these dummy variables > > > OK and not going to cause a problem? > > > > What does AVB mean? > > My question here was to Heinrich, as he's adding dummy values for AVB, > which is Android Verified Boot, to the tools-only_defconfig and I want > to know what's pulling that in, and it matters for the host tools > themselves in some way. I hope not, in which case the dummy values are > fine. > > -- > Tom