From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 19 Nov 2019 15:37:33 -0500 Subject: [U-Boot] [PATCH v1 1/1] cmd: adding malloc, math, and strcmp commands to u-boot In-Reply-To: <20191119002630.15088-1-vladimir.olovyannikov@broadcom.com> References: <20191119002630.15088-1-vladimir.olovyannikov@broadcom.com> Message-ID: <20191119203733.GI19317@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Nov 18, 2019 at 04:26:30PM -0800, Vladimir Olovyannikov wrote: > cmd: adding malloc, math, and strcmp u-boot commands. > - malloc supports allocation of heap memory and free allocated memory > via u-boot command line. Can you expand on how this is used in a script? I'm not sure I see that exactly. Also: > +config CMD_MALLOC > + bool "malloc" > + default y > + help > + Supports allocation of heap memory and free allocated memory commands. > + These commands are used by u-boot scripts. > + > +config CMD_MATH > + bool "math" > + default y > + help > + Provides math commands such as add, sub, mul, div, shift, > + convert decimal to hex functionalities to be available in the script. First, why do we need this, rather than using setexpr ? > + > config CMD_SOURCE > bool "source" > default y > @@ -1301,6 +1315,13 @@ config CMD_SETEXPR > Also supports loading the value at a memory location into a variable. > If CONFIG_REGEX is enabled, setexpr also supports a gsub function. > > +config CMD_STRCMP > + bool "strcmp" > + default y > + help > + Provides string compare command feature to u-boot scripts. Second, new commands must not default to y, but they should be enabled on sandbox and new test.py tests added for them. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: