public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 11/11] bootm: Support string substitution in bootargs
Date: Tue, 20 Oct 2020 15:26:40 +0200	[thread overview]
Message-ID: <312831.1603200400@gemini.denx.de> (raw)
In-Reply-To: <CAPnjgZ2rAQZN_bdQ5C-9cB4u8F8PrhZkBWYx0zWxj_yEBrV2qw@mail.gmail.com>

Dear Simon,

In message <CAPnjgZ2rAQZN_bdQ5C-9cB4u8F8PrhZkBWYx0zWxj_yEBrV2qw@mail.gmail.com> you wrote:
>
> > At the moment we have some cumbersome constructs like
> >    set_bootargs="setenv bootargs bla ${var}"
>
> Yes it is a real pain. The substitution happens on first parse two, so
> you have to put these commands in separate variables if you are
> building things up.

Come on, is it really that big a problem?

You define all your needed settings (foo, bar, baz, and maybe uuid),
and then you run a single command

	setenv bootargs "${foo} ${bar} %{baz} ${uuid}"

?

Yes, it takes one additional step, but it's simple and does not need
extra code.

[And if someone bothered to update hush to a recent version, and
while doing so revisited the adaptions needed for U-Boot, we could
also do much better.  IIRC, things like command substitution were
omitted then because of the code size it would have required; given
today's resources this might be an optional feature for many.]

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
...when fits of creativity run strong, more than  one  programmer  or
writer  has  been  known to abandon the desktop for the more spacious
floor.                                             - Fred Brooks, Jr.

  reply	other threads:[~2020-10-20 13:26 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 13:55 [PATCH 00/11] bootm: Support substitions in bootargs and add tests Simon Glass
2020-10-19 13:55 ` [PATCH 01/11] env: Allow returning errors from hdelete_r() Simon Glass
2020-10-19 13:55 ` [PATCH 02/11] bootm: Add tests for fixup_silent_linux() Simon Glass
2020-10-19 13:55 ` [PATCH 03/11] bootm: Update fixup_silent_linux() to return an error Simon Glass
2020-10-19 13:55 ` [PATCH 04/11] bootm: Rename fixup_silent_linux() Simon Glass
2020-10-19 13:55 ` [PATCH 05/11] bootm: Add a bool parameter to bootm_process_cmdline_env() Simon Glass
2020-10-19 13:55 ` [PATCH 06/11] bootm: Use size rather than length for CONSOLE_ARG Simon Glass
2020-10-19 13:55 ` [PATCH 07/11] bootm: Split out bootargs environment reading / writing Simon Glass
2020-10-19 14:45   ` Wolfgang Denk
2020-10-20 19:12     ` Simon Glass
2020-10-21  7:02       ` Wolfgang Denk
2020-10-21 15:51         ` Simon Glass
2020-10-19 13:55 ` [PATCH 08/11] bootm: Update bootm_process_cmdline_env() to use flags Simon Glass
2020-10-19 13:56 ` [PATCH 09/11] bootm: Allow updating the bootargs in a buffer Simon Glass
2020-10-19 14:46   ` Wolfgang Denk
2020-10-20 19:12     ` Simon Glass
2020-10-21  6:57       ` Wolfgang Denk
2020-10-21 15:51         ` Simon Glass
2020-10-19 13:56 ` [PATCH 10/11] x86: zimage: Add silent-console processing Simon Glass
2020-10-19 13:56 ` [PATCH 11/11] bootm: Support string substitution in bootargs Simon Glass
2020-10-19 14:43   ` Rasmus Villemoes
2020-10-19 15:50     ` Simon Glass
2020-10-20 13:19       ` Wolfgang Denk
2020-10-19 14:54   ` Wolfgang Denk
2020-10-19 15:47     ` Michael Walle
2020-10-19 15:52       ` Simon Glass
2020-10-20 13:26         ` Wolfgang Denk [this message]
2020-10-20 19:23           ` Simon Glass
2020-10-21  7:16             ` Wolfgang Denk
2020-10-21 15:51               ` Simon Glass
2020-10-22 12:32                 ` Wolfgang Denk
2020-11-03 15:11                   ` Simon Glass
2020-10-19 15:50     ` Simon Glass
2020-10-20 13:17       ` Wolfgang Denk
2020-10-20 19:23         ` Simon Glass
2020-10-19 14:39 ` [PATCH 00/11] bootm: Support substitions in bootargs and add tests Heinrich Schuchardt
2020-10-20 19:12   ` Simon Glass

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=312831.1603200400@gemini.denx.de \
    --to=wd@denx.de \
    --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