This commit set CONFIG_HUSH_PARSER_2021 as the default to trigger the CI with
this parser.

Nonetheless, Some boards are not compatible with new 2021 hush parser:
1. rcar3_ulcb:
        When built with CONFIG_HUSH_PARSER_2021, the u-boot.img file size
        exceeds the 1MB file limit of 890 bytes:
        aarch64:  +   rcar3_ulcb
        +u-boot.img exceeds file size limit:
        +  limit:  0x100000 bytes
        +  actual: 0x10037a bytes
        +  excess: 0x37a bytes
        Some complementary work is then needed to use CONFIG_HUSH_PARSER_2021 
for this
        board.
        As CONFIG_BOOTCOMMAND is quite simple for this board, I think we can 
gain some
        bytes by deactivating hush features like if and loop.
2. the keymile (i.e. VENDOR_KM) family:
        This boards used set_local_var() to store some variables as local shell.
        They then used get_local_var() to retrieve the variables values.
        Sadly, this two functions do not exist with CONFIG_HUSH_PARSER_2021.
        A patch was proposed to use environment variables rather than local 
variables
        but it does not tackle the problem, so complementary work is needed to 
make
        this boards use CONFIG_HUSH_PARSER_2021 [1].

Signed-off-by: Francis Laniel <francis.lan...@amarulasolutions.com>
[1] https://marc.info/?l=u-boot&m=165541917618725&w=2
---
 cmd/Kconfig                  | 3 ++-
 configs/rcar3_ulcb_defconfig | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index c15d7c51f7..1e5c7d08de 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -28,7 +28,7 @@ menu "Hush flavor to use"
 
        config HUSH_OLD_PARSER
                bool "Use hush old parser"
-               default y
+               default y if VENDOR_KM
                help
                  This option enables the old flavor of hush based on hush 
Busybox from
                  2005.
@@ -37,6 +37,7 @@ menu "Hush flavor to use"
 
        config HUSH_2021_PARSER
                bool "Use hush 2021 parser"
+               default y if !VENDOR_KM
                help
                  This option enables the new flavor of hush based on hush 
Busybox from
                  2021.
diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
index f462bab5a8..ab4d83e3a9 100644
--- a/configs/rcar3_ulcb_defconfig
+++ b/configs/rcar3_ulcb_defconfig
@@ -113,3 +113,5 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_GENERIC=y
 CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_HUSH_OLD_PARSER=y
+CONFIG_HUSH_2021_PARSER=n
-- 
2.25.1

Reply via email to