On Fri, Jun 17, 2022 at 12:31:30AM +0200, Francis Laniel wrote:

> Hi.
> 
> 
> First I hope you are fine and the same for your relatives.
> 
> 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 contribution was to address the fact actual
> U-Boot shell, which is based on Busybox hush, is old there was a discussion
> about adding a new shell versus updating the actual one [3][4].
> 
> So, in this series, with Harald Seiler, we updated the actual U-Boot shell to
> reflect what is currently in Busybox source code.
> Basically, this contribution is about taking a snapshot of Busybox 
> shell/hush.c
> file (as it exists in commit 37460f5da) and adapt it to suit U-Boot needs.
> 
> This contribution was written to be as backward-compatible as possible to 
> avoid
> breaking the existing.
> So, the 2021 hush flavor offers the same as the actual, that is to say:
> 1. Variable expansion.
> 2. Instruction lists (;, && and ||).
> 3. If, then and else.
> 4. Loops (for, while and until).
> No new features offered by Busybox hush were implemented (e.g. functions).
> 
> It is possible to change the parser at runtime using the "parser" command:
> => parser print
> old
> => parser set 2021
> 2021> parser print
> 2021
> 2021> parser set old
> =>
> The default parser is the old one.
> 
> In terms of testing, new unit tests were added to ut to ensure the new 
> behavior
> is the same as the old one and it does not add regression.
> Nonetheless, if old behavior was buggy and fixed upstream, the fix is then 
> added
> to U-Boot [5].
> In sandbox, all of these tests pass smoothly:
> => printenv board
> board=sandbox
> => ut hush
> Running 20 hush tests
> ...
> Failures: 0
> => parser set 2021
> 2021> ut hush
> Running 20 hush tests
> ...
> Failures: 0
> 
> Thanks to the effort of Harald Seiler, I was successful booting a board:
> 2021> printenv board_rev
> board_rev=iMX8MP
> 2021> boot
> ...
> root@iMX8MPboard:~# fw_printenv board_rev
> board_rev=iMX8MP
> 
> I also tested another board where both parser were successful to boot it:
> => printenv fdtfile
> fdtfile=amlogic/meson-gxl-s905x-libretech-cc.dtb
> => boot
> ...
> root@lepotato:~#
> root@lepotato:~# reboot
> ...
> => parser set 2021
> 2021> printenv fdtfile
> fdtfile=amlogic/meson-gxl-s905x-libretech-cc.dtb
> 2021> boot
> ...
> root@lepotato:~#
> 
> Sadly, I was not able to have the CI passes smoothly...
> To pass it and be aware of all the troubles, I added the 3 last commits as
> "trick" commits.

I've replied to those now.  And generally I just want to say I'm very
happy with the progress here in v3->v4.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to