u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Tony Dinh <mibodhi@gmail.com>
To: "Francis Laniel" <francis.laniel@amarulasolutions.com>,
	"Tom Rini" <trini@konsulko.com>, "Pali Rohár" <pali@kernel.org>,
	"Stefan Roese" <sr@denx.de>
Cc: u-boot@lists.denx.de,
	 Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Simon Glass <sjg@chromium.org>,  Harald Seiler <hws@denx.de>,
	"Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr>,
	Sergei Antonov <saproj@gmail.com>,
	 Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	 Masahisa Kojima <masahisa.kojima@linaro.org>,
	John Keeping <john@metanate.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Roger Knecht <rknecht@pm.me>,
	 Sughosh Ganu <sughosh.ganu@linaro.org>,
	Alexey Romanov <avromanov@sberdevices.ru>,
	 Patrice Chotard <patrice.chotard@foss.st.com>,
	Fabrice Gasnier <fabrice.gasnier@foss.st.com>,
	 Hector Palacios <hector.palacios@digi.com>,
	Marek Vasut <marex@denx.de>,
	 Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	 Linus Walleij <linus.walleij@linaro.org>,
	Rui Miguel Silva <rui.silva@linaro.org>,
	Andrew Scull <ascull@google.com>
Subject: Re: [RFC PATCH v7 23/23] DO NOT MERGE: only to make CI happy
Date: Fri, 31 Mar 2023 16:17:44 -0700	[thread overview]
Message-ID: <CAJaLiFx45ommQJ5BET7N8OLdY6ZaN7ZbPAkq2fKx9N0vokmrbg@mail.gmail.com> (raw)
In-Reply-To: <12179610.O9o76ZdvQC@pwmachine>

Hi Francis,

On Thu, Mar 30, 2023 at 3:14 PM Francis Laniel
<francis.laniel@amarulasolutions.com> wrote:
>
> Hi.
>
> Le jeudi 30 mars 2023, 21:17:33 WEST Tony Dinh a écrit :
> > Hi Francis,
> >
> > On Thu, Mar 30, 2023 at 12:50 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.
> > > 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.
>
> You are welcome!
> I nonetheless cannot ensure the modifications I brought to the code are correct
> as I do not have the board to test them.
> So, if you can test it on a board it will be really welcomed and in case you
> find any problem I will add your suggested changes to the commit!

I applied the arch/arm/lib/lib1funcs.S patch, built, and ran the
u-boot-2023.04-rc5 for Pogo V4 board (Kirkwood 6192 SoC). Everything
is working fine. Thanks!

Is it possible for you to send in this patch for lib1funcs.S
separately? Given this RFC patch series probably will take a while to
get merged. In the meantime, it would be great to have this earlier so
we all can start building LTO+Thumb enabled u-boots with gcc 12.x. I
can do more testing with other boards that have CONFIG_HAS_THUMB2 and
CONFIG_SPL_SYS_THUMB_BUILD. Please let me know if I can help with that
individual patch.

Ref [1] https://lists.denx.de/pipermail/u-boot/2022-November/500460.html
Ref [2] https://lists.denx.de/pipermail/u-boot/2022-November/500463.html

Tested-by: Tony Dinh <mibodhi@gmail.com>

All the best,
Tony

>
> >
> > All the best,
> > Tony
> >
> > > Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
> > > [1] https://marc.info/?l=u-boot&m=165541917618725&w=2
> > > [2]
> > > https://github.com/gcc-mirror/gcc/blob/4f181f9c7ee3efc509d185fdfda33be901
> > > 8f1611/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/4f181f9c7ee3efc509d185fdfda33be901
> > > 8f1611/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
>
>
> Best regards.
>
>

      reply	other threads:[~2023-03-31 23:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 19:46 [RFC PATCH v7 00/23] Modernize U-Boot shell Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 01/23] test: Add framework to test hush behavior Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 02/23] test: hush: Test hush if/else Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 03/23] test/py: hush_if_test: Remove the test file Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 04/23] test: hush: Test hush variable expansion Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:46 ` [RFC PATCH v7 05/23] test: hush: Test hush commands list Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 06/23] test: hush: Test hush loops Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 07/23] cli: Add Busybox upstream hush.c file Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 08/23] cli: Port Busybox 2021 hush to U-Boot Francis Laniel
2023-03-30 19:46 ` [RFC PATCH v7 09/23] cli: Add menu for hush parser Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:46 ` [RFC PATCH v7 10/23] global_data.h: add GD_FLG_HUSH_OLD_PARSER flag Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:46 ` [RFC PATCH v7 11/23] cmd: Add new parser command Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-04-01 22:44     ` Francis Laniel
2023-03-30 19:47 ` [RFC PATCH v7 12/23] cli: Enables using hush 2021 parser as command line parser Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:47 ` [RFC PATCH v7 13/23] cli: hush_2021: Enable variables expansion for hush 2021 Francis Laniel
2023-03-30 19:47 ` [RFC PATCH v7 14/23] cli: hush_2021: Add functions to be called from run_command() Francis Laniel
2023-03-30 19:47 ` [RFC PATCH v7 15/23] cli: add hush 2021 as parser for run_command*() Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:47 ` [RFC PATCH v7 16/23] test: hush: Fix instructions list tests for hush 2021 Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:47 ` [RFC PATCH v7 17/23] test: hush: Fix variable expansion " Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:47 ` [RFC PATCH v7 18/23] cli: hush_2021: Enable using < and > as string compare operators Francis Laniel
2023-03-30 19:47 ` [RFC PATCH v7 19/23] cli: hush_2021: Enable if keyword Francis Laniel
2023-03-30 19:47 ` [RFC PATCH v7 20/23] cli: hush_2021: Enable loops Francis Laniel
2023-03-30 19:47 ` [RFC PATCH v7 21/23] test: hush: Fix loop tests for hush 2021 Francis Laniel
2023-04-01  6:32   ` Simon Glass
2023-03-30 19:47 ` [RFC PATCH v7 22/23] cli: hush_2021: Add upstream commits up to 30th January 2023 Francis Laniel
2023-03-30 19:47 ` [RFC PATCH v7 23/23] DO NOT MERGE: only to make CI happy Francis Laniel
2023-03-30 20:17   ` Tony Dinh
2023-03-30 22:14     ` Francis Laniel
2023-03-31 23:17       ` Tony Dinh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJaLiFx45ommQJ5BET7N8OLdY6ZaN7ZbPAkq2fKx9N0vokmrbg@mail.gmail.com \
    --to=mibodhi@gmail.com \
    --cc=albert.aribaud@3adev.fr \
    --cc=ascull@google.com \
    --cc=avromanov@sberdevices.ru \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=francis.laniel@amarulasolutions.com \
    --cc=hector.palacios@digi.com \
    --cc=hws@denx.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=john@metanate.com \
    --cc=linus.walleij@linaro.org \
    --cc=marex@denx.de \
    --cc=masahisa.kojima@linaro.org \
    --cc=michael@amarulasolutions.com \
    --cc=neil.armstrong@linaro.org \
    --cc=pali@kernel.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=rknecht@pm.me \
    --cc=rui.silva@linaro.org \
    --cc=saproj@gmail.com \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=sughosh.ganu@linaro.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).