diff mbox series

[RFC,v8,23/23] DO NOT MERGE: only to make CI happy

Message ID 20230512200331.51457-24-francis.laniel@amarulasolutions.com
State RFC
Delegated to: Tom Rini
Headers show
Series Modernize U-Boot shell | expand

Commit Message

Francis Laniel May 12, 2023, 8:03 p.m. UTC
This commit set CONFIG_HUSH_PARSER_2021 as the default to trigger the CI with
this parser.

Nonetheless, the keymile (i.e. VENDOR_KM) board family is not compatible with
new 2021 hush parser.
Indeed, 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].

We also remove a #undef of CONFIG_FEATURE_SH_STANDALONE as it does not exist in
U-Boot and causes troubles in the CI.

We also set CONFIG_LTO for kirkwoord sheevaplug and phytec bk4r1, otherwise it
hits its board size limit.

We also disable some check for pylint as it was not able to find future for
commit object.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
[1] https://marc.info/?l=u-boot&m=165541917618725&w=2
---
 cmd/Kconfig                  | 3 ++-
 common/cli_hush_upstream.c   | 1 -
 configs/sheevaplug_defconfig | 1 +
 tools/patman/series.py       | 4 ++++
 4 files changed, 7 insertions(+), 2 deletions(-)

Comments

Tony Dinh May 12, 2023, 8:44 p.m. UTC | #1
Hi Francis,

On Fri, May 12, 2023 at 1:07 PM Francis Laniel
<francis.laniel@amarulasolutions.com> wrote:
>
> This commit set CONFIG_HUSH_PARSER_2021 as the default to trigger the CI with
> this parser.
>
> Nonetheless, the keymile (i.e. VENDOR_KM) board family is not compatible with
> new 2021 hush parser.
> Indeed, 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].
>
> We also remove a #undef of CONFIG_FEATURE_SH_STANDALONE as it does not exist in
> U-Boot and causes troubles in the CI.
>
> We also set CONFIG_LTO for kirkwoord sheevaplug and phytec bk4r1, otherwise it
> hits its board size limit.

For Sheevaplug CONFIG_LTO:
Acked-by:  Tony Dinh <mibodhi@gmail.com>

All the best,
Tony
>
> We also disable some check for pylint as it was not able to find future for
> commit object.
>
> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
> [1] https://marc.info/?l=u-boot&m=165541917618725&w=2
> ---
>  cmd/Kconfig                  | 3 ++-
>  common/cli_hush_upstream.c   | 1 -
>  configs/sheevaplug_defconfig | 1 +
>  tools/patman/series.py       | 4 ++++
>  4 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index c0f0e05d2f..2d066f08ba 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/common/cli_hush_upstream.c b/common/cli_hush_upstream.c
> index 649775a7f7..5d329851c6 100644
> --- a/common/cli_hush_upstream.c
> +++ b/common/cli_hush_upstream.c
> @@ -427,7 +427,6 @@
>  #include "NUM_APPLETS.h"
>  #if NUM_APPLETS == 1
>  /* STANDALONE does not make sense, and won't compile */
> -# undef CONFIG_FEATURE_SH_STANDALONE
>  # undef ENABLE_FEATURE_SH_STANDALONE
>  # undef IF_FEATURE_SH_STANDALONE
>  # undef IF_NOT_FEATURE_SH_STANDALONE
> diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
> index 2e4901b840..365f779cc8 100644
> --- a/configs/sheevaplug_defconfig
> +++ b/configs/sheevaplug_defconfig
> @@ -16,6 +16,7 @@ CONFIG_ENV_OFFSET=0x80000
>  CONFIG_DEFAULT_DEVICE_TREE="kirkwood-sheevaplug"
>  CONFIG_IDENT_STRING="\nMarvell-Sheevaplug"
>  CONFIG_SYS_LOAD_ADDR=0x800000
> +CONFIG_LTO=y
>  CONFIG_HAS_BOARD_SIZE_LIMIT=y
>  CONFIG_BOARD_SIZE_LIMIT=524288
>  CONFIG_BOOTDELAY=3
> diff --git a/tools/patman/series.py b/tools/patman/series.py
> index 6866e1dbd0..f99818e33a 100644
> --- a/tools/patman/series.py
> +++ b/tools/patman/series.py
> @@ -316,6 +316,8 @@ class Series(dict):
>              # Show progress any commits that are taking forever
>              lastlen = 0
>              while True:
> +                # pylint does not find future which is set above.
> +                # pylint: disable=E1101
>                  left = [commit for commit in self.commits
>                          if not commit.future.done()]
>                  if not left:
> @@ -333,6 +335,8 @@ class Series(dict):
>              print('Cc processing complete')
>
>          for commit in self.commits:
> +            # pylint does not find future which is set above.
> +            # pylint: disable=E1101
>              cc = commit.future.result()
>              all_ccs += cc
>              print(commit.patch, '\0'.join(sorted(set(cc))), file=fd)
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/cmd/Kconfig b/cmd/Kconfig
index c0f0e05d2f..2d066f08ba 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/common/cli_hush_upstream.c b/common/cli_hush_upstream.c
index 649775a7f7..5d329851c6 100644
--- a/common/cli_hush_upstream.c
+++ b/common/cli_hush_upstream.c
@@ -427,7 +427,6 @@ 
 #include "NUM_APPLETS.h"
 #if NUM_APPLETS == 1
 /* STANDALONE does not make sense, and won't compile */
-# undef CONFIG_FEATURE_SH_STANDALONE
 # undef ENABLE_FEATURE_SH_STANDALONE
 # undef IF_FEATURE_SH_STANDALONE
 # undef IF_NOT_FEATURE_SH_STANDALONE
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 2e4901b840..365f779cc8 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -16,6 +16,7 @@  CONFIG_ENV_OFFSET=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-sheevaplug"
 CONFIG_IDENT_STRING="\nMarvell-Sheevaplug"
 CONFIG_SYS_LOAD_ADDR=0x800000
+CONFIG_LTO=y
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=524288
 CONFIG_BOOTDELAY=3
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 6866e1dbd0..f99818e33a 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -316,6 +316,8 @@  class Series(dict):
             # Show progress any commits that are taking forever
             lastlen = 0
             while True:
+                # pylint does not find future which is set above.
+                # pylint: disable=E1101
                 left = [commit for commit in self.commits
                         if not commit.future.done()]
                 if not left:
@@ -333,6 +335,8 @@  class Series(dict):
             print('Cc processing complete')
 
         for commit in self.commits:
+            # pylint does not find future which is set above.
+            # pylint: disable=E1101
             cc = commit.future.result()
             all_ccs += cc
             print(commit.patch, '\0'.join(sorted(set(cc))), file=fd)