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=-17.2 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,USER_AGENT_SANE_1 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 C18E9C433EF for ; Fri, 10 Sep 2021 03:14:55 +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 CF35D61101 for ; Fri, 10 Sep 2021 03:14:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CF35D61101 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com 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 71454835B6; Fri, 10 Sep 2021 05:14:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="YSwJSrkH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58807835B6; Fri, 10 Sep 2021 05:14:50 +0200 (CEST) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 92A8C83477 for ; Fri, 10 Sep 2021 05:14:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x831.google.com with SMTP id r21so277499qtw.11 for ; Thu, 09 Sep 2021 20:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oTVcIS3Dm6jbR0GzHHHZ9kkyTYlZuKcza6lEK+3uevQ=; b=YSwJSrkHiy4bObsoTN+MPp4fqYe6QsHAL7OgSbhTyOF/zqGGh9nkBbgNcjisGotZ8c P5EgNKFzqpXs1+xqj71j6c5x90zef9+O2eGDJ2fyzITZjcqFVwnXnjV0E/4EndO3uRUe i58CmMAvROawZ4/GRhjnBlJANPDfGTupSw55g= 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:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oTVcIS3Dm6jbR0GzHHHZ9kkyTYlZuKcza6lEK+3uevQ=; b=XXNjMMU6cuCmPghDU9On9ftZm3COLSWjV8N2vOTeERn6QiED6hZH1IyMrRBZlumD0q BU52NOMlJcaSp3NnpuUwjmYSK0QoF0AxMS7dukR++uFrIXR7lBj/NhPRGa1cKirNsr8y mP4ZztVqZm/IwXPFgJBa4doBo6H8QmqzcvzgbG8kW7Dg2YJ5Y8U5GF07BMBos3/rgbKe 0N3QxdHmGbmYjnFoiiYVQXhlmyZ8YiMGrFN/hkr0B0X+EwN+hWHULiXlwWLM+LBAQmIG CCqun+WsGuWlphWCE/N5ovD8o8n8m90CCuXciqhWiMvISIQ21YRiTINr/acYLYQGNl87 IuSg== X-Gm-Message-State: AOAM530R3Q8p8RduoN4wAFMbpYnj6vTYx8VFLG/qWwF8PDR9nPzQEkKv FBrSbdQ1s58fHM5NcnBoTRiIvA== X-Google-Smtp-Source: ABdhPJx+wkO62pE7HeM98Gxm4Sue7qtSxLJVZFi9sjUW1GeGdHKKfQ2PbULPfYA6oqfl9mGqM5SHgw== X-Received: by 2002:ac8:5710:: with SMTP id 16mr5867442qtw.393.1631243684114; Thu, 09 Sep 2021 20:14:44 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-55fd-c014-b2c6-676a.res6.spectrum.com. [2603:6081:7b01:cbda:55fd:c014:b2c6:676a]) by smtp.gmail.com with ESMTPSA id j3sm2769105qki.104.2021.09.09.20.14.42 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Sep 2021 20:14:42 -0700 (PDT) Date: Thu, 9 Sep 2021 23:14:40 -0400 From: Tom Rini To: AKASHI Takahiro , 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: <20210910031440.GK12964@bill-the-cat> 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> <20210910021716.GB42777@laputa> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="duRVhAmw/zj+Cjlr" Content-Disposition: inline In-Reply-To: <20210910021716.GB42777@laputa> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --duRVhAmw/zj+Cjlr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 10, 2021 at 11:17:16AM +0900, AKASHI Takahiro wrote: > Simon, Heinrich, >=20 > 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, > > > > >=20 > > > > > 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 Schuch= ardt wrote: > > > > > > > > > > mkeficapsule is used to create capsules for UEFI firmwa= re update. > > > > > > > > > > To ease inclusion into U-Boot tools packages of Linux d= istributions we > > > > > > > > > > should add it to the tools-only_defconfig. > > > > > > > > > >=20 > > > > > > > > > > Provide dummy values for CONFIG_AVB_BUF_ADDR, CONFIG_AV= B_BUF_SIZE to > > > > > > > > > > satisfy Kconfig. > > > > > > > > > >=20 > > > > > > > > > > Suggested-by: Vagrant Cascadian > > > > > > > > > > Signed-off-by: Heinrich Schuchardt > > > > > > > > > > --- > > > > > > > > > > configs/tools-only_defconfig | 7 ++++++- > > > > > > > > > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > > > > > > >=20 > > > > > > > > > > diff --git a/configs/tools-only_defconfig b/configs/too= ls-only_defconfig > > > > > > > > > > index f54bc1802c..8a20d3fb05 100644 > > > > > > > > > > --- a/configs/tools-only_defconfig > > > > > > > > > > +++ b/configs/tools-only_defconfig > > > > > > > > > > @@ -5,6 +5,8 @@ CONFIG_ANDROID_BOOT_IMAGE=3Dy > > > > > > > > > > CONFIG_FIT=3Dy > > > > > > > > > > CONFIG_FIT_SIGNATURE=3Dy > > > > > > > > > > CONFIG_MISC_INIT_F=3Dy > > > > > > > > > > +CONFIG_AVB_BUF_ADDR=3D0x0 > > > > > > > > > > +CONFIG_AVB_BUF_SIZE=3D0x8192 > > > > > > > > > > # CONFIG_CMD_BOOTD is not set > > > > > > > > > > # CONFIG_CMD_BOOTM is not set > > > > > > > > > > # CONFIG_CMD_ELF is not set > > > > > > > > > > @@ -29,4 +31,7 @@ CONFIG_SYSRESET=3Dy > > > > > > > > > > # 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=3Dy > > > > > > > > > > +CONFIG_EFI_CAPSULE_FIRMWARE_FIT=3Dy > > > > > > > > > > +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=3Dy > > > > > > > > > > +CONFIG_EFI_CAPSULE_AUTHENTICATE=3Dy > > > > > > > > >=20 > > > > > > > > > I think that we should use the way that I suggested in my= patch[1]. > > > > > > > > >=20 > > > > > > > > > -Takahiro Akashi > > > > > > > > >=20 > > > > > > > > > [1] https://lists.denx.de/pipermail/u-boot/2021-August/45= 9349.html > > > > > > > >=20 > > > > > > > > Your patch [1] still requires some rework: > > > > > > > > https://patchwork.ozlabs.org/project/uboot/patch/2021083102= 4659.53464-2-takahiro.akashi@linaro.org/ > > > > > > > >=20 > > > > > > > > [1] changes what mkeficapsule looks like and this patch mak= es it > > > > > > > > available in tools-only_defconfig? > > > > > > > >=20 > > > > > > > > Aren't these two patches complementary? > > > > > > >=20 > > > > > > > With my patch applied, the only option we need to compile mke= ficapsule is: > > > > > > > CONFIG_TOOLS_MKEFICAPSULE > > > > > > > (and optionally CONFIG_TOOLS_LIBCRYPTO) > > > > > > >=20 > > > > > > > There is no target-config dependency as you have expected. > > > > > >=20 > > > > > > There's two issues. First, the general one is that when just b= uilding > > > > > > host tools (typically to package up in a distribution of some s= ort), it > > > > > > shouldn't depend on how "U-Boot" was configured (set aside the = default > > > > > > environment problem). > > > > >=20 > > > > > I don't get your point. CONFIG_TOOLS_MKEFICAPSULE is only for bui= lding > > > > > mkeficapsule. It has nothing to do with U-Boot itself. > > > >=20 > > > > My point is that "make tools-only" must build all the tools that wo= uld > > > > 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. > > >=20 > > > I can see bunch of "hostprogs-$(CONFIG_...) +=3D ...", and > > > some of them are not always built. > > > So what do you mean by "all the tools"? > >=20 > > 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. > >=20 > > are correct. So it's OK that the tool today depends on > > CONFIG_EFI_HAVE_CAPSULE_SUPPORT. > >=20 > > > Which tools be packed in is totally up to a distro, isn't it? > >=20 > > 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). >=20 > @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: >=20 > 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). >=20 > tools-only_defconfig addresses (2), plus=20 > 3) all the kconfigs which will allows for building "full-featured" tools > which can be implemented with such kconfigs on or off. Functionally, "tools-only_defconfig" is what distributions use to build the host tools, which are packaged up and are not board specific. The only practical difference, with that defconfig, between "tools-only" and "tools-all" make targets is envcrc. The "tools-only" make target is intended to build all of the host tools that are generically useful. > @Heinrich, > Regarding CONFIG_EFI_HAVE_CAPSULE_SUPPORT, I prefer having a dedicated > kconfig, CONFIG_TOOLS_MKEFICAPSULE for some reasons: >=20 > * 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, > =3D=3D=3D> > config TOOLS_MKEFICAPSULE > bool "Build efimkcapsule command" > default y if EFI_CAPSULE_ON_DISK > <=3D=3D=3D > 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.) No, if we're building a generically useful tool, we don't want another symbol for it. The worst case here of building something the user then doesn't use is a micro-optimization. If there's going to be multiple public tools to create and package an EFI capsule update, we shouldn't even have the tool in our tree without a really good reason and instead instruct users (and update CI to) grab the tool from the upstream location. --=20 Tom --duRVhAmw/zj+Cjlr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmE6zZoACgkQFHw5/5Y0 tyx+Cgv/WKOD6U3b1ZsecDGntFXYwJmuzKU8fvWN3ctjM75y83d16ymcm6lTgDGR 3qDOUbYKpDxTbyC+WUnYVEzbfRSiXrlVksB5OygW3sX0AR4Xd5UiPPVUKBbkC9VO FPLqicnyeQOYZtiNKRL2HBM5KjTVX/jkOdGZxMhybKw8Gvm15CZZXNX5ArrLN04Y +cUj5hYShp7bWg2lfIrjWBD9iQKJ8LWPnIZxrWd20CPFBsEVYvhv1EEbPbI1TqA/ BQDDbTAH7Fubdulug7uZabHLc/G0/vgLzlUu4zEa43SJ01hddoNDSiNCXKBYeLUh jdSobw6ZxT6uQZ2GPA3Z/2sdaFkteYNtT4f/MS31+V07RfZEj5AHlvSc2RbRjIVv KDJfiRFOpHq7p+DaGAhzdXhTMeZF+0SR2QncIRLlyi/Im0N9zdwfJBMbW/OiRW2P 2r+9b9QhJQNCEdwvOonJiW26OWtJ3oJfHL16P/o1aIsIBkYYvq7rhFwPaU6VMvnA 53mgfqvo =gPtK -----END PGP SIGNATURE----- --duRVhAmw/zj+Cjlr--