public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: Simon Glass <sjg@chromium.org>
Cc: "U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Stefano Babic" <sbabic@denx.de>,
	"Marek Behún" <marek.behun@nic.cz>
Subject: RE: [PATCH] Makefile: Sort u-boot-initial-env output
Date: Thu, 24 Feb 2022 09:59:17 +0000	[thread overview]
Message-ID: <a5a29f7dc29d440fabd1dd15b7454ab0@dh-electronics.com> (raw)
In-Reply-To: <CAPnjgZ3yjnc1zVpJew8jok+YaGM901+NKiarHQ=peQUfC3AQ3A@mail.gmail.com>

From: Simon Glass [mailto:sjg@chromium.org]
Sent: Wednesday, February 23, 2022 11:59 PM
> 
> Hi Christoph,
> 

Hi Simon,

> On Wed, 23 Feb 2022 at 02:33, Christoph Niedermaier <cniedermaier@dh-electronics.com> 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 <cniedermaier@dh-electronics.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Marek Behún <marek.behun@nic.cz>
>> To: u-boot@lists.denx.de
>> ---
>>  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

  reply	other threads:[~2022-02-24  9:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23  9:33 [PATCH] Makefile: Sort u-boot-initial-env output Christoph Niedermaier
2022-02-23 13:12 ` Stefano Babic
2022-02-23 22:59 ` Simon Glass
2022-02-24  9:59   ` Christoph Niedermaier [this message]
2022-02-24 23:54     ` Simon Glass
2022-02-25 22:27       ` Christoph Niedermaier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5a29f7dc29d440fabd1dd15b7454ab0@dh-electronics.com \
    --to=cniedermaier@dh-electronics.com \
    --cc=marek.behun@nic.cz \
    --cc=sbabic@denx.de \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox