Hi Kory, On Fri, 7 Nov 2025 at 10:05, Kory Maincent <[email protected]> wrote: > > On Thu, 6 Nov 2025 12:23:29 -0600 > Tom Rini <[email protected]> wrote: > > > On Thu, Nov 06, 2025 at 07:00:01PM +0100, Kory Maincent wrote: > > > On Tue, 4 Nov 2025 10:38:16 -0600 > > > Tom Rini <[email protected]> wrote: > > > > > > Other question: Is it possible to not add the environment to SPL image > > > using > > > the new text environment format. I have tried to update am335_evm board to > > > it but I got a SPL too big error. > > > I have tried to add "#if !defined(XPL_BUILD)" but it is not working. > > > It seems the same generated environment file is used for all images. > > > I still haven't found were it is included in the build of the SPL image. > > > > It shouldn't change the environment size, but also environment is likely > > being pulled in to SPL for network boot support which does require > > environment. What do you mean by "same generated environment file is > > used for all images" ? And are you building in separate object > > directories for a given board or is it not being re-generated on config > > changes? Or did I misunderstand? Thanks. > > Sorry if I was not clear. > For the am335x_evm most of the environment is only in the main u-boot image > (i.e. not an xPL image). > https://elixir.bootlin.com/u-boot/v2025.10/source/include/configs/am335x_evm.h#L78 > > I would like to do the same but with the new text environment format. Is it > possible? Something like: board/ti/am335x/am335x.env for main image > and board/ti/am335x/spl_am335x.env for SPL image. > If that is not the case could you point me where the change need to > happen to help me on that. I didn't find yet where the text environment is > pulled into the images.
Some developer info at https://docs.u-boot.org/en/latest/develop/environment.html would be useful, if you have time. In Makefile: ENV_FILE is the filename of the .env file. This is run through the C preprocessor with all Kconfig options and also DEFAULT_DEVICE_TREE set to CONFIG_DEFAULT_DEVICE_TREE which produces env.in env.in then goes through scripts/env2string.awk to convert it into a C header file containing the full environment (#define CONFIG_EXTRA_ENV_TEXT "..."), in include/generated/environment.h generated/environment.h is then included by include/env_default.h Regards, Simon

