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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E602AC433F5 for ; Thu, 20 Jan 2022 01:39:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 400A9837FB; Thu, 20 Jan 2022 02:39:20 +0100 (CET) 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="DH3RFFrU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 61FAF83835; Thu, 20 Jan 2022 02:39:18 +0100 (CET) Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 E94CC8349B for ; Thu, 20 Jan 2022 02:39:14 +0100 (CET) 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-x42e.google.com with SMTP id y28so638849pff.2 for ; Wed, 19 Jan 2022 17:39:14 -0800 (PST) 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=04n6JN0FnpS/uFdHhijeeL83WFmH0ioeA47DdRM1Xno=; b=DH3RFFrU1aoKP1KromuB5EKICtgbl06WPWegCH/kL6Pw4uRiP8gTX4FVNSMlzOicm+ Q2B+aCTwD7rNcCI8EtLR/WGKHBDcxMv0u80I9Ntq0EE6n6nD3PDx4GARcysSGzLf+wqV UHsw0eyT5GL1ZE+KT4rQPcKwBGugaATRxPdiFpCDT7BMorPSGhIvsg2YWyAmYdYPoHbP odAkhYHL8WOqut3n1Gx2coQNPJhznGqaYqUTnYIDhTcjliz8kLGwYODSoARIV3j1b2A9 WKQz3Wl4OtoXEd1aRhylG2a+mTfWbooYYen+WJla6mdImB5FpXTAbWGRSRQqLZ5giNP+ lXnw== 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=04n6JN0FnpS/uFdHhijeeL83WFmH0ioeA47DdRM1Xno=; b=caJ5BQ3wskR09cI92GdchIEQ1zSbi/Vb2pg/tBIulF3iItQwWRVtum6ZklAmIKLiMH q2pqfWro3q2ypd4n6YTfjG5rN8f0F9on+p5rDRnmn4+swjASuj0VKEu2nsOBhrMZxNT8 CNhSGAGbqBdv3wdN1Z7BZ60MiNTsmLRMAB58ua9w2ZvEgYGotr7CAP2ylAwHu/uqfJBP V4TCu/qeqW6sm1MSP0eDULOJ8HiMlBS3PSxvr5/gJAs9YzabB94IfP5TuwogVYl/CYFc Uz3rfoOg8n0a4vGIPmV7psYTEFHs1OAxRQvG9j3DVEJLmwCFF7cP9pL0YdWIVMjOWZol bkYA== X-Gm-Message-State: AOAM530wtdq9Qs6cRdiHM8a080bS0jpLCuOVSk49mLxjwX9OPmszakze AOC6TWz8CK2g3hjOOeJZaMuEdQ== X-Google-Smtp-Source: ABdhPJyKVupaOxA4X3W9etTomsH+JhUHVL6G5u+jOLcsMGUeEWVHDmQ3rOz2oKoPc03XFQ+T7yKpXg== X-Received: by 2002:a63:6a49:: with SMTP id f70mr29592701pgc.244.1642642753167; Wed, 19 Jan 2022 17:39:13 -0800 (PST) Received: from laputa ([2400:4050:c3e1:100:35ef:d002:eb6d:1b5]) by smtp.gmail.com with ESMTPSA id b12sm830014pfv.148.2022.01.19.17.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 17:39:12 -0800 (PST) Date: Thu, 20 Jan 2022 10:39:03 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, masami.hiramatsu@linaro.org, mark.kettenis@xs4all.nl, u-boot@lists.denx.de, Tom Rini , agraf@csgraf.de, sjg@chromium.org Subject: Re: [PATCH v9 03/11] tools: build mkeficapsule with tools-only_defconfig Message-ID: <20220120013903.GA42867@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, masami.hiramatsu@linaro.org, mark.kettenis@xs4all.nl, u-boot@lists.denx.de, Tom Rini , agraf@csgraf.de, sjg@chromium.org References: <20220118043954.55940-1-takahiro.akashi@linaro.org> <20220118043954.55940-4-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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 Heinrich, On Wed, Jan 19, 2022 at 05:08:14PM +0100, Heinrich Schuchardt wrote: > On 1/18/22 05:39, AKASHI Takahiro wrote: > > Add CONFIG_TOOLS_MKEFICAPSULE. Then we want to always build mkeficapsule > > if tools-only_defconfig is used. > > > > Signed-off-by: AKASHI Takahiro > > Reviewed-by: Simon Glass > > --- > > configs/tools-only_defconfig | 1 + > > tools/Kconfig | 8 ++++++++ > > tools/Makefile | 3 +-- > > 3 files changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig > > index f482c9a1c1b0..5427797dd4c3 100644 > > --- a/configs/tools-only_defconfig > > +++ b/configs/tools-only_defconfig > > @@ -31,3 +31,4 @@ CONFIG_I2C_EDID=y > > # CONFIG_VIRTIO_MMIO is not set > > # CONFIG_VIRTIO_PCI is not set > > # CONFIG_VIRTIO_SANDBOX is not set > > +CONFIG_TOOLS_MKEFICAPSULE=y > > diff --git a/tools/Kconfig b/tools/Kconfig > > index 91ce8ae3e516..117c921da3fe 100644 > > --- a/tools/Kconfig > > +++ b/tools/Kconfig > > @@ -90,4 +90,12 @@ config TOOLS_SHA512 > > help > > Enable SHA512 support in the tools builds > > > > +config TOOLS_MKEFICAPSULE > > + bool "Build efimkcapsule command" > > + default y if EFI_CAPSULE_ON_DISK > > We discussed this with Tom before. Building of tools should not depend > on board options. Can we make this 'default y'? No. I think we have different opinions here. I think that any of *board* configs should build only all the binaries that are need to run U-Boot on that board. For distros' case that you have mentioned before, we should encourage them to use tools-only_defconfig for packaging U-Boot host tools rather than using any particular *board* config. # In either case, the resulting binary, as far as mkeficapsule is concerned, is the exact same without any dependency of target configs. > I wonder if a dependency are missing: > > With CONFIG_FIT=n './mkeficapsule' shows the usage with: > > -f, --fit new FIT image file > > I guess the tool should select: > > CONFIG_FIT > CONFIG_FIT_SIGNATURE > > And #ifdef CONFIG_FIT_SIGNATURE should be removed in the code. I'm not sure what your point is. I believe that what you and Simon demand in building any host tool is that the binary be the same whatever target configs are enabled (or disabled). So showing "-f, --fit new FIT image file" unconditionally is a natural consequence. It doesn't make sense that CONFIG_TOOLS_MKEFICAPSULE selects any of target configs explicitly. Furthermore, I don't have "#ifdef CONFIG_FIT_SIGNATURE" in mkeficapsule.c. # there is some trick around CONFIG_FIT_SIGNATURE in tools/Kconfig, though. -Takahiro Akashi > Best regards > > Heinrich > > > + help > > + This command allows users to create a UEFI capsule file and, > > + optionally sign that file. If you want to enable UEFI capsule > > + update feature on your target, you certainly need this. > > + > > endmenu > > diff --git a/tools/Makefile b/tools/Makefile > > index 1763f44cac43..766c0674f4a0 100644 > > --- a/tools/Makefile > > +++ b/tools/Makefile > > @@ -238,8 +238,7 @@ hostprogs-$(CONFIG_MIPS) += mips-relocs > > hostprogs-$(CONFIG_ASN1_COMPILER) += asn1_compiler > > HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include > > > > -mkeficapsule-objs := mkeficapsule.o $(LIBFDT_OBJS) > > -hostprogs-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += mkeficapsule > > +hostprogs-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule > > > > # We build some files with extra pedantic flags to try to minimize things > > # that won't build on some weird host compiler -- though there are lots of >