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=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 6C5BFC07E95 for ; Wed, 7 Jul 2021 14:48:09 +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 7F5F561130 for ; Wed, 7 Jul 2021 14:48:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F5F561130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz 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 779B0829EF; Wed, 7 Jul 2021 16:48:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz 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; secure) header.d=nic.cz header.i=@nic.cz header.b="fnhVdwWt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CBE6982DF1; Wed, 7 Jul 2021 16:48:05 +0200 (CEST) Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B23BB829C0 for ; Wed, 7 Jul 2021 16:48:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPSA id 244891420D6; Wed, 7 Jul 2021 16:48:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1625669281; bh=T43tJ26ZkuExkJaUL4k9xskDf83ztdQfGDy8JrpcE4g=; h=Date:From:To; b=fnhVdwWtM7IFO+S3I7ck3pX1rQF75U3lCtFNU/XcVrTR0qToBDWDdaFqzh6ijXWnr UtjYrZcYEPM+f70b3kpOWAuIpGFsQwLMnfD5iyx6Gtkcl4FqiKRi3Gg+Ot/cNYA/TY 1+eW9f+2axUBCazHHOHdBA7ubnqcbDST2x5XAFxU= Date: Wed, 7 Jul 2021 16:48:00 +0200 From: Marek Behun To: Wolfgang Denk , Tom Rini , Sean Anderson Cc: u-boot@lists.denx.de, Simon Glass , Roland Gaudig , Heinrich Schuchardt , Kostas Michalopoulos Subject: Re: [RFC PATCH 02/28] cli: Add LIL shell Message-ID: <20210707164800.4d43a8a8@thinkpad> In-Reply-To: <49439.1625645734@gemini.denx.de> 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> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 Dear Tom, Sean, Wolfgang and others, here are some of my opinions for this discussion - I agree with Wolfgang that there are far better options than a Tcl-like shell, if we want to add another language - I also think that instead of adding another language, it is more preferable to improve the existing one. Adding a new language will cause more problems in the future: - I think it can end up with OS distributions needing to write boot scripts in both languages, because they can't be sure which will be compiled into U-Boot - we will certainly end up with more bugs - userbase will fragment between the two languages - I think we can start improving the current U-Boot's shell in ways that are incompatible with upstream Hush. The idea back then, as I understand it, was to minimize man-hours invested into the CLI code, and so an existing shell was incorporated (with many #ifdef guards). But U-Boot has since evolved so much that it is very probable it would be more economic to simply fork from upsteam Hush, remove all the #ifdefs and start developing features we want in U-Boot. Is upstream Hush even maintained properly? What is the upstream repository? Is it https://github.com/sheumann/hush? - even if we decide to stay with upstream Hush and just upgrade U-Boot's Hush to upstream (since it supports functions, arithmetic with $((...)), command substitution with $(...), these are all nice features), it is IMO still better than adding a new language - one of the points Sean mentioned with LIL is that when compiled, it's size does not exceed the size of U-Boot's Hush. If we were to add new features into U-Boot's Hush, the code size would certainly increase. I think we should implement these new features, and instead of adding a new language, we should work on minimizing the code size / resulting U-Boot image size. This is where U-Boot will gain most not only with it's CLI, but also everywhere else. Regarding this, - we already have LTO - Simon worked on dtoc so that devicetrees can be compiled into C code - we can start playing with compression - either we can compress the whole image for machines with enough RAM but small place for U-Boot (Nokia N900 for example has only 256 KiB space for U-Boot) - or we can try to invent a way to decompress code when it is needed, for machines with small RAM Marek