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.8 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 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 37377C433EF for ; Fri, 10 Sep 2021 02:17:32 +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 2EF1A610E8 for ; Fri, 10 Sep 2021 02:17:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2EF1A610E8 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 A8F0A835B1; Fri, 10 Sep 2021 04:17: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=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="WAAqHtYK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2F0C6835B3; Fri, 10 Sep 2021 04:17:27 +0200 (CEST) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 AA74A835AF for ; Fri, 10 Sep 2021 04:17:22 +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-pf1-x429.google.com with SMTP id j6so226258pfa.4 for ; Thu, 09 Sep 2021 19:17:22 -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=zefIPzBqLluIvcQryBvFJupT5HJXAXSWUR+vOetXS3M=; b=WAAqHtYKZ+w3B1DsXwvVaropjdxlf0v4fIPwDwRljgdby88SbWxswrLR18Hbx6J421 zMsDVEEkpiQG2kDjX0ExQvh6p416ZSkpXebjWmBIe17nbHa+Ndu2XifwMl1Q1HpYXcHE dJZvLLdL+Xa1iZWcjCfhUPTiBgE6dMMY6h8SKZ8che/1ks4dNieZEAIOZvyerJD60l8Z rApV9UnJVbhJQBaEdrmgAMdLBrsLgnBObeHx7hHJbvvkP019kHntb2sk1W9qaMEeYUKx ceUhJNI2eFw5dzEs2bFUgzHBQ7sV9gLqGOeOpAtLB1mOTesrrLjDe3JpTTtnrshDlkwT t13w== 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=zefIPzBqLluIvcQryBvFJupT5HJXAXSWUR+vOetXS3M=; b=umjW7XgboaFh5X1TR1JsipCf+B40OVA8/okzJEod9CpY+5LIeCOs/U9YUvRoDnzhGC 5w9zRLwMxOjuuk+/NEADb+7Q1o6hcJxulGPfdlJZqF3cYXwOqcvxslBR/Jn7x3+i/Q6I 5t1AP2d+SOujtY269nAER7thr9r2XKR7RvoBFfJ6Ipng54LiSpSv1H86CnPEWqr/aCn+ pHUsOZIcYVcBQwRwFph0W0EKHLWSHWjYakpFrpHz6KEudtKoyvPzPouKThd+o61n25D4 mCRXHXH6E9eqIVbiIopP8twGEzYTyZ9iAZ5VJkQYm1GF8AEwyaraNrggm9ixytLZz00R TuLw== X-Gm-Message-State: AOAM531PGaz5oSj3NSTaJAtfus8X6or3L5Dk0QFXhnOlF+LqUm6z2ld2 4gGf72GEoapLFp/iaA6RiVG0uA== X-Google-Smtp-Source: ABdhPJxQvfD3Ohk8bZKhf5RCnXP0crk2v85h2Vq3uDF4T4C/wqMK9SRuYr6D3RbTQKBqcw37n4O6Mg== X-Received: by 2002:a63:515f:: with SMTP id r31mr5239042pgl.41.1631240240558; Thu, 09 Sep 2021 19:17:20 -0700 (PDT) Received: from laputa (p784a2304.tkyea130.ap.so-net.ne.jp. [120.74.35.4]) by smtp.gmail.com with ESMTPSA id d200sm3463461pfd.127.2021.09.09.19.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 19:17:20 -0700 (PDT) Date: Fri, 10 Sep 2021 11:17:16 +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: <20210910021716.GB42777@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> <20210909124721.GF56666@laputa> <20210909130223.GB12964@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210909130223.GB12964@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 Simon, Heinrich, On Thu, Sep 09, 2021 at 09:02:23AM -0400, Tom Rini wrote: > On Thu, Sep 09, 2021 at 09:47:21PM +0900, AKASHI Takahiro wrote: > > 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"? > > Our emails crossed. Yes, I was slightly wrong above, and the comment at > the top of tools/Makefile: > # A couple of simple rules: > # > # 1) Do not use target CONFIG_* options to enable or disable features in > # host > # tools. Only use the configs from tools/Kconfig > # 2) It's okay to use target configs to disable building specific tools. > # That's as long as the features of those tools aren't modified. > > are correct. So it's OK that the tool today depends on > CONFIG_EFI_HAVE_CAPSULE_SUPPORT. > > > Which tools be packed in is totally up to a distro, isn't it? > > That's the difference between building and packaging. The best general > answer is to build everything and package individually, when fine > grained control is desired. But no, making more work on each > distribution to get all tools built makes things harder, not easier, is > the feedback we've gotten (and with my OE guy hat on, agree with). @Simon, Even so, I would like you to clarify what "all (the tools)" and "tools-only" means. Looking at tools/Makefile, "hostprogs-y" can be affected by several different types of kconfigs: 1) the tools is necessary to build the u-boot binary for a specific target or board. 2) the tool is not needed for building, but is used for a specific feature of U-Boot (later by users). tools-only_defconfig addresses (2), plus 3) all the kconfigs which will allows for building "full-featured" tools which can be implemented with such kconfigs on or off. @Heinrich, Regarding CONFIG_EFI_HAVE_CAPSULE_SUPPORT, I prefer having a dedicated kconfig, CONFIG_TOOLS_MKEFICAPSULE for some reasons: * Difference btw (2) and (3) is not trivial to users, and if CONFIG_EFI_HAVE_CAPSULE_SUPPORT is used, even much so. * On the other hand, ===> config TOOLS_MKEFICAPSULE bool "Build efimkcapsule command" default y if EFI_CAPSULE_ON_DISK <=== would make this clear. (We might better use 'imply' here.) * CONFIG_EFI_HAVE_CAPSULE_SUPPORT is an internal kconfig, while CONFIG_TOOL_MAKEFICAPSULE is an external one and you can turn it on and off with "make menuconfig". (There is a small possibility that people may want to use another tool instead, like one from EDK-II's script? Who knows.) Finally, > Currently the tool is not build at all if > CONFIG_EFI_HAVE_CAPSULE_SUPPORT is not selected. Do I understand you > right that this dependency should be lifted? I'm not sure this statement targeted me or not. As a matter of fact, the implementation of mkeficapsule even in the current form doesn't depend on none of CONFIG_EFI_HAVE_CAPSULE_SUPPORT CONFIG_EFI_CAPSULE_ON_DISK CONFIG_EFI_CAPSULE_FIRMWARE_FIT CONFIG_EFI_CAPSULE_FIRMWARE_RAW CONFIG_EFI_CAPSULE_AUTHENTICATE -Takahiro Akashi > -- > Tom