[RFC PATCH v7 23/23] DO NOT MERGE: only to make CI happy

Tony Dinh mibodhi at gmail.com
Thu Mar 30 22:17:33 CEST 2023


Hi Francis,

On Thu, Mar 30, 2023 at 12:50 PM Francis Laniel
<francis.laniel at 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.
> By enabling this option, we also had to add assembly for __gnu_thumb1_case_si.
> It was taken from upstream gcc and adapted as width suffix was removed for the
> add [2].

Thanks for adding __gnu_thumb1_case_si ! It will help not just the
Sheevaplug board, but also a few other boards too. I'll give this a
try.

All the best,
Tony

>
> Signed-off-by: Francis Laniel <francis.laniel at amarulasolutions.com>
> [1] https://marc.info/?l=u-boot&m=165541917618725&w=2
> [2] https://github.com/gcc-mirror/gcc/blob/4f181f9c7ee3efc509d185fdfda33be9018f1611/libgcc/config/arm/lib1funcs.S#L2156
> ---
>  arch/arm/lib/lib1funcs.S     | 17 +++++++++++++++++
>  cmd/Kconfig                  |  3 ++-
>  common/cli_hush_upstream.c   |  1 -
>  configs/bk4r1_defconfig      |  1 +
>  configs/sheevaplug_defconfig |  1 +
>  5 files changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S
> index de15d09e36..a1f44d9454 100644
> --- a/arch/arm/lib/lib1funcs.S
> +++ b/arch/arm/lib/lib1funcs.S
> @@ -419,4 +419,21 @@ ENTRY(__gnu_thumb1_case_uhi)
>         ret     lr
>  ENDPROC(__gnu_thumb1_case_uhi)
>  .popsection
> +
> +/* Taken and adapted from: https://github.com/gcc-mirror/gcc/blob/4f181f9c7ee3efc509d185fdfda33be9018f1611/libgcc/config/arm/lib1funcs.S#L2156 */
> +.pushsection .text.__gnu_thumb1_case_si, "ax"
> +ENTRY(__gnu_thumb1_case_si)
> +       push    {r0, r1}
> +       mov     r1, lr
> +       adds    r1, r1, #2      /* Align to word.  */
> +       lsrs    r1, r1, #2
> +       lsls    r0, r0, #2
> +       lsls    r1, r1, #2
> +       ldr     r0, [r1, r0]
> +       adds    r0, r0, r1
> +       mov     lr, r0
> +       pop     {r0, r1}
> +       mov     pc, lr          /* We know we were called from thumb code.  */
> +ENDPROC(__gnu_thumb1_case_si)
> +.popsection
>  #endif
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index 1b9d04680d..d4809fcfa4 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 93796e87c5..78a13eeb62 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/bk4r1_defconfig b/configs/bk4r1_defconfig
> index 66adeac725..95f0c30cde 100644
> --- a/configs/bk4r1_defconfig
> +++ b/configs/bk4r1_defconfig
> @@ -18,6 +18,7 @@ CONFIG_TARGET_BK4R1=y
>  CONFIG_SYS_LOAD_ADDR=0x82000000
>  CONFIG_SYS_MEMTEST_START=0x80010000
>  CONFIG_SYS_MEMTEST_END=0x87c00000
> +CONFIG_LTO=y
>  CONFIG_HAS_BOARD_SIZE_LIMIT=y
>  CONFIG_BOARD_SIZE_LIMIT=520192
>  CONFIG_FIT=y
> 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
> --
> 2.34.1
>


More information about the U-Boot mailing list