From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A499C07E95 for ; Wed, 7 Jul 2021 13:59:02 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9520D61C73 for ; Wed, 7 Jul 2021 13:59:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9520D61C73 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E0C8D82C35; Wed, 7 Jul 2021 15:58:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="YoptjwwB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 07F0F82E1E; Wed, 7 Jul 2021 15:58:54 +0200 (CEST) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6733882E6C for ; Wed, 7 Jul 2021 15:58:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x834.google.com with SMTP id n9so2047145qtk.7 for ; Wed, 07 Jul 2021 06:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OPFzMBv9+ECr+zcncuJaGfOb/zBvMBJqwBhmRNWYsW4=; b=YoptjwwBoKKmfJBgMWjSkn8bJ5aMgLYWEthFlMJAiLDHTzh+Dit7zNNbDavxsYt659 Hs0JnZHc/E0yXzEczNvnPzFHiYTQJ37ZQq7BC8XBvzLyxcY/npKA9Bzpjr9600C8DdtC DIe2fE5qNEI+IGAcOk4TSfPcwIFzdh+aSuLRg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OPFzMBv9+ECr+zcncuJaGfOb/zBvMBJqwBhmRNWYsW4=; b=tkq3DnGhslzruZF3+qAJejPIUSMK93HItxo4oBwc8o7ji51t4ujo3DGO6PKCR9acR8 1vAKlOIMfBr/oZohwzfBPyzvpKUpGg2onLwFM/f6Zkrl/yB2TJ3FhQTWeLlvAoFkCpr1 dPiz01RCfpt8LgGYWo6AgdLc8b2WB7X/bstqKSX3WG44N0+6au93VdP1XiVWqk5B1Cr7 fgD0DK502wFBRtNK2QigCgWtEKUA29aaEj2v+SrfdZEiPHgXUWBFDw83jflBIPJ+X1Kh eYn3BKO99rIz6otZFRjJBEhbswreACc5xJjrh5qBkxZXjk8g6P6hnX0pmv8Zr+CQD7Ry MKdg== X-Gm-Message-State: AOAM5302o1afYKMll6xtL42Zzx2seyY5aXHQl36xtYC6s1QjCo7A0ZZ9 ep37ZMwv130z1reVYFJgbJVEOg== X-Google-Smtp-Source: ABdhPJwPvE+dpzyBsqL+xiLCt4WlovdsZCCND5cYkYbEqs3LG/YAxDKfLCwkH2XIQ0exe797Y9HqKg== X-Received: by 2002:ac8:7a98:: with SMTP id x24mr3622554qtr.42.1625666328294; Wed, 07 Jul 2021 06:58:48 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-5120-5dda-66b4-5098.res6.spectrum.com. [2603:6081:7b01:cbda:5120:5dda:66b4:5098]) by smtp.gmail.com with ESMTPSA id d3sm4618144qtp.12.2021.07.07.06.58.47 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Jul 2021 06:58:47 -0700 (PDT) Date: Wed, 7 Jul 2021 09:58:45 -0400 From: Tom Rini To: Wolfgang Denk Cc: Sean Anderson , u-boot@lists.denx.de, Marek =?iso-8859-1?Q?Beh=FAn?= , Simon Glass , Roland Gaudig , Heinrich Schuchardt , Kostas Michalopoulos Subject: Re: [RFC PATCH 02/28] cli: Add LIL shell Message-ID: <20210707135845.GX9516@bill-the-cat> References: <20210701061611.957918-1-seanga2@gmail.com> <20210701061611.957918-3-seanga2@gmail.com> <126700.1625223815@gemini.denx.de> <8bbdb7a1-5085-a3b7-614f-12ae9aee8e8b@gmail.com> <18831.1625340810@gemini.denx.de> <20210705191058.GB9516@bill-the-cat> <192103.1625557460@gemini.denx.de> <20210706154346.GT9516@bill-the-cat> <49439.1625645734@gemini.denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yLwzYViECXrcukQ2" Content-Disposition: inline In-Reply-To: <49439.1625645734@gemini.denx.de> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --yLwzYViECXrcukQ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 07, 2021 at 10:15:34AM +0200, Wolfgang Denk wrote: > Dear Tom, >=20 > In message <20210706154346.GT9516@bill-the-cat> you wrote: > >=20 > > I'm pretty confident that exactly zero people have written complex > > U-Boot scripts and then been happy about the experience. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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). --=20 Tom --yLwzYViECXrcukQ2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDlsxUACgkQFHw5/5Y0 tyxcMgv9HAKXkQBD/gwDLP+08gDfN9Kr9aW0uHjBpEBIdRldFxG7E/du0ZppMrZV sGWYiq2lnTcNhOwKaZ08iS+6DdQfggG7srTS2oxU1jJO21WUmbMOSH1eIMIqAOCe NgqbuOACNYiaWZM7kkmN0fxm9DCEwnjSUGjSz2RoPWcbTqxpXmD3DGZPqBaqVwhy Gq87pdBDCk96dLt8DiVwsEVqejzWjhqwNdvd+S4pPqqqLuX/NfMFkpSp2yWgi+Hq 5JRVl+5YtEQra/Elj8MdOFouFpqOSTkLgR29evf4AQGqUoGEsThKeUJOtzJ0pzx4 Xhysq1mav86BM2wiVq0hsyGNC5bDT7yjaNqqZ5+MXQb92Fj2gG0a1GfF0kTXVpTc e3ODqjaBhHHH9mwk1QjFsJkBENfREf5yRnQb9txtKaISRq5UcNg0OFwjtq54wMqw siUwWlAc2KGCCPyzwED0bfk00kqNIBxirBiNmqea+MfmcTleiFOzA5v9+SEaRAYy w0eFXZHH =Ejqz -----END PGP SIGNATURE----- --yLwzYViECXrcukQ2--