From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 20 Oct 2020 15:26:40 +0200 Subject: [PATCH 11/11] bootm: Support string substitution in bootargs In-Reply-To: References: <20201019135602.3943835-1-sjg@chromium.org> <20201019135602.3943835-12-sjg@chromium.org> <283890.1603119290@gemini.denx.de> <35c7f84eb5019991583067acd545848d@walle.cc> Message-ID: <312831.1603200400@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 Simon, In message 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.