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 17CA8C43334 for ; Tue, 12 Jul 2022 22:58:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2243E8415E; Wed, 13 Jul 2022 00:58:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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="ZPPtfpyx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7733F8415E; Wed, 13 Jul 2022 00:58:38 +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 26C20840EC for ; Wed, 13 Jul 2022 00:58:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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 l2so7098073qtp.11 for ; Tue, 12 Jul 2022 15:58:35 -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; bh=Wm6ewn7wTl52DqQuVdjVWproErshhJq3FGAzR2OUMns=; b=ZPPtfpyxxyZFoLUaZ+OZDPtMx1FomrCpwPyqrJAS2fACq6QITLoI5KF50CQcdKhu+C b5XKZSpbebvttBPrrux0O0VOJEZN5Bsuphg95cwRLCWhNgWiYX1rjlRXDI0om3dPM3rl iNMxGDHFY3h/rM+n6K8sP9O4iQeTOVfM1//mM= 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; bh=Wm6ewn7wTl52DqQuVdjVWproErshhJq3FGAzR2OUMns=; b=K4HuP9q4mQiPJqInaXQW2BkM0IgbtjtqXikl240cYJ/86sexDeW2WclsWlgmx9hA0O Bn4XOuFJE8hYWlY8HPq2aRWVBxQ29B+fYyiaHSeVRDfdFqpiMaxLB1f9aQnEB/KQzDQH OzlTY69uOBs+21exOxXd164eT7trxDQ7Jd0EWhsFLOxhQiNSV2yNdZF8Z7jz/72Vse7Q 7f2b10Fucb3mrNb2ggatf9PbXMZZd0rGuSEEu0pWh/Iu+x62SgE/gj/ECOFx5z9Rk6y2 wKScjlSG7VKtWoo3IcQjdA91DakLankrAIsVabv5BFkpmq3td+3K/DN5tR92aW5GYlPN CqQQ== X-Gm-Message-State: AJIora8He4uXkk8QQ5xKMVldCLkTvb0QAGmZMY88k5d5PHE1SuiRzQq/ iT0+iJBLeJ3fI0t1fFuIAeqjPg== X-Google-Smtp-Source: AGRyM1srNTgFlHjZt4+6z3W0lDsPosh3XCNXWp3xB4xR0ImMuqCNyXN9UKLnQE1pWr24KRaea5Mh/A== X-Received: by 2002:a05:622a:552:b0:31e:b638:2118 with SMTP id m18-20020a05622a055200b0031eb6382118mr334225qtx.646.1657666713887; Tue, 12 Jul 2022 15:58:33 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id d19-20020ac847d3000000b0031ec44aa37bsm1278521qtr.93.2022.07.12.15.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 15:58:33 -0700 (PDT) Date: Tue, 12 Jul 2022 18:58:31 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Troy Kisky , Joe Hershberger , Wolfgang Denk , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH 2/2] Nokia RX-51: Remove CONFIG_PREBOOT from defconfig Message-ID: <20220712225831.GW1146598@bill-the-cat> References: <20220710114256.27322-1-pali@kernel.org> <20220710114256.27322-2-pali@kernel.org> <20220711232326.GD1146598@bill-the-cat> <20220712081100.ul37eqhxdulh2zk4@pali> <20220712213906.GU1146598@bill-the-cat> <20220712215245.6zjusiwsha7hnhsm@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1BeJerjTm9jn+5Fs" Content-Disposition: inline In-Reply-To: <20220712215245.6zjusiwsha7hnhsm@pali> X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --1BeJerjTm9jn+5Fs Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 12, 2022 at 11:52:45PM +0200, Pali Roh=E1r wrote: > On Tuesday 12 July 2022 17:39:06 Tom Rini wrote: > > On Tue, Jul 12, 2022 at 10:11:00AM +0200, Pali Roh=E1r wrote: > > > On Monday 11 July 2022 19:23:26 Tom Rini wrote: > > > > On Sun, Jul 10, 2022 at 01:42:56PM +0200, Pali Roh=E1r wrote: > > > >=20 > > > > > CONFIG_PREBOOT just cause putting "preboot=3DCONFIG_PREBOOT" into= env list. > > > > > Value CONFIG_PREBOOT=3D"run preboot" in defconfig is just nonsens= e and does > > > > > not do anything useful (it is infinite recursion). Config file fo= r this > > > > > board already contains default preboot=3D env variable with corre= ct value, > > > > > which has higher priority than CONFIG_PREBOOT and this is reason = why > > > > > nonsense CONFIG_PREBOOT is ignored. > > > > >=20 > > > > > Remove nonsense and unused CONFIG_PREBOOT from nokia_rx51_defconf= ig file. > > > > >=20 > > > > > Signed-off-by: Pali Roh=E1r > > > > > --- > > > > > configs/nokia_rx51_defconfig | 1 - > > > > > 1 file changed, 1 deletion(-) > > > > >=20 > > > > > diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_de= fconfig > > > > > index 309cf28269c1..46b794f168d9 100644 > > > > > --- a/configs/nokia_rx51_defconfig > > > > > +++ b/configs/nokia_rx51_defconfig > > > > > @@ -24,7 +24,6 @@ CONFIG_AUTOBOOT_MENU_SHOW=3Dy > > > > > CONFIG_USE_BOOTCOMMAND=3Dy > > > > > CONFIG_BOOTCOMMAND=3D"run sdboot;run emmcboot;run attachboot;ech= o" > > > > > CONFIG_USE_PREBOOT=3Dy > > > > > -CONFIG_PREBOOT=3D"run preboot" > > > > > # CONFIG_SYS_DEVICE_NULLDEV is not set > > > > > CONFIG_HUSH_PARSER=3Dy > > > > > CONFIG_SYS_PROMPT=3D"Nokia RX-51 # " > > > >=20 > > > > These changes are actually a bit puzzling. There are other platfor= ms > > > > that set preboot in their default environment, rather than via > > > > CONFIG_PREBOOT, and their final value ends up being the one set in > > > > CONFIG_EXTRA_ENV_SETTINGS rather than the empty string that > > > > CONFIG_PREBOOT is. I assume you've confirmed that at run-time you = end > > > > up with preboot=3D"run preboot" being set, and not preboot=3D"long = command" > > > > ? > > >=20 > > > At nokia n900 runtime is always "preboot=3Dlong command" and not > > > "preboot=3Drun preboot". It also was before these changes. > >=20 > > OK, so then we really just need this patch, and not the other. >=20 > Note that this is observation and all automated tests depend on this > behavior. So if this behavior somehow change (e.g. by changing > implementation or hacking LTO to change order, or etc...) then tests Yes, and n900 is not the only platform and preboot is not the only environment variable that has this issue. > start failing and you would see it in failed CI. I hope that n900 test > is still running in CI and in case of issues somebody inform me about > it... I certainly hope it's still doing useful things in CI, but if it doesn't fail when it should fail, I won't know. On the other hand, if it does fail then that means whatever broke has to be fixed. > PATCH 1/2 avoids inclusion of "preboot=3DCONFIG_PREBOOT" into default > environment when CONFIG_PREBOOT is not defined in defconfig file. And Right, but it doesn't functionally change anything as preboot is set right on this and other platforms all the same. And we would want a similar patch for other variables that have the same issue too. PREBOOT isn't special in this regard. > PATCH 2/2 then unsets CONFIG_PREBOOT from nokia defconfig file. >=20 > > And long > > term figure out how to better handle this along with the other > > half-dozen places the user may want to configure the default environment > > a bit more, on top of what's already provided. There are a handful of > > other environment variables that are handled the same (confusing) way > > right now. > >=20 > > --=20 > > Tom >=20 > Apparently this problem appeared by converting config.h options into > Kconfig. And continue to grow by conversion of new and new options. I prefer to look at it as a problem shown by Kconfig that a number of things are both "set CONFIG_FOO to enable it as a boolean" and "set CONFIG_FOO to some non-empty value that will be used" rather than as two options, one as a bool and one with the value. > Really Kconfig is not ideal tool for generating environment variables. It really isn't, that's why the plain text environment stuff is a good step in the right direction. What I'm not sure about how to best handle is making it easy for a user, rather than developer, to override environment values too. What I mean he > For all this stuff is needed some stronger tool/language than Kconfig, > e.g. C preprocessor (like it was before in config.h) or any similar > stronger macro language (e.g. m4) or script languages (shell / python). Yes, so, take a look at 5c3f6a320678d64c9fa0c42755488822a033b567 as an example of moving a board away from board config.h and to something else. What I'm not sure on is how to best handle preboot in this case as I'm not quite liking "Enable CONFIG_PREBOOT and then edit =2E../boardname.env to set preboot to the right value". --=20 Tom --1BeJerjTm9jn+5Fs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLN/I8ACgkQFHw5/5Y0 tywLOwwArYGcoZFvNk0QNIUnIxKkrxch0f5DigIqr/WFSIMQ7t1sw9HSL0BQ4Ma/ S50YvD6Ioinlwp4FlqvuKixZdC48isltS0WG1RdCzvY9LM2Ejv6e/+6OOQrgcyYc VWACa7HI5+Bt4/LcDBYes3SNQopyU9+z0VE0y664DIhLgaO8forWrQM8r1Ej4jXp 4X1VbcDfCD3VUgpllJka+y3vGx3WepVHRGG7cQYYVOMldhj9Y+uAn0FVs93whEj5 MauQ30ZEDw/urCqDif2w+yIcpxGRprv0Yi0Ul1tHdUQq4Ksaw96c2Xcnh2opb02j nDByR3lLvOPP9ZAIMsquvgKmNMfDnuL9Uq6piAy/Ah/wvMbdQGbQFAuhkP0ZfnVy Tix8U7e3kccBjVyBKMb01clMhhBmVjehMh4cROMU5UwZ5m4t2rYOxMIRx2UXceor RK6okDvh/cKZ15Qbs/u7vANnztBfxaoZDXg6orK6RW2pBtrOcuuWKgegnXpKymg3 FpVuIsKe =g4mC -----END PGP SIGNATURE----- --1BeJerjTm9jn+5Fs--