From: Wolfgang Denk Date: Mon, 20 Jan 2020 17:51:19 +0100 Subject: [RFC PATCH] Provide mechanism for build-time default env entries In-Reply-To: <20200119073738.29189-1-mrjoel@lixil.net> References: <20200119073738.29189-1-mrjoel@lixil.net> Message-ID: <20200120165119.4A25224004C@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joel, In message <20200119073738.29189-1-mrjoel@lixil.net> you wrote: > This enables the building user to specify environment values to be > included in the static default_environment with an image. This is > useful to build multiple otherwise like configured images, varying > by environment unique entries. > > --- > > I expected something like this to already be present, but couldn't > find such a mechanism. I also assumed that something similar may > have been proposed previously, but also couldn't find anything via > searching. ... > +config USER_ENV_SETTINGS > + string "User build-time additional environment entries" > + help > + This value is reserved for the building user to provide custom > + environment entries to be added to the default environment. Care must > + be taken to not break the environment, incompatible entries may cause > + failure to compile, or failure of the target board to properly > + initialize or boot. The format is key=value pairs, with entries > + separated by C-style escaped null terminated values, such as: > + "key1=valueA\0key2=valueB\0key3=valueC". Something in your descripotion must be missing, or this change makes no sense to me. > #ifdef CONFIG_EXTRA_ENV_SETTINGS > CONFIG_EXTRA_ENV_SETTINGS > +#endif > +#ifdef CONFIG_USER_ENV_SETTINGS > + CONFIG_USER_ENV_SETTINGS > #endif What exactly is the difference between CONFIG_EXTRA_ENV_SETTINGS and CONFIG_USER_ENV_SETTINGS for you, i. e. what can you do with CONFIG_USER_ENV_SETTINGS that cannot be done in exatly the same way with CONFIG_EXTRA_ENV_SETTINGS? Maybe it would help if you include any code that is actually using this feature? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A supercomputer is a machine that runs an endless loop in 2 seconds.