From: Simon Glass [mailto:[email protected]] Sent: Wednesday, February 23, 2022 11:59 PM > > Hi Christoph, >
Hi Simon, > On Wed, 23 Feb 2022 at 02:33, Christoph Niedermaier > <[email protected]> wrote: >> >> For a better overview and better comparison sort the initial >> environment as the get_default_env.sh script does. We need >> to preserve the order of equal variable names. So only sort >> by the variable name, and disable the last-resort comparison. >> Also remove blank lines before sorting. >> >> Signed-off-by: Christoph Niedermaier <[email protected]> >> Cc: Stefano Babic <[email protected]> >> Cc: Simon Glass <[email protected]> >> Cc: Marek BehĂșn <[email protected]> >> To: [email protected] >> --- >> Makefile | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) > > Does this sort the text environment too? It sorts only the generated file "u-boot-initial-env" which comes from the default environment. What exactly do you mean by "text environment"? > >> >> diff --git a/Makefile b/Makefile >> index 4b152249ca..67ed4edc1a 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -2439,7 +2439,8 @@ endif >> >> quiet_cmd_genenv = GENENV $@ >> cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ >> env/common.o; \ >> - sed --in-place -e 's/\x00/\x0A/g' $@ >> + sed --in-place -e 's/\x00/\x0A/g' $@; sed --in-place -e '/^\s*$$/d' >> $@; \ >> + sort --field-separator== -k1,1 --stable $@ -o $@ >> >> u-boot-initial-env: u-boot.bin >> $(call if_changed,genenv) Regards Christoph

