[RFC PATCH 02/28] cli: Add LIL shell
Tom Rini
trini at konsulko.com
Wed Jul 7 15:58:45 CEST 2021
On Wed, Jul 07, 2021 at 10:15:34AM +0200, Wolfgang Denk wrote:
> Dear Tom,
>
> In message <20210706154346.GT9516 at bill-the-cat> you wrote:
> >
> > I'm pretty confident that exactly zero people have written complex
> > U-Boot scripts and then been happy about the experience.
>
> I have seen many U-Boot scripts which were pretty complex, but
> working absolutely reliably.
As have I. We have them in-tree, even. My point is not "you cannot
write these". My point is "you come away very disappointed in the
interpreter" after writing these. It's certainly not bash/zsh. But
it's also not POSIX-sh. It's not modern hush. It's unique, slightly
different from everything else people normally have easy access to and
those quirks aren't documented really.
> > TCL has its fans. csh has it's fans. The question isn't what's the
> > best desktop shell or general scripting language, but what's the most
> > useful in our environment an use cases.
>
> Maybe you should try and do a poll of our user base which CLI they
> _want_? I doubt there will be any significant percentage voting for
> Tcl.
>
> I know of a large number of systems which offer a shell interface on
> their command line, and those who don't usually use completely
> proprietary code. I know of very few examples where Tcl is being
> used.
A good point, yes.
> > I don't know if it's right either. But drawing on my comment just now
> > and above about complex boot scripts, I also don't know if "it's sh but
> > quirky and incomplete, WHY DOESN'T THIS WORK RIGHT" is better than "It's
> > TCL? I don't know that, let me hit stackoverflow and do a little
> > reading" as would be the common experience. Especially if we document
> > up-front what the quirks we have are.
>
> Point taken. But if you think this to an end, the result is: lets
> write some documentation and explain the limitations of a shell in
> U-Boot environment, and document the warts and bugs of this (or an
> updated) version of hush. This should make more users happy than
> completely new and incompatible stuff.
That would be much appreciated. And to reiterate, our current hush
isn't going away soon, or likely entirely within the decade. So this
would be something long term useful to have written.
> Frankly, I believe when you run into problems with hush in U-Boot
> (even the current version) you should lean back and think about what
> you are doing.
Agreed.
> U-Boot is a boot loader, and while it is powerful enough to do
> complex things, this is not necessarily the most clever approach.
> 15 years ago, I've written complex update scripts for U-Boot. This
> was easy enough to do, and worked perfectly. But there are so many
> limitations in a boot loader environment. We don't do this any
> more. Instead, we use an OS suitable for such tasks (Linux with
> SWUpdate).
Yes. Although there are some complex things that we can't push up
higher (see distro_bootcmd) and update systems still tend to need
something from us (or they do it in grub instead).
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210707/cdd49b14/attachment.sig>
More information about the U-Boot
mailing list