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

Luca Ceresoli luca at lucaceresoli.net
Thu May 31 21:29:25 UTC 2018


Hi,

On 29/05/2018 22:46, Luca Ceresoli wrote:
> Hi Thomas,
> 
> On 28/05/2018 22:53, Thomas Petazzoni wrote:
>> 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.
> 
> This would definitely be better, but it wouldn't work because the U-Boot
> makefile looks for $(srctree)/$(CONFIG_BOOT_INIT_FILE), not just
> $(CONFIG_BOOT_INIT_FILE). So the file must be relative to
> $(@D)/board/xilinx/zynqmp/, i.e. $(srctree).
> 
> Of course this could be fixed in U-Boot...

...which is in progress, see the patch:
https://patchwork.ozlabs.org/patch/923351/

-- 
Luca



More information about the buildroot mailing list