Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Neal Frager <neal.frager@amd.com>
Cc: michal.simek@amd.com, ibai.erkiaga-elorza@amd.com,
	luca.ceresoli@bootlin.com, thomas.petazzoni@bootlin.com,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware
Date: Thu, 6 Jun 2024 19:12:20 +0200	[thread overview]
Message-ID: <ZmHt9EUdlvHV30CY@landeda> (raw)
In-Reply-To: <20240304074140.1537910-1-neal.frager@amd.com>

Neal, All,

I had a quick look, and there is something I don;t really like...

On 2024-03-04 07:41 +0000, Neal Frager via buildroot spake thusly:
> This patch adds a new boot firmware to buildroot for building the zynqmp pmufw.
> It requires the toolchain-bare-metal package that includes a bare-metal
> binutils, gcc and newlib which can be built for the microblaze architecture.
[--SNIP--]
> diff --git a/boot/zynqmp-firmware/Config.in b/boot/zynqmp-firmware/Config.in
> new file mode 100644
> index 0000000000..d68ec2cf6a
> --- /dev/null
> +++ b/boot/zynqmp-firmware/Config.in
> @@ -0,0 +1,22 @@
> +config BR2_TARGET_ZYNQMP_FIRMWARE
> +	bool "zynqmp-firmware"
> +	select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT

This and [0]...

[--SNIP--]
> diff --git a/boot/zynqmp-firmware/zynqmp-firmware.mk b/boot/zynqmp-firmware/zynqmp-firmware.mk
> new file mode 100644
> index 0000000000..383d888fba
> --- /dev/null
> +++ b/boot/zynqmp-firmware/zynqmp-firmware.mk
> @@ -0,0 +1,33 @@
[--SNIP--]
> +ZYNQMP_PMUFW = $(@D)/lib/sw_apps/zynqmp_pmufw/src/executable.elf

    $ ./utils/docker-run make check-package
    boot/zynqmp-firmware/zynqmp-firmware.mk:27: possible typo: ZYNQMP_PMUFW -> *ZYNQMP_FIRMWARE*

[--SNIP--]
> diff --git a/toolchain/toolchain-bare-metal-buildroot/Config.in b/toolchain/toolchain-bare-metal-buildroot/Config.in
> index 6fe969357f..7d33a68c5c 100644
> --- a/toolchain/toolchain-bare-metal-buildroot/Config.in
> +++ b/toolchain/toolchain-bare-metal-buildroot/Config.in
> @@ -2,6 +2,7 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT
>  
>  config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH
>  	string "architecture tuple"
> +	default "microblazeel-xilinx-elf" if BR2_TARGET_ZYNQMP_FIRMWARE

...[0] this are smelly to me.

It wokrs in your specific case, because all you do is target a
microblazeel-xilinx-elf and zynqmp-firmware is the first package that
depends on a bare-metal toolchain to be built [2]

But nothign prevents other situations:

  - user manually changes BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH to
    another tuple, e.g. arm-gnu

  - another package does sopmething similar with another tuple, like
    riscv64-elf

The bare-metal toolchain can currently be built only for one and only
one tuple, so this can't work nicely.

Instead, I think we should go another rooute:

    config BR2_TARGET_ZYNQMP_FIRMWARE
        bool "zynqmp-firmware"
        depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_TUPLE = "microblazeel-xilinx-elf"

    comment "zynqmp-firmware needs a bare metal toolchain for tuple microblazeel-xilinx-elf"
        depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_TUPLE != "microblazeel-xilinx-elf"

[2] Note that we already have a few pre-built bare-metal toolchains:
    - package/arm-gnu-toolchain/
    package/riscv64-elf-toolchain/
    So it is not unconceivalbe that at some point we will want to be
    able to actually build suhc toolchains...

Regards,
Yann E. MORIN.

>  	help
>  	  This option allows to define the architecture tuple for the
>  	  bare-metal toolchain.
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2024-06-06 17:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04  7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
2024-03-04  7:41 ` [Buildroot] [PATCH v11 2/6] boot/uboot.mk: new zynqmp pmufw build option Neal Frager via buildroot
2024-03-08 21:45   ` Luca Ceresoli via buildroot
2024-03-04  7:41 ` [Buildroot] [PATCH v11 3/6] configs/zynqmp*: build pmufw source Neal Frager via buildroot
2024-03-08 21:45   ` Luca Ceresoli via buildroot
2024-03-04  7:41 ` [Buildroot] [PATCH v11 4/6] boot/versal-firmware: new boot firmware Neal Frager via buildroot
2024-03-08 21:45   ` Luca Ceresoli via buildroot
2024-03-04  7:41 ` [Buildroot] [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source Neal Frager via buildroot
2024-03-08 21:46   ` Luca Ceresoli via buildroot
2024-03-04  7:41 ` [Buildroot] [PATCH v11 6/6] package/versal-firmware: remove package Neal Frager via buildroot
2024-03-08 21:46   ` Luca Ceresoli via buildroot
2024-03-08 21:45 ` [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Luca Ceresoli via buildroot
2024-03-21  9:03   ` Frager, Neal via buildroot
2024-04-03  7:21   ` Frager, Neal via buildroot
2024-06-06 17:12 ` Yann E. MORIN [this message]
2024-06-07  6:29   ` 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=ZmHt9EUdlvHV30CY@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=luca.ceresoli@bootlin.com \
    --cc=michal.simek@amd.com \
    --cc=neal.frager@amd.com \
    --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