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 32F34C433F5 for ; Thu, 7 Oct 2021 13:42:22 +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 3B38E60F5C for ; Thu, 7 Oct 2021 13:42:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3B38E60F5C 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 B106182F1D; Thu, 7 Oct 2021 15:42:18 +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="nWzxEB7V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E0488331F; Thu, 7 Oct 2021 15:42:16 +0200 (CEST) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (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 2FB6E80691 for ; Thu, 7 Oct 2021 15:42:13 +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-x834.google.com with SMTP id m26so6159886qtn.1 for ; Thu, 07 Oct 2021 06:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GtCYQeyAZD6BjZsQAgd5pXwD87EGKZmfkjDOUO9z9Cc=; b=nWzxEB7VP+C21i+AoMXbduhA+jUglK6MbBisyv7/pkCfuxQyplSrjB/j6I7oRwJQcj KDgzPkqJck8yKRTLilnXbK0+F2Ei6HBnK1hEcSOZLYNq5/dbJD4R3yZZykEaM5PHbYqR wy/N+WEc6Uxf1BuTgGTs4ZQW4w9c3TEZZ+G8U= 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GtCYQeyAZD6BjZsQAgd5pXwD87EGKZmfkjDOUO9z9Cc=; b=K3+VHywmsuxLIfMaBUhkm62GehjkzB1gSB80/cLXwFdGNah/ZTWwyxWqwusD3rX1yg I+LsLNLrTTafyRajLfEuYtLbH87JVrULagUIRAAxG2JoB62LlC1Gmww7Lf2fokY21bsC jnjCyMQjmmcz71eI67zO3T7rN0k4zxo5seFRdTDSh8++qDxe9d6xOAmisUA/POQ/spaR 4JTPK26q5VUa0b1oTYdWyXOe6WzD4yvk5nEccWkN9rTBmtWc3ypCjyrWsKo+ZS1/9+AP GsLWhqbxQjJZ8lKfWh9v1WXBrjZUbNC6pWwd271MVhdgPiUjtG2DWR99YH6bkjgItpYQ YpcA== X-Gm-Message-State: AOAM5327qfzfuBXoJdzYIAQ3YWBc4yGUy6ej9HjwN6cS7NdgQG4gObRC yai7SbTn7aQrl475gn5kK08MZA== X-Google-Smtp-Source: ABdhPJwVuKddqdcXM3CG34wvTiq5/TLM238gL7aZVUOUlI+c0e5f+WFYv5/bHk+1VLvKJ5E1Iy+RMw== X-Received: by 2002:ac8:7e87:: with SMTP id w7mr5165989qtj.166.1633614131945; Thu, 07 Oct 2021 06:42:11 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-111d-c769-9689-befa.res6.spectrum.com. [2603:6081:7b01:cbda:111d:c769:9689:befa]) by smtp.gmail.com with ESMTPSA id h11sm13566214qkl.32.2021.10.07.06.42.10 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Oct 2021 06:42:11 -0700 (PDT) Date: Thu, 7 Oct 2021 09:42:09 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , Alexandru Gagniuc , Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Masahiro Yamada Subject: Re: [PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED() Message-ID: <20211007134209.GS31748@bill-the-cat> References: <20210926014342.127913-1-sjg@chromium.org> <20210926014342.127913-3-sjg@chromium.org> <20211007002647.GA11424@bill-the-cat> <20211007025226.GQ31748@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0BIv9nKhOLc5Ty2i" Content-Disposition: inline In-Reply-To: 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 --0BIv9nKhOLc5Ty2i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 07, 2021 at 07:32:04AM -0600, Simon Glass wrote: > Hi Tom, >=20 > 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 op= tions, > > > > > since we force them to be enabled. For example, CONFIG_FIT is alw= ays > > > > > enabled in the host tools, even if CONFIG_FIT is not enabled by t= he > > > > > 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 re= move all > > > > > the #ifdefs currently needed in code that is build by tools and t= argets. > > > > > > > > > > This will be even nicer when we move to using CONFIG(xxx) everywh= ere, > > > > > since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff will = go away. > > > > > > > > > > Signed-off-by: Simon Glass > > > > > Suggested-by: Rasmus Villemoes # b4f= 73886 > > > > > 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//has= h-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? >=20 > Do you mean we use openssl for sha1, for example? I guess, yes. Just flat out saying we require openssl for tools, and doing our best to not make compatibility with libressl difficult, seems likely to cause less headaches for people than what we already require in terms of Python. --=20 Tom --0BIv9nKhOLc5Ty2i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFe+TEACgkQFHw5/5Y0 tyw0igv+NZCgJSul8heb9kqdVR8X63eP7ciy7NJlsREyfgBvP8DnRiccAL6JRniF umaoPZSBDbxoIkL1yYzV99dznxaV71WpRZrZ7t9NjDq7RowFbPaWoJ0iwAxAyFFg ZeLNxCaK8P0T0ZVJIJY3sMuQoi/aLIGjQ9Nh2QyEM2EGm9u2XZB8cBrac5HHF0oO IEx46YHj0VL9/9QU+OM/s7Ea4ggS+oRsQoe9sbRqMJCtIbtn8Q9f6ulUMbD/MCUu f1U3bbC0AqZ1RZqvYe7l9x4GO3u3FLOAL4OHvMpERqWmVN89N6EbAN+bJNhnJ+oW g0tdeINIh/pLjAXS56BkJGc+M0ZnHM48Sb/lk4MHTDrAP7rUm3V1TlJK3OKP09zx wsg6Rw9kvIOeawdyadBta4TYfJaKuKfZyOI0ED5AvvbtE8bjfa+K8UIfPNuhsrgl 5CdKhM4ITa82EFNkREAtwtcTC3x2LlscY7MhgXwQM3l+mQHymPHuYaVF03Bl6ZSe oYC3vcQw =7f2m -----END PGP SIGNATURE----- --0BIv9nKhOLc5Ty2i--