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=-4.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,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 02859C07E9B for ; Wed, 7 Jul 2021 13:46:31 +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 54EE261C89 for ; Wed, 7 Jul 2021 13:46:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54EE261C89 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 9044282B30; Wed, 7 Jul 2021 15:46:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YW+hsEIG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C984382BC7; Wed, 7 Jul 2021 15:46:26 +0200 (CEST) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (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 D2F2A80F03 for ; Wed, 7 Jul 2021 15:46:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x735.google.com with SMTP id e14so1935635qkl.9 for ; Wed, 07 Jul 2021 06:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Iu1Ehi4RiP6RlcgZSkFy0swsdhHDhBDhXnieMGYpMtg=; b=YW+hsEIGBdNbRB16KhboH412tfqdFM4L78xZSPOXSC1lEVtxLEaoe2QWzz5Fy2VGHG dTo4p13FACQwQz7ze7fvJ0u6w3pelSjhNNf7r+yUjZVJ3wJ52EQd7oEjGJCdXlcsKRuC fjmKtItc+5S0Yu7a0/JMh6r5YTn1e6xDP/T8/dNdvDB1/ONiilvm7udRHOMzqAmztoQ5 Z1VDSU3Ii6iOcgXbeDg1FkVWaRz4RwZUtmCcifg7WIx3ZgkGQ2CbWdqm13TABEJvEF3s OCQGMTftupwWOKI3fJH6W4KgWTk20PXvSEFyVc/xqZRWxgREiZVwGmpUSxdUNm8coMfA 5ENg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Iu1Ehi4RiP6RlcgZSkFy0swsdhHDhBDhXnieMGYpMtg=; b=B0/sSK1dSeY6MesWMkRvCJTcRRGw7di87x/+InoVvm+QYF5fJQ98dEgonIcsBjzJUm huB4D35wCTkEnB06bRPyzilDxCMwlWzhcvtA9UgeQx3ZS25O7wf3I27uoWV21N3qRlbw DdK2gdfSKvlP6zvUenG4CWjME3wF2vPzkVxQpVHP75gtf4Dr9XDMGgy6sNBoFoKRL5xM n6H+a2NAxV0BVoBMc5Csqh3KVauh9Y7kI8yM4nVj36+Vlh9Ek6QZCQ/W7mP4VFcC4+E/ j3CufgWgVnF3CtUuiaKFuE7BgHQpIQJiW4ecp+7uJjH3bKrOCv0cpWBMYDnDRYdx8wh/ ezEg== X-Gm-Message-State: AOAM532C7PX9vM1+o8GNLkMWbXm+R8DgbB/KshrOaNuk3vr4Zs6Roa7t gT6HPDQDoqjKCOpE4VoaOIw= X-Google-Smtp-Source: ABdhPJxSWR3/0SqjfByIBeMRG9pJNrr/wLvXtKaf++7/48rp4Axbkv3LBGqobNLfqxS0NHWdCoNt8Q== X-Received: by 2002:ae9:ee12:: with SMTP id i18mr25184596qkg.440.1625665581620; Wed, 07 Jul 2021 06:46:21 -0700 (PDT) Received: from [192.168.1.201] (pool-74-96-87-9.washdc.fios.verizon.net. [74.96.87.9]) by smtp.googlemail.com with ESMTPSA id g76sm3168691qke.127.2021.07.07.06.46.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jul 2021 06:46:21 -0700 (PDT) From: Sean Anderson Subject: Re: [RFC PATCH 02/28] cli: Add LIL shell To: Wolfgang Denk , Tom Rini Cc: u-boot@lists.denx.de, =?UTF-8?Q?Marek_Beh=c3=ban?= , Simon Glass , Roland Gaudig , Heinrich Schuchardt , Kostas Michalopoulos 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> Message-ID: <49e131a6-a638-41de-486b-c814233bf924@gmail.com> Date: Wed, 7 Jul 2021 09:46:20 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <49439.1625645734@gemini.denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 On 7/7/21 4:15 AM, Wolfgang Denk wrote: > Dear Tom, > > In message <20210706154346.GT9516@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. > >> 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. Off the top of my head, most of the tooling for FPGAs uses TCL for scripting. OpenOCD uses it too. >> 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. > > > 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. > > 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). > > > And talking about problems and limitations in U-Boot... Is the CLI > really our biggest concern right now? None of our users (customers) > has asked for a better command interpreter - the question we hear > are more like: "When will you support IPv6?", "NFS does not work > with recent Linux distros, will this be fixed?", "Can I download > over WiFi?", "Can I download using HTTP/HTTPS?", "How can I harden > U-Boot for security-critical environments?", etc. I wanted a better shell, so I worked on it. --Sean