[Buildroot] [PATCH v3 4/5] uboot: zynqmp: generate SPL image with PMUFW binary

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon May 28 20:53:34 UTC 2018


Hello,

On Thu,  3 May 2018 18:23:36 +0200, Luca Ceresoli wrote:
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index cbb899515181..266e42698d1b 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -276,6 +276,21 @@ endef
>  
>  ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y)
>  
> +UBOOT_ZYNQMP_PMUFW = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PMUFW))
> +
> +ifneq ($(UBOOT_ZYNQMP_PMUFW),)
> +UBOOT_EXTRA_DOWNLOADS += $(UBOOT_ZYNQMP_PMUFW)
> +BR_NO_CHECK_HASH_FOR += $(notdir $(UBOOT_ZYNQMP_PMUFW))
> +define UBOOT_ZYNQMP_KCONFIG_FIXUP
> +	$(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"board/xilinx/zynqmp/pmufw.bin",$(@D)/.config)
> +endef
> +define UBOOT_ZYNQMP_COPY_PMUFW
> +	$(INSTALL) -D -m 0644 $(UBOOT_DL_DIR)/$(notdir $(UBOOT_ZYNQMP_PMUFW)) \
> +		$(@D)/board/xilinx/zynqmp/pmufw.bin
> +endef

I'm wondering if your solution that consists in copying the PMU
firmware to the U-Boot source directory and then using that location in
the U-Boot configuration is better, or if we should simply make the
U-Boot configuration point to the location in $(UBOOT_DL_DIR), i.e:

$(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,$(UBOOT_DL_DIR)/$(notdir $(UBOOT_ZYNQMP_PMUFW)),$(@D)/.config)

I'm not saying we _must_ do this, I'm wondering if it isn't simpler.

> +define UBOOT_KCONFIG_FIXUP_CMDS
> +	$(UBOOT_ZYNQMP_KCONFIG_FIXUP)
> +endef

This obviously won't work with a non-kconfig capable U-Boot version,
though admittedly ZynqMP support is sufficiently new in upstream U-Boot
that we're pretty much guaranteed that someone trying to build for
ZynqMP will have a kconfig-capable U-Boot. But to be sure, perhaps the
BR2_TARGET_UBOOT_ZYNQMP_PMUFW should have a "depends on
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG" ?

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list