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 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 E7633C6FD19 for ; Fri, 10 Mar 2023 23:29:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 639B185F18; Sat, 11 Mar 2023 00:29:37 +0100 (CET) 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="ARizq2dh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 383CF85F4B; Sat, 11 Mar 2023 00:29:35 +0100 (CET) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 0BC6C85D1A for ; Sat, 11 Mar 2023 00:29:32 +0100 (CET) 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-x82c.google.com with SMTP id cf14so7578276qtb.10 for ; Fri, 10 Mar 2023 15:29:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678490971; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=U6tjeY317fjRqdPlVcfunQlJvI0jytMAsfqKWBn3deM=; b=ARizq2dhxvHmovu/eopUXvLLKlFpFhoccq2KvTKS+C8Xk6fe/dCt0OHlUf7FO5j4te YW5wLu7Gkucc9IlEaUDAGMA5dfRAvLQNILGOtvr7luV/nbE7OqbItU2H2m6mVnTXaMI4 zvjxcqFX27N6noJfDjYyEmW1I4cFejcaj5yvA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678490971; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=U6tjeY317fjRqdPlVcfunQlJvI0jytMAsfqKWBn3deM=; b=Oqc0cfKQQ+U6FlOBBD6jtvwivlwtPBJV9eVl/DbKEtec8GhFN9sHwA6dQdamGbtTFc KkMtOXTACY6z9BgexrlnUcK2BWSIZQcHSaPSM+0YV6Fu5q3DNlmfzpFb8kwc3VFnMcSZ VGOGCRtv/YusEnwgGVCpTYcfS+ZGEDe5tUMRf4cV5DZQvbqKPd6lCLcLDXrjhG/eTAo2 d3aBR8/Q04oTHXrmT6M+8tOd2eGn6IuFXSOczLeoY5RLVHJweN/UAoQcB9rv/eNelhCq 3scCtcp0KJ6pZpT9PtCP0aXz4L+SQxJSCFokgYj2N43M+xlbDoILvvN2hJ5ZPREKB1yQ EvtA== X-Gm-Message-State: AO0yUKWoi9Whw3DSGf2V50QjZB41+gydlbTb+bYtowMTLlJX6c0dP+6e gZxo+PZAnnrdL8Uy94BcMWytkQ== X-Google-Smtp-Source: AK7set8mb9+dSoj4HtzH/tA0XT8tn7SPbmoHG0+i7wG/jNqujeKuo8x4UCBFD94iusbRJf2UJXTy7g== X-Received: by 2002:ac8:57cd:0:b0:3bf:be20:544c with SMTP id w13-20020ac857cd000000b003bfbe20544cmr44797471qta.39.1678490970847; Fri, 10 Mar 2023 15:29:30 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id n17-20020a05620a223100b00706b09b16fasm712689qkh.11.2023.03.10.15.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 15:29:30 -0800 (PST) Date: Fri, 10 Mar 2023 18:29:28 -0500 From: Tom Rini To: Troy Kisky Cc: sjg@chromium.org, u-boot@lists.denx.de, gary.bisson@lairdconnect.com, Marek =?iso-8859-1?Q?Beh=FAn?= , Samuel Dionne-Riel Subject: Re: [PATCH v2 02/26] cmd: nvedit: check for ENV_SUPPORT Message-ID: <20230310232928.GL3041508@bill-the-cat> References: <20230224181047.2775829-1-troykiskyboundary@gmail.com> <20230224181047.2775829-3-troykiskyboundary@gmail.com> <20230309193614.GB3041508@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="86Jqnfjk1KYpnHtq" Content-Disposition: inline In-Reply-To: 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.8 at phobos.denx.de X-Virus-Status: Clean --86Jqnfjk1KYpnHtq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 09, 2023 at 12:45:14PM -0800, Troy Kisky wrote: > On Thu, Mar 9, 2023 at 11:36=E2=80=AFAM Tom Rini wro= te: >=20 > > On Thu, Mar 09, 2023 at 11:20:33AM -0800, Troy Kisky wrote: > > > On Wed, Mar 1, 2023 at 7:33=E2=80=AFAM Tom Rini = wrote: > > > > > > > On Fri, Feb 24, 2023 at 10:10:23AM -0800, Troy Kisky wrote: > > > > > Avoid error messages when SPL,TPL,VPL build don't > > > > > have the environment options of the main build. > > > > > This is needed when defined(CONFIG_ENV_IS_IN_xxx) is changed > > > > > to CONFIG_IS_ENABLED(ENV_IS_IN_xxx). > > > > > > > > > > Signed-off-by: Troy Kisky > > > > > Reviewed-by: Simon Glass > > > > > --- > > > > > > > > > > (no changes since v1) > > > > > > > > > > cmd/nvedit.c | 5 ++++- > > > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/cmd/nvedit.c b/cmd/nvedit.c > > > > > index 7cbc3fd573a..ef0fe55431c 100644 > > > > > --- a/cmd/nvedit.c > > > > > +++ b/cmd/nvedit.c > > > > > @@ -43,6 +43,7 @@ > > > > > > > > > > DECLARE_GLOBAL_DATA_PTR; > > > > > > > > > > +#if CONFIG_IS_ENABLED(ENV_SUPPORT) > > > > > #if defined(CONFIG_ENV_IS_IN_EEPROM) || \ > > > > > defined(CONFIG_ENV_IS_IN_FLASH) || \ > > > > > defined(CONFIG_ENV_IS_IN_MMC) || \ > > > > > @@ -60,10 +61,12 @@ DECLARE_GLOBAL_DATA_PTR; > > > > > #endif > > > > > > > > > > #if !defined(ENV_IS_IN_DEVICE) && \ > > > > > - !defined(CONFIG_ENV_IS_NOWHERE) > > > > > + !defined(CONFIG_ENV_IS_NOWHERE) && \ > > > > > + !defined(CONFIG_VPL_BUILD) > > > > > # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT= 4|\ > > > > > NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or > > CONFIG_ENV_IS_NOWHERE > > > > > #endif > > > > > +#endif > > > > > > > > This is one of the #error messes that we no longer need with Kconfi= g, > > > > where we can ensure things happen. Maybe we can use def_bool y if .. > > > > instead of default y if ..., in the ENV_IS_NOWHERE choice ? > > > > > > > > -- > > > > Tom > > > > > > > > > > Hi Tom > > > > > > There is some weirdness here > > > git grep -A1 CONFIG_ENV_IS_NOWHERE * > > [snip] > > > Should I force CONFIG_ENV_IS_NOWHERE=3Dn in these cases? > > > > No, we support more than one env location being enabled at a time, with > > nowhere being the location of last resort (at run time). > > > > > > > Okay, this help text is misleading then. >=20 > config ENV_IS_NOWHERE > bool "Environment is not stored" > default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \ > !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \ > !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \ > !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \ > !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \ > !ENV_IS_IN_UBI > help > Define this if you don't want to or can't have an environment stored > on a storage medium. In this case the environment will still exist > while U-Boot is running, but once U-Boot exits it will not be > stored. U-Boot will therefore always start up with a default > environment. Yes, rewording this was missed when updating the support. > ______________ >=20 > Perhaps this is better ? >=20 > config ENV_IS_NOT_IN_DEVICE > def_bool y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \ > !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \ > !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \ > !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \ > !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \ > !ENV_IS_IN_UBI > select ENV_IS_NOWHERE >=20 > config ENV_IS_NOWHERE > bool "Environment is not stored" > help > Define this if you don't care whether or not an environment is stored > on a storage medium. In this case the environment will still exist > while U-Boot is running, but once U-Boot exits it may not be > stored. If no other ENV_IS_IN_ is defined, U-Boot will always start up > with a default environment. >=20 Seems reasonable, thanks. --=20 Tom --86Jqnfjk1KYpnHtq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmQLvVgACgkQFHw5/5Y0 tyzPjwv/ZRCy0j4/+2/YOJ/Fm9DGDpgMRNIDyh5XT4ZaoGO6GjtQT5GEBHqf7DWR 7fG39Vphg99Tm1VCrzZjQat/BSoaC9v1fq0Zp8+l9nSa3X71doLfPsfFjOxFkkVg 8Rm3nPlGZOKGSUYb54sJXX8IxbEIM0VOWmWpVvWl19zirGwJDovqkFfvBkpjVXSC K2XL1uWRY/+fIBXFsPv7Ga/tIFDoaMOXifl3LFieBTDciRElLU6GvI8cMm5Rql3E gwP1hU91iBEsS3VbHMfyTPBGuCPUnK5q1X2x5ATMhZ0j4KCtD06wYyBaDDQFtHES pq9RiKZMwjiIQRbfzst2Gxta4/YcpRyJPEuOFqIpoF2u+qLtNlvwUpz8jDBY0NSi H4rBLa1Y8NnA13f8NsyZ5v40l9glTPkgYGlrm6XGLzRHS3VN1krA0WkxNIc4I0Ux EW2JEnIOx77Jmdau7XN2NEaQe0rNwy2Sbppi7+HgVJTWgSpS3mX2NfHAq8d/dGjb xtpQSQyJ =cUUH -----END PGP SIGNATURE----- --86Jqnfjk1KYpnHtq--