All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Michal Simek <michal.simek@amd.com>
Cc: Tom Rini <trini@konsulko.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	 U-Boot Mailing List <u-boot@lists.denx.de>,
	Roger Quadros <rogerq@ti.com>,
	 Alper Nebi Yasak <alpernebiyasak@gmail.com>,
	Peter Geis <pgwipeout@gmail.com>,
	 Jerome Forissier <jerome.forissier@linaro.org>,
	huang lin <hl@rock-chips.com>,
	 Jeffy Chen <jeffy.chen@rock-chips.com>,
	Kever Yang <kever.yang@rock-chips.com>,
	Philipp Tomsich <philipp.tomsich@theobroma-systems.com>,
	 Ivan Mikhaylov <ivan.mikhaylov@siemens.com>,
	 Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	 Philippe Reynes <philippe.reynes@softathome.com>
Subject: Re: [PATCH v9 14/14] treewide: Disable USE_SPL_FIT_GENERATOR by default
Date: Mon, 9 Jan 2023 08:34:02 -0700	[thread overview]
Message-ID: <CAPnjgZ0QD+ZrBSV2yULYybnQ_Tst=gfvdxhXTAh0D6SfBGMs8g@mail.gmail.com> (raw)
In-Reply-To: <128e89b7-db5b-a842-6990-19c52de9da22@amd.com>

Hi Michal,

On Mon, 9 Jan 2023 at 04:07, Michal Simek <michal.simek@amd.com> wrote:
>
> Hi,
>
> On 1/8/23 20:36, Simon Glass wrote:
> > Hi Tom,
> >
> > On Sun, 8 Jan 2023 at 09:24, Tom Rini <trini@konsulko.com> wrote:
> >>
> >> On Sun, Jan 08, 2023 at 09:20:09AM -0700, Simon Glass wrote:
> >>> Hi Tom,
> >>>
> >>> On Sun, 8 Jan 2023 at 09:06, Tom Rini <trini@konsulko.com> wrote:
> >>>>
> >>>> On Sun, Jan 08, 2023 at 08:48:37AM -0700, Simon Glass wrote:
> >>>>> Hi Tom,
> >>>>>
> >>>>> On Sun, 8 Jan 2023 at 06:41, Tom Rini <trini@konsulko.com> wrote:
> >>>>>>
> >>>>>> On Sat, Jan 07, 2023 at 02:07:21PM -0700, Simon Glass wrote:
> >>>>>>
> >>>>>>> This option is deprecated and only used by two boards. Enable it
for just
> >>>>>>> those two boards, so others don't accidentally enable it.
> >>>>>>>
> >>>>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
> >>>>>> [snip]
> >>>>>>> diff --git a/boot/Kconfig b/boot/Kconfig
> >>>>>>> index 55f06761ef8..7ab0dd14211 100644
> >>>>>>> --- a/boot/Kconfig
> >>>>>>> +++ b/boot/Kconfig
> >>>>>>> @@ -282,12 +282,13 @@ config SPL_FIT_SOURCE
> >>>>>>>   config USE_SPL_FIT_GENERATOR
> >>>>>>>        bool "Use a script to generate the .its script"
> >>>>>>>        depends on SPL_FIT
> >>>>>>> -     default y if SPL_FIT && ARCH_ZYNQMP
> >>>>>>> +     help
> >>>>>>> +       This is deprecated. Please do not use it. Use binman
instead.
> >>>>>>
> >>>>>> Lets remove the text around bool so it can't be enabled, and move
to
> >>>>>> select'ing it from the two boards that need it. Michal, Luca,
what's
> >>>>>> needed to move your two platforms
> >>>>>> (avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0 and
xilinx_zynqmp_virt off
> >>>>>> of this very legacy option, given that other xilinx platforms have
> >>>>>> already migrated to binman ?
> >>>>>
> >>>>> That's a good idea, but these two boards do not have TARGET Kconfig
> >>>>> options so it is not possible without adding some Kconfig specific
to
> >>>>> those boards, then defining it in the defconfig files.
> >>>>>
> >>>>> We already have the legacy warning.
> >>>>
> >>>> Yes, but I swear these are new legacy users as when we started
trying to
> >>>> kill off this option it was just a few i.MX platforms lagging behind.
> >>>>
> >>>> Maybe make ARCH_ZYNQMP select DEPRECATED, USE_SPL_FIT_GENERATOR
depend
> >>>> on DEPRECATED and add "DERECATED" to the end of the text line?  Or
maybe
> >>>> Michal or Luca will speak up soon and migrate these over quickly so
we
> >>>> can just nuke this.
> >>>
> >>> Isn't that just more tortuous? I can disable SPL_LOAD_FIT on these two
> >>> boards since they don't appear in CI. Then they can convert them when
> >>> ready.
> >>>
> >>> That way we can drop the option now, if that is your goal.
> >>
> >> I thought xilinx_zynqmp_virt was in CI, but I see I'm mistaken. I still
> >> don't want to break platforms outright, and since it's Sunday right now
> >> afterall, we should let Michal and Luca a chance to catch up and chime
> >> in. I hope it's either going to be a quick conversion or expose
> >> something missing and needed in binman, as to why these still haven't
> >> been converted.
> >>
> >
> > OK let's hold off on this patch for now. It is just a clean-up anyway.
>
> First of all. ZynqMP is not wired in CI simply because we are missing
some bits
> and pieces in upstream qemu to run it. If we can wire it with Xilinx
version we
> can do it. I have asked to fix it our qemu team but they have never done
it.
>
> In U-Boot SPL flow this script is used all the time. I use it all the
time when
> I build work on ZynqMP. Also buildroot is using it.
>
> In connection to binman. I have looked at it 2/3 times in past. The
biggest
> issue which I have with it is that DT node presence in DT which goes to
the system.
>
> Here is example
>
> [u-boot](binman)$ make kontron_sl28_defconfig >/dev/null
> [u-boot](binman)$ make -j8 >/dev/null
> [u-boot](binman)$ dtc -I dtb -O dts dts/dt.dtb 2>/dev/null | grep binman
>         binman {
>                 binman = "/binman";
>                 u_boot_rom = "/binman/u-boot-rom";
>
> where binmap is the part of target DT.

Thanks for the info.

>
> It has side effects.
> 1. DT is bigger

From my experience the size increase typically is less than 2% which does
not seem significant.

> 2. It contains information how firmware was packed which is just
additional
> information which don't need to be shared.

That depends on the application. For firmware update and debugging it is
sometime necessary to see where everything is. While I understand the EFI
model of hiding everything away I believe that a better future for the
industry is to have the OS and firmware work together more.

> 3. binman node as is placed in not documented in dt binding to be able to
pass
> dtb check.

This is the root cause of all of the device tree woes. There was a small
amount of slow progress at the end of last year but now it has gone quiet.
I don't know what to do about this other than prod and wait, since Linux
controls the bindings. Perhaps this is something that could be worked out
f2f, I'm not sure. For now I will keep prodding and see what can be done.
But the initial target is the DM tags, with binman bindings somewhere down
the trackz although they may actually be easier.

It is easy enough to use fdtgrep to strip out the binman {} node if it is
not wanted. I will take a look at a feature for that, but I have a bit of a
backlog,with so many things up in the air, pending patches, etc.

>
> I can call binman externally but that would mean additional build step
which
> everybody wants to avoid.
> Can we update Makefile and add Kconfig option to pass configuration dtb
file
> instead of u-boot.dtb by default?
>
> Something like:
>
> diff --git a/Makefile b/Makefile
> index 75a599b2c437..4d8d67c7d938 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1322,7 +1322,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if
> $(BINMAN_DEBUG),-D) \
>                  $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \
>                   --toolpath $(objtree)/tools \
>                  $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \
> -               build -u -d u-boot.dtb -O . -m \
> +               build -u -d $(CONFIG_BINMAN_CONFIG_DTB) -O . -m \
>                  $(if $(BINMAN_ALLOW_MISSING),--allow-missing
--ignore-missing) \
>                  -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
>                  -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \
>
> Then by default u-boot.dtb can be used or platforms can use different
file.
> Then I would add zynqmp-binman.dts with configurations which can replace
> existing arch/arm/mach-zynqmp/mkimage_fit_atf.sh script.
> What do you think?

I'm sure you could do that locally, but I'd prefer to get the bindings
sorted out so that binman nodes can go in there, along with a Kconfig
option to enable/disable them. The more we bifurcate things, the more
complicated everything is.

For now, can you live with the binman nodes? What problem does it cause?

>
> BTW: Is there a way to generate also capsules from binman?

Is that an EFI capsule? If so, I haven't seen any work on that yet.

Regards,
Simon

  parent reply	other threads:[~2023-01-09 15:34 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 21:07 [PATCH v9 00/14] binman: rockchip: Migrate from rockchip SPL_FIT_GENERATOR script Simon Glass
2023-01-07 21:07 ` [PATCH v9 01/14] binman: Allow writing section contents to a file Simon Glass
2023-01-07 21:07 ` [PATCH v9 02/14] binman: Tidy up comment in fit _gen_node Simon Glass
2023-01-07 21:07 ` [PATCH v9 03/14] binman: Update entry docs Simon Glass
2023-01-07 21:07 ` [PATCH v9 04/14] binman: Use a reference for binman symbols docs Simon Glass
2023-01-07 21:07 ` [PATCH v9 05/14] binman: Support optional entries Simon Glass
2023-01-07 21:07 ` [PATCH v9 06/14] binman: Add a way to check for a valid ELF file Simon Glass
2023-01-07 21:07 ` [PATCH v9 07/14] binman: Support new op-tee binary format Simon Glass
2023-01-07 21:07 ` [PATCH v9 08/14] binman: Support optional external blobs Simon Glass
2023-01-07 21:07 ` [PATCH v9 09/14] rockchip: evb-rk3288: Drop raw-image support Simon Glass
2023-01-07 21:07 ` [PATCH v9 10/14] rockchip: Use multiple-images for rk3399 Simon Glass
2023-01-07 21:07 ` [PATCH v9 11/14] rockchip: Support building the all output files in binman Simon Glass
2023-01-07 21:07 ` [PATCH v9 12/14] rockchip: Convert all boards to use binman Simon Glass
2023-01-07 21:07 ` [PATCH v9 13/14] rockchip: Drop the FIT generator script Simon Glass
2023-01-07 21:07 ` [PATCH v9 14/14] treewide: Disable USE_SPL_FIT_GENERATOR by default Simon Glass
2023-01-08 13:41   ` Tom Rini
2023-01-08 15:48     ` Simon Glass
2023-01-08 16:06       ` Tom Rini
2023-01-08 16:20         ` Simon Glass
2023-01-08 16:24           ` Tom Rini
2023-01-08 19:36             ` Simon Glass
2023-01-09  8:56               ` Luca Ceresoli
2023-01-09 14:13                 ` Tom Rini
2023-01-09 14:29                   ` Michal Simek
2023-01-09 11:07               ` Michal Simek
2023-01-09 14:12                 ` Tom Rini
2023-01-09 14:37                   ` Michal Simek
2023-01-09 15:05                     ` Tom Rini
2023-01-09 15:34                 ` Simon Glass [this message]
2023-01-10 15:16                   ` Michal Simek
2023-01-15 16:31                     ` Simon Glass
2023-01-16 10:25                       ` Michal Simek
2023-01-09 18:55               ` Tom Rini
2023-01-19  2:11 ` [PATCH v9 12/14] rockchip: Convert all boards to use binman Simon Glass
2023-01-19  2:11 ` [PATCH v9 08/14] binman: Support optional external blobs Simon Glass

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='CAPnjgZ0QD+ZrBSV2yULYybnQ_Tst=gfvdxhXTAh0D6SfBGMs8g@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=alpernebiyasak@gmail.com \
    --cc=hl@rock-chips.com \
    --cc=ivan.mikhaylov@siemens.com \
    --cc=jeffy.chen@rock-chips.com \
    --cc=jerome.forissier@linaro.org \
    --cc=kever.yang@rock-chips.com \
    --cc=luca.ceresoli@bootlin.com \
    --cc=michal.simek@amd.com \
    --cc=pgwipeout@gmail.com \
    --cc=philipp.tomsich@theobroma-systems.com \
    --cc=philippe.reynes@softathome.com \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=rogerq@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.