From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 1/3] uboot: zynqmp: generate SPL image with PMUFW binary
Date: Sat, 28 Jul 2018 19:37:53 +0200 [thread overview]
Message-ID: <20180728193753.686dbf7b@windsurf> (raw)
In-Reply-To: <20180725143538.25268-2-luca@lucaceresoli.net>
Hello,
On Wed, 25 Jul 2018 16:35:36 +0200, Luca Ceresoli wrote:
> In order to boot on the Xilinx ZynqMP SoCs, U-Boot SPL requires a
> recent PMU firmware loaded. Instruct U-Boot to add pmufw.bin to the
> boot.bin file together with U-Boot SPL, and the boot ROM will load
> both.
>
> For this to work properly, a patch to U-Boot is needed. However this
> patch must be applied by each defconfig that wishes to use
> BR2_TARGET_UBOOT_ZYNQMP_PMUFW. If it were in boot/uboot/ to be applied
> unconditionally, it would break the build for configs using a U-Boot
> version higher than 2018.7-rc1 where the patch is already applied.
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Joel Carlson <joelsoncarl@gmail.com>
I have applied, with some minor changes, see below.
> +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
> + string "PMU firmware location"
> + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> + help
> + Location of a PMU firmware binary.
> +
> + If not empty, instructs the U-Boot build process to 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.
> +
> + The value can be an absolute or relative path, and will be
> + used directly from where it is located, or an URI
> + (e.g. http://...), and it will be downloaded and used from
> + the download directory.
> +
> + If empty, the generated boot.bin will not contain a PMU
> + firmware.
I've added a note explaining that this feature requires U-Boot >=
2018.07.
> +ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y)
> +
> +UBOOT_ZYNQMP_PMUFW = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PMUFW))
> +
> +ifneq ($(findstring ://,$(UBOOT_ZYNQMP_PMUFW)),)
> +UBOOT_EXTRA_DOWNLOADS += $(UBOOT_ZYNQMP_PMUFW)
> +BR_NO_CHECK_HASH_FOR += $(notdir $(UBOOT_ZYNQMP_PMUFW))
> +define UBOOT_ZYNQMP_KCONFIG_PMUFW
> + $(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(UBOOT_DL_DIR)/$(notdir $(UBOOT_ZYNQMP_PMUFW))", \
> + $(@D)/.config)
> +endef
> +else ifneq ($(UBOOT_ZYNQMP_PMUFW),)
> +define UBOOT_ZYNQMP_KCONFIG_PMUFW
> + $(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(shell readlink -f $(UBOOT_ZYNQMP_PMUFW))", \
> + $(@D)/.config)
> +endef
> +endif
I've refactored this to avoid the duplication of
UBOOT_ZYNQMP_KCONFIG_PMUFW. Instead, I've defined
UBOOT_ZYNQMP_PMUFW_PATH which contains the path to the PMU firmware,
and used it in a single definition of UBOOT_ZYNQMP_KCONFIG_PMUFW.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-07-28 17:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-25 14:35 [Buildroot] [PATCH v5 0/3] Add Xilinx ZynqMP and ZCU106 board support Luca Ceresoli
2018-07-25 14:35 ` [Buildroot] [PATCH v5 1/3] uboot: zynqmp: generate SPL image with PMUFW binary Luca Ceresoli
2018-07-26 20:04 ` Joel Carlson
2018-07-28 17:37 ` Thomas Petazzoni [this message]
2018-07-28 22:36 ` Luca Ceresoli
2018-07-25 14:35 ` [Buildroot] [PATCH v5 2/3] configs/zynqmp_zcu106_defconfig: add Xilinx ZCU106 board (ZynqMP SoC) Luca Ceresoli
2018-07-26 20:14 ` Joel Carlson
2018-07-28 17:38 ` Thomas Petazzoni
2018-07-25 14:35 ` [Buildroot] [PATCH v5 3/3] uboot: zynqmp: allow to use custom psu_init files Luca Ceresoli
2018-07-26 20:12 ` Joel Carlson
2018-07-28 17:39 ` Thomas Petazzoni
2018-08-21 9:09 ` Luca Ceresoli
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=20180728193753.686dbf7b@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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.