aboutsummaryrefslogtreecommitdiff
path: root/common/cli_hush_modern.c
AgeCommit message (Collapse)Author
2023-12-28cli: hush_modern: Enable variables expansion for modern hushFrancis Laniel
Enables variables expansion for modern hush, both for local and environment variables. So the following commands: foo=bar echo $foo setenv bar foo echo $bar leads to "bar" and "foo" being printed on console output. Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-28cli: Enables using modern hush parser as command line parserFrancis Laniel
If one defines HUSH_MODERN_PARSER, it is then possible to use modern parser with: => cli get old => cli set modern => cli get modern Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
2023-12-28cli: Port upstream Busybox hush to U-BootFrancis Laniel
Adds new file cli_hush_upstream.c, it is a copy of Busybox hush file as it was of time to commit 37460f5da. This commit modifies Busybox hush to not compile some part specific to Busybox and adds some code needed by U-Boot. The modifications consists mainly on adding code #if(n)def guards. For the moment, this refurbished flavor of hush only permits running command without any keywords (i.e., if and for are not recognized) or variable expansion (i.e., echo $foo prints foo and not value stored in variable foo). A new file was also added to define some functions specific to U-Boot. Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com> Signed-off-by: Harald Seiler <hws@denx.de>