Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Brandon Maier via buildroot <buildroot@buildroot.org>
To: Neal Frager via buildroot <buildroot@buildroot.org>
Cc: ibai.erkiaga-elorza@amd.com, luca.ceresoli@bootlin.com,
	thomas.petazzoni@bootlin.com, Neal Frager <neal.frager@amd.com>,
	michal.simek@amd.com, yann.morin.1998@free.fr
Subject: Re: [Buildroot] [PATCH v12 1/3] boot/zynqmp-firmware: new boot firmware
Date: Mon, 10 Jun 2024 13:12:24 +0000	[thread overview]
Message-ID: <Zmb7uMNqFU1ihhVg@bspbox.kirk> (raw)
In-Reply-To: <20240607094705.1962913-1-neal.frager@amd.com>

Hi Neal,

On Fri, Jun 07, 2024 at 10:47:03AM +0100, Neal Frager via buildroot wrote:
> 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.
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> V1->V2:
>  - builds a bare-metal gcc toolchain instead of requiring an external
>    microblaze toolchain
> V2->V3:
>  - corrected custom cflags option
>  - added support for xilinx_v2022.2 version
>  - added zynqmp-firmware.hash
> V3->V4:
>  - no changes
> V4->V5:
>  - reduced all lines to <80 chars
> V5->V6:
>  - migrated to toolchain-bare-metal-buildroot
> V6->V7:
>  - removed patch numbers
>  - changed dependency to toolchain-bare-metal-buildroot
>  - removed hash since version is configurable
> V7->V9:
>  - no changes
> V9->V10:
>  - removed patches for supporting versions older than xilinx_v2023.2
> V10->V11:
>  - set default BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH to
>    "microblazeel-xilinx-elf" to avoid stand-alone build failure
> V11->V12:
>  - replace select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT with depends
>  - change variable name for check-package warning
> ---
>  DEVELOPERS                              |  1 +
>  boot/Config.in                          |  1 +
>  boot/zynqmp-firmware/Config.in          | 25 +++++++++++++++++++
>  boot/zynqmp-firmware/zynqmp-firmware.mk | 33 +++++++++++++++++++++++++
>  4 files changed, 60 insertions(+)
>  create mode 100644 boot/zynqmp-firmware/Config.in
>  create mode 100644 boot/zynqmp-firmware/zynqmp-firmware.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index cf48e01037..f3ff2cbbd5 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2337,6 +2337,7 @@ N:	Neal Frager <neal.frager@amd.com>
>  F:	board/versal/
>  F:	board/zynq/
>  F:	board/zynqmp/
> +F:	boot/zynqmp-firmware/
>  F:	configs/versal_vck190_defconfig
>  F:	configs/zynq_zc702_defconfig
>  F:	configs/zynq_zc706_defconfig
> diff --git a/boot/Config.in b/boot/Config.in
> index 87e1b7c00e..64b1c8c420 100644
> --- a/boot/Config.in
> +++ b/boot/Config.in
> @@ -23,5 +23,6 @@ source "boot/ti-k3-boot-firmware/Config.in"
>  source "boot/ti-k3-r5-loader/Config.in"
>  source "boot/uboot/Config.in"
>  source "boot/vexpress-firmware/Config.in"
> +source "boot/zynqmp-firmware/Config.in"
>  
>  endmenu
> diff --git a/boot/zynqmp-firmware/Config.in b/boot/zynqmp-firmware/Config.in
> new file mode 100644
> index 0000000000..478d58d552
> --- /dev/null
> +++ b/boot/zynqmp-firmware/Config.in
> @@ -0,0 +1,25 @@
> +config BR2_TARGET_ZYNQMP_FIRMWARE
> +	bool "zynqmp-firmware"
> +	depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH = "microblazeel-xilinx-elf"
> +	help
> +	  This package builds the PMU Firmware application required
> +	  to run U-Boot and Linux in the Zynq MPSoC devices.
> +
> +if BR2_TARGET_ZYNQMP_FIRMWARE
> +
> +comment "zynqmp-firmware needs a bare metal toolchain for tuple microblazeel-xilinx-elf"
> +	depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH != "microblazeel-xilinx-elf"
> +
> +config BR2_TARGET_ZYNQMP_FIRMWARE_VERSION
> +	string "firmware version"
> +	default "xilinx_v2024.1"
> +	help
> +	  Release version of zynqmp firmware.
> +	  Only versions xilinx_v2023.2 and newer are supported.
> +
> +config BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS
> +	string "custom cflags"
> +	help
> +	  Adds additional CFLAGS for building zynqmp firmware.
> +
> +endif # BR2_TARGET_ZYNQMP_FIRMWARE
> diff --git a/boot/zynqmp-firmware/zynqmp-firmware.mk b/boot/zynqmp-firmware/zynqmp-firmware.mk
> new file mode 100644
> index 0000000000..dafb2dbe55
> --- /dev/null
> +++ b/boot/zynqmp-firmware/zynqmp-firmware.mk
> @@ -0,0 +1,33 @@
> +################################################################################
> +#
> +# zynqmp-firmware
> +#
> +################################################################################
> +
> +ZYNQMP_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ZYNQMP_FIRMWARE_VERSION))
> +ZYNQMP_FIRMWARE_SITE = \
> +	$(call github,Xilinx,embeddedsw,$(ZYNQMP_FIRMWARE_VERSION))
> +ZYNQMP_FIRMWARE_LICENSE = MIT

In the license.txt there are other SPDX licenses types.

  $ grep SPDX license.txt | awk '{print $1 " " $2}' | sort | uniq
  SPDX-License-Identifier: BSD-2-Clause
  SPDX-License-Identifier: BSD-3-Clause
  SPDX-License-Identifier: GPL-2.0
  SPDX-License-Identifier: MIT

Should these be added?

From https://github.com/Xilinx/embeddedsw/blob/master/license.txt

> +ZYNQMP_FIRMWARE_LICENSE_FILES = license.txt
> +ZYNQMP_FIRMWARE_INSTALL_IMAGES = YES
> +ZYNQMP_FIRMWARE_INSTALL_TARGET = NO
> +ZYNQMP_FIRMWARE_DEPENDENCIES = toolchain-bare-metal-buildroot
> +
> +CUSTOM_CFLAGS = $(call qstrip,$(BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS))
> +ZYNQMP_FIRMWARE_CFLAGS = "-Os -flto -ffat-lto-objects $(CUSTOM_CFLAGS)"
> +
> +define ZYNQMP_FIRMWARE_BUILD_CMDS
> +	$(MAKE) -C $(@D)/lib/sw_apps/zynqmp_pmufw/src \
> +		COMPILER=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc \
> +		ARCHIVER=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc-ar \
> +		CC=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc \
> +		CFLAGS=$(ZYNQMP_FIRMWARE_CFLAGS)
> +endef
> +
> +ZYNQMP_FIRMWARE = $(@D)/lib/sw_apps/zynqmp_pmufw/src/executable.elf
> +
> +define ZYNQMP_FIRMWARE_INSTALL_IMAGES_CMDS
> +	$(INSTALL) -D -m 0755 $(ZYNQMP_FIRMWARE) $(BINARIES_DIR)/pmufw.elf
> +endef
> +
> +$(eval $(generic-package))
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

Thanks,
Brandon Maier
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07  9:47 [Buildroot] [PATCH v12 1/3] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
2024-06-07  9:47 ` [Buildroot] [PATCH v12 2/3] boot/uboot.mk: new zynqmp pmufw build option Neal Frager via buildroot
2024-06-10 14:42   ` Brandon Maier via buildroot
2024-06-07  9:47 ` [Buildroot] [PATCH v12 3/3] configs/zynqmp*: build pmufw source Neal Frager via buildroot
2024-06-10 14:44   ` Brandon Maier via buildroot
2024-06-07 10:04 ` [Buildroot] [PATCH v12 1/3] boot/zynqmp-firmware: new boot firmware Frager, Neal via buildroot
2024-06-07 11:22 ` Yann E. MORIN
2024-06-07 11:41   ` Frager, Neal via buildroot
2024-06-10 13:12 ` Brandon Maier via buildroot [this message]
2024-06-11  4:25   ` 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=Zmb7uMNqFU1ihhVg@bspbox.kirk \
    --to=buildroot@buildroot.org \
    --cc=brandon.maier@collins.com \
    --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 \
    --cc=yann.morin.1998@free.fr \
    /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