Hi!
Le mercredi 17 janvier 2024, 17:05:28 +07 Patrice CHOTARD a écrit :
> On 1/16/24 18:25, Francis Laniel wrote:
> > Hi!
> >
> > Le mardi 16 janvier 2024, 00:34:24 +07 Patrice CHOTARD a écrit :
> >> On 1/11/24 18:04, Francesco Dolcini wrote:
> >>> Hell
Hi!
Le mardi 16 janvier 2024, 00:34:24 +07 Patrice CHOTARD a écrit :
> On 1/11/24 18:04, Francesco Dolcini wrote:
> > Hello Tom, Francis
> >
> > On Fri, Dec 29, 2023 at 07:55:37PM +0100, Francis Laniel wrote:
> >> Le jeudi 28 décembre 2023, 21:58:59 CET Tom Rini
Hi!
Le vendredi 12 janvier 2024, 00:04:18 +07 Francesco Dolcini a écrit :
> Hello Tom, Francis
>
> On Fri, Dec 29, 2023 at 07:55:37PM +0100, Francis Laniel wrote:
> > Le jeudi 28 décembre 2023, 21:58:59 CET Tom Rini a écrit :
> > > On Fri, 22 Dec 2023 22:02:20 +01
Le jeudi 28 décembre 2023, 21:58:59 CET Tom Rini a écrit :
> On Fri, 22 Dec 2023 22:02:20 +0100, Francis Laniel wrote:
> > During 2021 summer, Sean Anderson wrote a contribution to add a new shell,
> > based on LIL, to U-Boot [1, 2].
> > While one of the goals of this contri
Hi!
Le mardi 26 décembre 2023, 10:46:48 CET Simon Glass a écrit :
> Hi,
>
> On Fri, Dec 22, 2023 at 9:23 PM Tom Rini wrote:
> > On Fri, Dec 22, 2023 at 10:10:42PM +0100, Francis Laniel wrote:
> > > Hi!
> > >
> > > Le vendredi 22 décembre
Hi!
Le vendredi 22 décembre 2023, 22:02:35 CET Francis Laniel a écrit :
> Enables using, in code, modern hush as parser for run_command function
> family. It also enables the command run to be used by CLI user of modern
> hush.
>
> Reviewed-by: Simon Glass
> Signed-off-
to stick with old hush.
Cc: Holger Brunck
Link: https://marc.info/?l=u-boot=165541917618725=2
Signed-off-by: Francis Laniel
---
configs/kmcent2_defconfig | 1 +
configs/kmcoge5ne_defconfig| 1 +
configs/kmeter1_defconfig | 1 +
configs/kmopti2_defconfig
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index e25578cde3..26ad03 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -27,21 +27,17 @@ depends on HUSH_PARSER
config HUSH_OLD_PARSER
ly shrinks")
7c3e96d4b3d4 ("shell: use more compact SHELL_ASH / HUSH config defines. no code
changes")
62f1eed1e191 ("hush: in a comment, document what -i might be doing")
aaf3d5ba74c5 ("shell: tweak --help")
db5546ca1018 ("libbb: code s
Modifies return code got from while loop as modern hush always returns 0 from
while loop.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/loop.c | 34 ++
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/test/hush/loop.c b/test
Enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_modern.c | 1 +
common/cli_hush_upstream.c | 15 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff
Adds support for "if then else" construct both for command line interface and
through run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_modern.c | 11 +++
common/cli_hush_upstream.c | 12
2 files changed, 15 insert
tick to upstream Busybox behavior.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_upstream.c b/common/cli_hush_upstream.c
index 11870c51e8..a56ea6
Modifies the expected result for modern hush.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As modern hush is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 79
Modifies the expected result for modern hush.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As modern hush is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/list.c | 69
Enables using, in code, modern hush as parser for run_command function family.
It also enables the command run to be used by CLI user of modern hush.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 67 --
common
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
Reviewed-by: Simo
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to modern hush.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 66
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
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 12
cmd/Makefile | 2 +-
This command can be used to print the current parser with 'cli get'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.
Signed-off-by: Francis Laniel
---
cmd/Makefile | 2 +
cmd/cli.c | 114
This flag is used to indicate we are using the hush parser.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 2 ++
include/asm-generic/global_data.h | 4
2 files changed, 6 insertions(+)
diff --git a/common/cli.c b/common/cli.c
index
-off-by: Francis Laniel
Signed-off-by: Harald Seiler
---
common/cli_hush_modern.c | 274
common/cli_hush_upstream.c | 502 -
2 files changed, 774 insertions(+), 2 deletions(-)
create mode 100644 common/cli_hush_modern.c
diff --git
For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 13 +
common
The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 65 ++
2 files changed, 66 insertions(+)
create mode 100644 test/hush
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
Verifies shell variables are replaced by their values.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/dollar.c | 167 +++
test/py/tests/test_ut.py | 8 +-
3 files changed, 175 insertions(+), 1
5804ebfeb1ce ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/py/tests/test_hush_if_test.py | 197 -
1 file changed, 197 deletions(
As asked in commit 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover
octal/hex values"), this commit translates test_hush_if_test.py to a C test.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/if.c
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
d.
* Add new CONFIG_HUSH_SELECTABLE to only build cli command if the two shell
flavors are selected.
v11:
* Renamed everything containing 2021 to modern.
* Fixed cmd Kconfig indentation.
* Set modern parser as default for majority of boards except some.
v12:
* Rebased on top of 36d3db6
Hi!
Le dimanche 10 décembre 2023, 00:16:31 CET Tom Rini a écrit :
> On Fri, Dec 08, 2023 at 11:30:01PM +0100, Francis Laniel wrote:
> > Hi.
> >
> >
> > During 2021 summer, Sean Anderson wrote a contribution to add a new shell,
> > based on LIL, to U-Boot [
to stick with old hush.
Cc: Holger Brunck
Link: https://marc.info/?l=u-boot=165541917618725=2
Signed-off-by: Francis Laniel
---
configs/kmcent2_defconfig | 1 +
configs/kmcoge5ne_defconfig| 1 +
configs/kmeter1_defconfig | 1 +
configs/kmopti2_defconfig
ly shrinks")
7c3e96d4b3d4 ("shell: use more compact SHELL_ASH / HUSH config defines. no code
changes")
62f1eed1e191 ("hush: in a comment, document what -i might be doing")
aaf3d5ba74c5 ("shell: tweak --help")
db5546ca1018 ("libbb: code s
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 8b49a97aca..c9d4375ebb 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -28,21 +28,17 @@ depends on HUSH_PARSER
config HUSH_OLD_PARSER
Modifies return code got from while loop as modern hush always returns 0 from
while loop.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/loop.c | 34 ++
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/test/hush/loop.c b/test
Enables using, in code, modern hush as parser for run_command function family.
It also enables the command run to be used by CLI user of modern hush.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 67 --
common
Enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_modern.c | 1 +
common/cli_hush_upstream.c | 15 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff
Modifies the expected result for modern hush.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As modern hush is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 79
Adds support for "if then else" construct both for command line interface and
through run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_modern.c | 11 +++
common/cli_hush_upstream.c | 12
2 files changed, 15 insert
tick to upstream Busybox behavior.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_upstream.c b/common/cli_hush_upstream.c
index 11870c51e8..a56ea6
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to modern hush.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 66
Modifies the expected result for modern hush.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As modern hush is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/list.c | 69
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
Reviewed-by: Simo
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
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 12
cmd/Makefile | 2 +-
This command can be used to print the current parser with 'cli get'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.
Signed-off-by: Francis Laniel
---
cmd/Makefile | 2 +
cmd/cli.c | 114
This flag is used to indicate we are using the hush parser.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 2 ++
include/asm-generic/global_data.h | 4
2 files changed, 6 insertions(+)
diff --git a/common/cli.c b/common/cli.c
index
For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 13 +
common
-off-by: Francis Laniel
Signed-off-by: Harald Seiler
---
common/cli_hush_modern.c | 274
common/cli_hush_upstream.c | 502 -
2 files changed, 774 insertions(+), 2 deletions(-)
create mode 100644 common/cli_hush_modern.c
diff --git
The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 65 ++
2 files changed, 66 insertions(+)
create mode 100644 test/hush
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
Verifies shell variables are replaced by their values.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/dollar.c | 167 +++
test/py/tests/test_ut.py | 8 +-
3 files changed, 175 insertions(+), 1
5804ebfeb1ce ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/py/tests/test_hush_if_test.py | 197 -
1 file changed, 197 deletions(
As asked in commit 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover
octal/hex values"), this commit translates test_hush_if_test.py to a C test.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/if.c
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
d.
* Add new CONFIG_HUSH_SELECTABLE to only build cli command if the two shell
flavors are selected.
v11:
* Renamed everything containing 2021 to modern.
* Fixed cmd Kconfig indentation.
* Set modern parser as default for majority of boards except some.
Francis Laniel (24):
test: Add
If one defines HUSH_2021_PARSER, it is then possible to use 2021 parser with:
=> cli get
old
=> cli set 2021
=> cli get
2021
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 12
cmd/Makefile | 2 +-
Hi!
Le lundi 9 octobre 2023, 20:56:30 EET Simon Glass a écrit :
> Hi Francis,
>
> On Wed, 4 Oct 2023 at 10:42, Francis Laniel <
>
> francis.lan...@amarulasolutions.com> wrote:
> > Hi.
> >
> >
> > During 2021 summer, Sean Anderson wrote
Hi!
Le jeudi 5 octobre 2023, 02:26:52 EET Heinrich Schuchardt a écrit :
> On 10/4/23 18:42, Francis Laniel wrote:
> > This command can be used to print the current parser with 'cli print'.
>
> Please, provide a commit message that matches the code.
>
> > It can also be
The CI can fails previously for reasons which are not tied to hush 2021.
Let's build the world in any case to check everything is OK there too.
Signed-off-by: Francis Laniel
---
.azure-pipelines.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
future for
commit object.
Acked-by: Tony Dinh
Signed-off-by: Francis Laniel
[1] https://marc.info/?l=u-boot=165541917618725=2
---
cmd/Kconfig | 3 ++-
common/cli_hush_upstream.c | 1 -
configs/sheevaplug_defconfig | 1 +
tools/patman/series.py | 4
4 files changed
ly shrinks")
7c3e96d4b3d4 ("shell: use more compact SHELL_ASH / HUSH config defines. no code
changes")
62f1eed1e191 ("hush: in a comment, document what -i might be doing")
aaf3d5ba74c5 ("shell: tweak --help")
db5546ca1018 ("libbb: code s
Modifies return code got from while loop as hush 2021 always returns 0 from
while loop.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/loop.c | 34 ++
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/test/hush/loop.c b/test
Enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_2021.c | 1 +
common/cli_hush_upstream.c | 15 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff
Adds support for "if then else" construct both for command line interface and
through run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_2021.c | 11 +++
common/cli_hush_upstream.c | 12
2 files changed, 15 insert
tick to upstream Busybox behavior.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_upstream.c b/common/cli_hush_upstream.c
index dbf77ad503..68a9a4
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 79
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/list.c | 69
Enables using, in code, hush 2021 as parser for run_command function family.
It also enables the command run to be used by CLI user of hush 2021.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 67 --
common
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to hush 2021.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 66
Enables variables expansion for hush 2021, 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
Reviewed-by: Simon Glass
---
co
This command can be used to print the current parser with 'cli get'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.
Signed-off-by: Francis Laniel
---
cmd/Makefile | 2 +
cmd/cli.c | 114
This flag is used to indicate we are using the hush parser.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 2 ++
include/asm-generic/global_data.h | 4
2 files changed, 6 insertions(+)
diff --git a/common/cli.c b/common/cli.c
index
-by: Francis Laniel
Signed-off-by: Harald Seiler
---
common/cli_hush_2021.c | 274
common/cli_hush_upstream.c | 501 -
2 files changed, 774 insertions(+), 1 deletion(-)
create mode 100644 common/cli_hush_2021.c
diff --git a/common
For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 13 +
common
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 65 ++
2 files changed, 66 insertions(+)
create mode 100644 test/hush
Verifies shell variables are replaced by their values.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/dollar.c | 167 +++
test/py/tests/test_ut.py | 8 +-
3 files changed, 175 insertions(+), 1
5804ebfeb1ce ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/py/tests/test_hush_if_test.py | 197 -
1 file changed, 197 deletions(
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
As asked in commit 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover
octal/hex values"), this commit translates test_hush_if_test.py to a C test.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/if.c
error in commit adding cli command.
* Add new CONFIG_HUSH_SELECTABLE to only build cli command if the two shell
flavors are selected.
Francis Laniel (24):
test: Add framework to test hush behavior
test: hush: Test hush if/else
test/py: hush_if_test: Remove the test file
test: hush: Test hus
The CI can fails previously for reasons which are not tied to hush 2021.
Let's build the world in any case to check everything is OK there too.
Signed-off-by: Francis Laniel
---
.azure-pipelines.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
future for
commit object.
Acked-by: Tony Dinh
Signed-off-by: Francis Laniel
[1] https://marc.info/?l=u-boot=165541917618725=2
---
cmd/Kconfig | 3 ++-
common/cli_hush_upstream.c | 1 -
configs/sheevaplug_defconfig | 1 +
tools/patman/series.py | 4
4 files changed
ly shrinks")
7c3e96d4b3d4 ("shell: use more compact SHELL_ASH / HUSH config defines. no code
changes")
62f1eed1e191 ("hush: in a comment, document what -i might be doing")
aaf3d5ba74c5 ("shell: tweak --help")
db5546ca1018 ("libbb: code s
Modifies return code got from while loop as hush 2021 always returns 0 from
while loop.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/loop.c | 34 ++
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/test/hush/loop.c b/test
tick to upstream Busybox behavior.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_upstream.c b/common/cli_hush_upstream.c
index dbf77ad503..68a9a4
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 79
Adds support for "if then else" construct both for command line interface and
through run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_2021.c | 11 +++
common/cli_hush_upstream.c | 12
2 files changed, 15 insert
Enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_2021.c | 1 +
common/cli_hush_upstream.c | 15 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
test/hush/list.c | 69
Enables using, in code, hush 2021 as parser for run_command function family.
It also enables the command run to be used by CLI user of hush 2021.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 63 --
common
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to hush 2021.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 66
Enables variables expansion for hush 2021, 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
Reviewed-by: Simon Glass
---
co
-by: Francis Laniel
Signed-off-by: Harald Seiler
---
common/cli_hush_2021.c | 274
common/cli_hush_upstream.c | 501 -
2 files changed, 774 insertions(+), 1 deletion(-)
create mode 100644 common/cli_hush_2021.c
diff --git a/common
If one defines HUSH_2021_PARSER, it is then possible to use 2021 parser with:
=> cli get
old
=> cli set 2021
=> cli get
2021
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 8 +
cmd/cli.c | 7 -
common
For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 13 +
common
This flag is used to indicate we are using the hush parser.
Reviewed-by: Simon Glass
Signed-off-by: Francis Laniel
---
common/cli.c | 2 ++
include/asm-generic/global_data.h | 4
2 files changed, 6 insertions(+)
diff --git a/common/cli.c b/common/cli.c
index
This command can be used to print the current parser with 'cli print'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.
Signed-off-by: Francis Laniel
---
cmd/Makefile | 2 +
cmd/cli.c | 120
The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 65 ++
2 files changed, 66 insertions(+)
create mode 100644 test/hush
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
1 - 100 of 324 matches
Mail list logo