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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E053EC433EF for ; Thu, 7 Oct 2021 13:32:26 +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 1FA4D60F5C for ; Thu, 7 Oct 2021 13:32:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1FA4D60F5C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.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 57C6F834B5; Thu, 7 Oct 2021 15:32:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="bka9QLCk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0C78834B9; Thu, 7 Oct 2021 15:32:20 +0200 (CEST) Received: from mail-vk1-xa31.google.com (mail-vk1-xa31.google.com [IPv6:2607:f8b0:4864:20::a31]) (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 AD4B383474 for ; Thu, 7 Oct 2021 15:32:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vk1-xa31.google.com with SMTP id b67so2693740vkb.13 for ; Thu, 07 Oct 2021 06:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8qiWtQaXRKBa6UxEprodDjrOT1fS0x09jIO+L4Va9zU=; b=bka9QLCkZRPs2yADNgqb8Ju2qTZVt/noQOMIsUUP7HbuaA9dkx+q85EE1SuYNA/fqZ EfYJKGXU6xMg0YKVES2XSU/z0MtcGVLoahyKahC8vOH73+EGYU2ffp4/p3Ys2H2HCbiA ZDHjKQ4eHZuhUjeZxV1zBwems4pTaJRTnY8Ts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8qiWtQaXRKBa6UxEprodDjrOT1fS0x09jIO+L4Va9zU=; b=0RZdv7IL/Zn5OqUxDrLLIiA8yrydC8HkcIfTZQNtwj2EfHWL0XxH9PlGQXCPW0wfhz khfn4DZ2Y9wclF5iuej/oaMr1umuAtjyKusWXY+BwscfH1W7poT66Zw+Yp0aGG1FZZeU iB8Iosy4d7cofBe0z6ut0RnODAJgnKFPyVjXemvbixTgT2wROpmK+8Lpe5FUOq+uFs5a eR9bX0ZWwaQP+Yl2sUG8Z0Be6/fO03CSqWIldOPrz4hUuOOe0BRitSazWa/yC5d0iAsm wKZwzslbWzg1q3y33MjHDWLLDYFQzhHPVgVwu0BOspYBqPu7dU7WxMmSXrx5x9pbZ3j2 5kzA== X-Gm-Message-State: AOAM5315xQx5qICBPfl1mCRJeKCvQ7HkZZksjrMAto9Mgushx4jYI7en JhEnOtIWRpRWxgSLfnrP83lrybew/Iuc5v4EqAu8bg== X-Google-Smtp-Source: ABdhPJwlkr3o8+jTj0f/LbNTdR5y8ZfeaLtR5zmXAcPY3EWtW0PONxyIukJaynpa7n7EVXJeg1RsufizMIsazf4Yoqk= X-Received: by 2002:a1f:2408:: with SMTP id k8mr3596135vkk.11.1633613536091; Thu, 07 Oct 2021 06:32:16 -0700 (PDT) MIME-Version: 1.0 References: <20210926014342.127913-1-sjg@chromium.org> <20210926014342.127913-3-sjg@chromium.org> <20211007002647.GA11424@bill-the-cat> <20211007025226.GQ31748@bill-the-cat> In-Reply-To: <20211007025226.GQ31748@bill-the-cat> From: Simon Glass Date: Thu, 7 Oct 2021 07:32:04 -0600 Message-ID: Subject: Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED() To: Tom Rini Cc: U-Boot Mailing List , Alexandru Gagniuc , Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Masahiro Yamada Content-Type: text/plain; charset="UTF-8" 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 Hi Tom, On Wed, 6 Oct 2021 at 20:52, Tom Rini wrote: > > On Wed, Oct 06, 2021 at 08:49:13PM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Wed, 6 Oct 2021 at 18:26, Tom Rini wrote: > > > > > > On Sat, Sep 25, 2021 at 07:43:15PM -0600, Simon Glass wrote: > > > > > > > At present we must separately test for the host build for many options, > > > > since we force them to be enabled. For example, CONFIG_FIT is always > > > > enabled in the host tools, even if CONFIG_FIT is not enabled by the > > > > board itself. > > > > > > > > It would be more convenient if we could use, for example, > > > > CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building for the > > > > host. Add support for this. > > > > > > > > With this and the tools_build() function, we should be able to remove all > > > > the #ifdefs currently needed in code that is build by tools and targets. > > > > > > > > This will be even nicer when we move to using CONFIG(xxx) everywhere, > > > > since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff will go away. > > > > > > > > Signed-off-by: Simon Glass > > > > Suggested-by: Rasmus Villemoes # b4f73886 > > > > Reviewed-by: Alexandru Gagniuc > > > > > > The problem here is we don't include automatically > > > when building host stuff, I believe. This is why doing this breaks > > > test_mkimage_hashes for me on am335x_evm with: > > > /tmp/.bm-work/am335x_evm/tools/mkimage -D -I dts -O dtb -i /tmp/.bm-work/am335x_evm -f /home/trini/work/u-boot/u-boot/test/py/tests/vboot//hash-images.its /tmp/.bm-work/am335x_evm/test.fit > > > *** stack smashing detected ***: terminated > > > > Oh dear, and no CI coverage. > > > > I was reluctant to include kconfig.h everywhere but perhaps that is > > the best approach. Will take a look ASAP. > > Maybe we need to think a bit harder too about how we structure > intentionally shared code. > > Why not, for example, for these common algorithms, rely on typical > system headers/libraries in the tooling, which means we validated U-Boot > vs common reference, rather than just our implementations? Do you mean we use openssl for sha1, for example? Regards, Simon