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 5E1CCC04A68 for ; Wed, 27 Jul 2022 19:08:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3033F84038; Wed, 27 Jul 2022 21:08:14 +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="H4CM8YNQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE76A840B2; Wed, 27 Jul 2022 21:08:11 +0200 (CEST) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (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 56BE083F2D for ; Wed, 27 Jul 2022 21:08:09 +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-x833.google.com with SMTP id c20so13318316qtw.8 for ; Wed, 27 Jul 2022 12:08:09 -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=oCD3ZDuB1hPmz2e7W6L3+OBiUOxEwlgTSywAZklwAxw=; b=H4CM8YNQQ+B6dWVOaBrypswMxd6xImsX+EiY8QCLuc14H+d48pGnaLBwtaoMbLcM39 nvq2L5KniV872KXW20HgCq/v8bBzAF1ExuyZsMoaRhDcHh1iMWE9kNmaI3xr35iiWy6B XWx9Yfv4fgstMu076bsTDK0GsvTMNJmgaO3ak= 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=oCD3ZDuB1hPmz2e7W6L3+OBiUOxEwlgTSywAZklwAxw=; b=cLgiWVuE4/LB8faTdHRrnQQFFkohfEAbD1IdDjm6ZFNuG2zEpCPuom8Y7uD0WWmJWn Gk3c2pQ49cVXIClUGAW9xoyDv0DSd4eG6F1YFC92ld6SdahhPH9HKC707MDzZfONVaWC 6mK6WPhIVXbcR1t6SYhQyV0XJT1Ko079PhprHQL7fzBUz7TPS5PJMUHNfFvFKCVWpbCZ I0Vi3HOOqgO1tcrCw1sed6QF1HbpjmNT6DSMLdU/eraKvPuthJigsY8DtDiZhGpUUMUl RmK8MPrKVvDPJMZ0U5PMVjBYtzzAQZxY7xl8fn5qLnOKOOHQqALblb5p27RfuKpb4bh5 01Mg== X-Gm-Message-State: AJIora9psFEqEyMYiwyAO4ifBQS/f4MowI5SiebDheelD5zuZO8PK+tL UHOI4WqKwppiViX/bs18qFNB0Q== X-Google-Smtp-Source: AGRyM1vSlpAkyPWMC5D7/PtEjooXhG1mbo78+r7t0FtnwT/yCnQ+yNl6wg/Upbk4t6ZEYQ29+e7Blg== X-Received: by 2002:a05:622a:16:b0:31e:f25a:3ef5 with SMTP id x22-20020a05622a001600b0031ef25a3ef5mr19406358qtw.191.1658948888110; Wed, 27 Jul 2022 12:08:08 -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 u6-20020a05620a0c4600b006b65410b2ddsm8482107qki.34.2022.07.27.12.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 12:08:07 -0700 (PDT) Date: Wed, 27 Jul 2022 15:08:05 -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: <20220727190805.GC1146598@bill-the-cat> References: <20220710114256.27322-1-pali@kernel.org> <20220710114256.27322-2-pali@kernel.org> <20220725212100.GG1146598@bill-the-cat> <20220727183441.hkyz2q333kvht2dw@pali> <20220727184823.GA1146598@bill-the-cat> <20220727185201.ck33fl6uqqskon2k@pali> <20220727185820.GB1146598@bill-the-cat> <20220727190115.mdioeacusmgpwgbd@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cstD1UJA9+c52Nko" Content-Disposition: inline In-Reply-To: <20220727190115.mdioeacusmgpwgbd@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 --cstD1UJA9+c52Nko Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 27, 2022 at 09:01:15PM +0200, Pali Roh=E1r wrote: > On Wednesday 27 July 2022 14:58:20 Tom Rini wrote: > > On Wed, Jul 27, 2022 at 08:52:01PM +0200, Pali Roh=E1r wrote: > > > On Wednesday 27 July 2022 14:48:23 Tom Rini wrote: > > > > On Wed, Jul 27, 2022 at 08:34:41PM +0200, Pali Roh=E1r wrote: > > > > > On Monday 25 July 2022 17:21:00 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 non= sense and does > > > > > > > not do anything useful (it is infinite recursion). Config fil= e for this > > > > > > > board already contains default preboot=3D env variable with c= orrect value, > > > > > > > which has higher priority than CONFIG_PREBOOT and this is rea= son why > > > > > > > nonsense CONFIG_PREBOOT is ignored. > > > > > > >=20 > > > > > > > Remove nonsense and unused CONFIG_PREBOOT from nokia_rx51_def= config file. > > > > > > >=20 > > > > > > > Signed-off-by: Pali Roh=E1r > > > > > >=20 > > > > > > Applied to u-boot/master, thanks! > > > > >=20 > > > > > Patch 1/2 is missing. > > > >=20 > > > > Sorry if I was unclear enough in the rest of the emails, I'm not > > > > applying 1/2. The empty string is fine enough (again, other variab= les > > > > have this issue). Unless I missed something and there's a run-time > > > > failure that 1/2 resolves? > > >=20 > > > The issue is that preboot=3D variable is defined in ENV array two tim= es. > > > Once in Kconfig and second time in regular environment define. > > >=20 > > > It is just coincidence that the definition from Kconfig is ignored > > > because currently it is put _after_ the regular preboot=3D definition= =2E But > > > this is fragile and probably some unrelated change/patch could change > > > this behavior. > > >=20 > > > We really do not want two preboot=3D definitions in ENV array and pray > > > that the correct one would be used by U-Boot at runtime. > >=20 > > It's not coincidence, it's down to link order. So it's not going to > > break anytime soon. And it's not just preboot that's in this situation. >=20 > It is not linker order, but rather order in which are specified > preprocessor macros... Ah right, sorry, I was thinking of something else I found when doing CONFIG_EXTRA_ENV_TEXT / CONFIG_EXTRA_ENV_SETTINGS stuff. > And what else is in the same situation as preboot? I just do not see > other variable which is defined two times. Right so it's all from include/env_default.h yes? CONFIG_EXTRA_ENV_TEXT and then CONFIG_EXTRA_ENV_SETTINGS win. And pretty much everything else in that file that has a CONFIG knob to it either has a different bit of Kconfig "fun" to avoid the situation PREBOOT has or is already in the same boat. > > A more generic approach to deal with this would be appreciated. Which is why I said this. How we're doing this right now isn't great and isn't super user friendly. I don't want to have to repeat the logic you do in 1/2 for all of the CONFIG options in env_default.h that aren't already converted to Kconfig. --=20 Tom --cstD1UJA9+c52Nko Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLhjRUACgkQFHw5/5Y0 tyyF0gwAs7er0gqtxr4eQTmboJKrCQLlnNKXAXnYU8ezFbOgg2+qcNujeigJ+8bD DGpedodpJaiXMJzRXnx8QXMHRXdvVMqa4AYzH39vZ5UmEGjyCgpTdgdDlyF6lcOA G6ZQNqlOt3oBZUetIh/vpgGz2ym923cGdullXMJhFmcLR5e9Jms4SPbQry4L1Z9V qNhJulQ8iAWz+QXO8TlTKP+09rW2SFsbQGcR+SdYiHDnQDuWZaNyPJwnULCO2YS7 0KYwk+/vsLHMCdSO4mR6wOG3ASgWN0ehxYrygcW2rVQLa/HE2u8EyWZIkLhx/G1+ 5jkxasLD1YBuSScVp4CK2s+sHD2d1TmMLTYMtf5E0cPHhfgIK876f2s3ekf61ZfV ZI6ruISZESLzj5XItULJoI8raMP4bwnFQsb6Hsu4R8T6Qo6jWheyc8hl28B70rrv VvGVrV+fhBzejWu6W/HERPSL2Dq7OXW+l4QsGTgfSgsH/d8Ak8Bf1TlBOwR2tZQy TkpZ1NeX =1T+k -----END PGP SIGNATURE----- --cstD1UJA9+c52Nko--