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 0F524C04A68 for ; Wed, 27 Jul 2022 19:01:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C7EF6840B2; Wed, 27 Jul 2022 21:01:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.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=kernel.org header.i=@kernel.org header.b="QzZP9ciQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B6079840D2; Wed, 27 Jul 2022 21:01:22 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 769D184038 for ; Wed, 27 Jul 2022 21:01:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 22E74B8224E; Wed, 27 Jul 2022 19:01:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B51FBC433C1; Wed, 27 Jul 2022 19:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658948478; bh=dv+jxCR7OzjY521dmEpmALfoeHG7FvGXYlZHvpCPGwg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QzZP9ciQcqmnQP25+GL1frNrF0a+5vRra5WfYoXC4Seur/W1KdhxHtgRWpO8BGhFl pVkFJmuXCDZRYpMcmzLgaWNBmR4/uK8PMX867Dwmu7PXQHJD/64DsVqUftqjs9Efyv aR/fEI7zcztw40i2q/fQJ5RI540PIm+rGx+WCdQ16Twg/Q8GFet3mVVjKTEeTLqYGd PsNnH8IuofWodo3udXDFkA55SF0OzDKcZQkgK/6k37AvKqmkPfWqu0c8iazN0L5VIt T/5Gm5aDPlv4Xpzy/W/kJPGzB8Y1VS2br7Ainwy+VstMLPryxW37HusuPT1bONb1vO uFatMySvW0diA== Received: by pali.im (Postfix) id 9FA287C3; Wed, 27 Jul 2022 21:01:15 +0200 (CEST) Date: Wed, 27 Jul 2022 21:01:15 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini 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: <20220727190115.mdioeacusmgpwgbd@pali> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220727185820.GB1146598@bill-the-cat> User-Agent: NeoMutt/20180716 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 On Wednesday 27 July 2022 14:58:20 Tom Rini wrote: > On Wed, Jul 27, 2022 at 08:52:01PM +0200, Pali Rohár wrote: > > On Wednesday 27 July 2022 14:48:23 Tom Rini wrote: > > > On Wed, Jul 27, 2022 at 08:34:41PM +0200, Pali Rohár wrote: > > > > On Monday 25 July 2022 17:21:00 Tom Rini wrote: > > > > > On Sun, Jul 10, 2022 at 01:42:56PM +0200, Pali Rohár wrote: > > > > > > > > > > > CONFIG_PREBOOT just cause putting "preboot=CONFIG_PREBOOT" into env list. > > > > > > Value CONFIG_PREBOOT="run preboot" in defconfig is just nonsense and does > > > > > > not do anything useful (it is infinite recursion). Config file for this > > > > > > board already contains default preboot= env variable with correct value, > > > > > > which has higher priority than CONFIG_PREBOOT and this is reason why > > > > > > nonsense CONFIG_PREBOOT is ignored. > > > > > > > > > > > > Remove nonsense and unused CONFIG_PREBOOT from nokia_rx51_defconfig file. > > > > > > > > > > > > Signed-off-by: Pali Rohár > > > > > > > > > > Applied to u-boot/master, thanks! > > > > > > > > Patch 1/2 is missing. > > > > > > 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 variables > > > have this issue). Unless I missed something and there's a run-time > > > failure that 1/2 resolves? > > > > The issue is that preboot= variable is defined in ENV array two times. > > Once in Kconfig and second time in regular environment define. > > > > It is just coincidence that the definition from Kconfig is ignored > > because currently it is put _after_ the regular preboot= definition. But > > this is fragile and probably some unrelated change/patch could change > > this behavior. > > > > We really do not want two preboot= definitions in ENV array and pray > > that the correct one would be used by U-Boot at runtime. > > 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. It is not linker order, but rather order in which are specified preprocessor macros... And what else is in the same situation as preboot? I just do not see other variable which is defined two times. > A more generic approach to deal with this would be appreciated. > > -- > Tom