Message ID | 20230904100443.1613306-6-neal.frager@amd.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | [v3,1/6] package/binutils-bare-metal: new package | expand |
On Mon, 4 Sep 2023 11:04:43 +0100 Neal Frager <neal.frager@amd.com> wrote: > The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE option will enable u-boot to > use the zynqmp-firmware package for building a pmufw.elf that gets included in > the generated boot.bin. > > If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE option is enabled, then the > BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw will > be ignored. > > Signed-off-by: Neal Frager <neal.frager@amd.com> > --- > V1->V2: > - patch is now backwards compatible for users already using the > BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw > V2->V3: > - no changes > --- > boot/uboot/Config.in | 18 ++++++++++++++++-- > boot/uboot/uboot.mk | 5 +++++ > 2 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in > index 8b726eaa57..6d830e81c6 100644 > --- a/boot/uboot/Config.in > +++ b/boot/uboot/Config.in > @@ -495,11 +495,25 @@ config BR2_TARGET_UBOOT_ZYNQMP > > if BR2_TARGET_UBOOT_ZYNQMP > > +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE > + bool "Build zynqmp PMU firmware from source" > + select BR2_TARGET_ZYNQMP_FIRMWARE > + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG > + help > + This option instructs u-boot to build the zynqmp pmufw using > + the zynqmp-firmware package. u-boot will then include this > + pmufw.elf in the generated boot.bin. > + > + If this option is selected, the BR2_TARGET_UBOOT_ZYNQMP_PMUFW > + prebuilt option will be ignored. > + > + This feature requires U-Boot >= 2018.07. > + > config BR2_TARGET_UBOOT_ZYNQMP_PMUFW > - string "PMU firmware location" > + string "Pre-built zynqmp PMU firmware location" > depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG Maybe here we should add depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE to hide the prebuilt option when building from source has been chosen. It would be confusing otherwise. Looks good otherwise. Luca
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 8b726eaa57..6d830e81c6 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -495,11 +495,25 @@ config BR2_TARGET_UBOOT_ZYNQMP if BR2_TARGET_UBOOT_ZYNQMP +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE + bool "Build zynqmp PMU firmware from source" + select BR2_TARGET_ZYNQMP_FIRMWARE + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG + help + This option instructs u-boot to build the zynqmp pmufw using + the zynqmp-firmware package. u-boot will then include this + pmufw.elf in the generated boot.bin. + + If this option is selected, the BR2_TARGET_UBOOT_ZYNQMP_PMUFW + prebuilt option will be ignored. + + This feature requires U-Boot >= 2018.07. + config BR2_TARGET_UBOOT_ZYNQMP_PMUFW - string "PMU firmware location" + string "Pre-built zynqmp PMU firmware location" depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG help - Location of a PMU firmware binary. + Location of a pre-built 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 diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 9f81c0b842..0e338efaf1 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -410,7 +410,12 @@ endef ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y) +ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE),y) +UBOOT_DEPENDENCIES += zynqmp-firmware +UBOOT_ZYNQMP_PMUFW = $(BINARIES_DIR)/pmufw.elf +else UBOOT_ZYNQMP_PMUFW = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PMUFW)) +endif #BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE ifneq ($(findstring ://,$(UBOOT_ZYNQMP_PMUFW)),) UBOOT_EXTRA_DOWNLOADS += $(UBOOT_ZYNQMP_PMUFW)
The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE option will enable u-boot to use the zynqmp-firmware package for building a pmufw.elf that gets included in the generated boot.bin. If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE option is enabled, then the BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw will be ignored. Signed-off-by: Neal Frager <neal.frager@amd.com> --- V1->V2: - patch is now backwards compatible for users already using the BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw V2->V3: - no changes --- boot/uboot/Config.in | 18 ++++++++++++++++-- boot/uboot/uboot.mk | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-)