Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli via buildroot <buildroot@buildroot.org>
To: Neal Frager <neal.frager@amd.com>
Cc: ibai.erkiaga-elorza@amd.com, brandon.maier@collins.com,
	ju.o@free.fr, thomas.petazzoni@bootlin.com,
	buildroot@buildroot.org, romain.naour@smile.fr,
	michal.simek@amd.com
Subject: Re: [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option
Date: Mon, 20 Jan 2025 18:33:21 +0100	[thread overview]
Message-ID: <20250120183321.2dd343a9@booty> (raw)
In-Reply-To: <20250120113405.3938838-2-neal.frager@amd.com>

On Mon, 20 Jan 2025 11:34:03 +0000
Neal Frager <neal.frager@amd.com> wrote:

> The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option will enable u-boot to
> use the xilinx-embeddedsw package for building a pmufw.elf that gets included
> in the generated boot.bin.
> 
> If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option is enabled, then the
> BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw from a
> custom location will be ignored.
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> V1->V2:
> - edited Config.in help text to fit within 70 characters
> ---
>  boot/uboot/Config.in | 27 +++++++++++++++++++++++++++
>  boot/uboot/uboot.mk  |  5 ++++-
>  2 files changed, 31 insertions(+), 1 deletion(-)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index b6ac2f9380..430191d213 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -572,6 +572,27 @@ config BR2_TARGET_UBOOT_ZYNQMP
>  
>  if BR2_TARGET_UBOOT_ZYNQMP
>  
> +choice
> +	prompt "xilinx-prebuilt pmufw.elf or build pmufw.elf from source"

Not a very clear string IMO, it should not list the options in the
choice title. I'd rather change it to "PMUFW origin".

> +	default BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> +	help
> +	  Choose between installing the pmufw.elf from
> +	  xilinx-prebuilt or building the pmufw.elf from
> +	  xilinx-embeddedsw.
> +
> +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> +	bool "xilinx-embeddedsw build pmufw.elf from source"

And I'd change this to "Build from source via xilinx-embeddedsw"

> +	depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> +	depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW

Not sure what is best here:

 a) if xilinx-embeddedsw is enabled, show the option in the choice menu
 b) if the choice is selected in the menu, enable xilinx-embeddedsw

a) is what you implemented, b) is what I had in mind before reading
this patch and it would look more intuitive for users I think. The same
applies for the xilinx-prebuilt option.

Opinions from Buildroot maintainers would be welcome here.

> +	help
> +	  Use xilinx-embeddedsw boot package for building
> +	  zynqmp pmufw.elf from
> +	    https://github.com/Xilinx/embeddedsw repo.
> +
> +	  U-Boot build process will generate a boot.bin (to be loaded
> +	  by the ZynqMP boot ROM) containing both the U-Boot SPL and
> +	  the PMU firmware in the Xilinx-specific boot format.
> +
>  config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
>  	bool "xilinx-prebuilt pmufw.elf"

And this to "Prebuilt via xilinx-prebuilt"

>  	depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> @@ -585,9 +606,15 @@ config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
>  	  by the ZynqMP boot ROM) containing both the U-Boot SPL and the
>  	  PMU firmware in the Xilinx-specific boot format.
>  
> +endchoice
> +
> +comment "If xilinx-embeddedsw or xilinx-prebuilt is selected for pmufw.elf, custom PMU firmware location will be ignored."
> +	depends on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW || BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT

This is not needed. If any of those two is selected,
BR2_TARGET_UBOOT_ZYNQMP_PMUFW will not be visible. The commit message
needs to be updated accordingly. See below however.

>  config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
>  	string "Custom PMU firmware location"
>  	depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> +	depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
>  	depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT

I think BR2_TARGET_UBOOT_ZYNQMP_PMUFW should become a third option in
the choice you are adding above. In other words we should ask users
"How do you want to get the pmufw? Build from source, download from
xilinx-prebuilt or pre-built at a custom location you provide?".

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-01-20 17:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 11:34 [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option Neal Frager via buildroot
2025-01-20 17:33   ` Luca Ceresoli via buildroot [this message]
2025-01-21  8:40     ` Frager, Neal via buildroot
2025-01-21 14:42       ` Luca Ceresoli via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 3/4] configs/zynqmp_*: migrate to xilinx-embeddedsw Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 4/4] configs/versal_*: " Neal Frager via buildroot
2025-01-20 17:33 ` [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Luca Ceresoli
2025-01-21  8:28   ` Frager, Neal via buildroot
2025-01-23 16:47 ` Arnout Vandecappelle via buildroot
2025-01-23 16:48   ` Arnout Vandecappelle via buildroot
2025-01-23 16:50   ` Frager, Neal via buildroot

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=20250120183321.2dd343a9@booty \
    --to=buildroot@buildroot.org \
    --cc=brandon.maier@collins.com \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=ju.o@free.fr \
    --cc=luca.ceresoli@bootlin.com \
    --cc=michal.simek@amd.com \
    --cc=neal.frager@amd.com \
    --cc=romain.naour@smile.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /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