* [Buildroot] [PATCH 1/1] boot/uboot: allow to use custom ps7_init files for zynq7000 SoC
@ 2024-03-11 21:59 Taras Zaporozhets
2024-08-06 21:13 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Taras Zaporozhets @ 2024-03-11 21:59 UTC (permalink / raw)
To: buildroot; +Cc: Taras Zaporozhets
Similar to zynqmp, add an option to pass init files from the outside.
Signed-off-by: Taras Zaporozhets <zaporozhets.taras@gmail.com>
---
boot/uboot/Config.in | 37 +++++++++++++++++++++++++++++++++++++
boot/uboot/uboot.mk | 14 ++++++++++++++
2 files changed, 51 insertions(+)
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index beafb38930..4eeab458fa 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -512,6 +512,12 @@ config BR2_TARGET_UBOOT_ZYNQMP
help
Enable options specific to the Xilinx ZynqMP family of SoCs.
+config BR2_TARGET_UBOOT_ZYNQ
+ bool "Boot on the Xilinx Zynq 7000 SoCs"
+ depends on BR2_cortex_a9
+ help
+ Enable options specific to the Xilinx Zynq 7000 SoCs.
+
if BR2_TARGET_UBOOT_ZYNQMP
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
@@ -588,6 +594,37 @@ config BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE
endif
+if BR2_TARGET_UBOOT_ZYNQ
+
+config BR2_TARGET_UBOOT_ZYNQ_PS7_INIT_FILE
+ string "Custom ps7_init_gpl file"
+ depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
+ help
+ On Zynq 7000 the booloader is responsible for some basic
+ initializations, such as enabling peripherals and
+ configuring pinmuxes. The ps7_init_gpl.c file (and,
+ optionally, ps7_init_gpl.h) contains the code for such
+ initializations.
+
+ Although U-Boot contains ps7_init_gpl.c files for some
+ boards, each of them describes only one specific
+ configuration. Users of a different board, or needing a
+ different configuration, can generate custom files using the
+ Xilinx development tools.
+
+ Set this variable to the path to your ps7_init_gpl.c file
+ (e.g. "board/myboard/ps7_init_gpl.c"). ps7_init_gpl.h, if
+ needed, should be in the same directory. U-Boot will build
+ and link the user-provided file instead of the built-in one.
+
+ Leave empty to use the files provided by U-Boot.
+
+ This feature requires commit
+ 6da4f67ad09cd8b311d77b2b04e557b7ef65b56c from upstream
+ U-Boot, available from versions after 2018.07.
+
+endif
+
config BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC
bool "CRC image for Altera SoC FPGA (mkpimage)"
depends on BR2_arm
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index dda606a880..b36968c064 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -461,6 +461,19 @@ endif
endif # BR2_TARGET_UBOOT_ZYNQMP
+ifeq ($(BR2_TARGET_UBOOT_ZYNQ),y)
+
+UBOOT_ZYNQ_PS7_INIT = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQ_PS7_INIT_FILE))
+UBOOT_ZYNQ_PS7_INIT_PATH = $(shell readlink -f $(UBOOT_ZYNQ_PS7_INIT))
+
+ifneq ($(UBOOT_ZYNQ_PS7_INIT),)
+define UBOOT_ZYNQ_KCONFIG_PS7_INIT
+ $(call KCONFIG_SET_OPT,CONFIG_XILINX_PS_INIT_FILE,"$(UBOOT_ZYNQ_PS7_INIT_PATH)")
+endef
+endif
+
+endif # BR2_TARGET_UBOOT_ZYNQ
+
define UBOOT_INSTALL_OMAP_IFT_IMAGE
cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/
endef
@@ -503,6 +516,7 @@ define UBOOT_KCONFIG_FIXUP_CMDS
$(UBOOT_ZYNQMP_KCONFIG_PMUFW)
$(UBOOT_ZYNQMP_KCONFIG_PM_CFG)
$(UBOOT_ZYNQMP_KCONFIG_PSU_INIT)
+ $(UBOOT_ZYNQ_KCONFIG_PS7_INIT)
endef
ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy)
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] boot/uboot: allow to use custom ps7_init files for zynq7000 SoC
2024-03-11 21:59 [Buildroot] [PATCH 1/1] boot/uboot: allow to use custom ps7_init files for zynq7000 SoC Taras Zaporozhets
@ 2024-08-06 21:13 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-06 21:13 UTC (permalink / raw)
To: Taras Zaporozhets; +Cc: buildroot
Hello Taras,
On Mon, 11 Mar 2024 22:59:03 +0100
Taras Zaporozhets <zaporozhets.taras@gmail.com> wrote:
> Similar to zynqmp, add an option to pass init files from the outside.
>
> Signed-off-by: Taras Zaporozhets <zaporozhets.taras@gmail.com>
Thanks for your patch, and sorry for the long delay in getting back to
you.
> +ifeq ($(BR2_TARGET_UBOOT_ZYNQ),y)
> +
> +UBOOT_ZYNQ_PS7_INIT = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQ_PS7_INIT_FILE))
> +UBOOT_ZYNQ_PS7_INIT_PATH = $(shell readlink -f $(UBOOT_ZYNQ_PS7_INIT))
> +
> +ifneq ($(UBOOT_ZYNQ_PS7_INIT),)
> +define UBOOT_ZYNQ_KCONFIG_PS7_INIT
> + $(call KCONFIG_SET_OPT,CONFIG_XILINX_PS_INIT_FILE,"$(UBOOT_ZYNQ_PS7_INIT_PATH)")
> +endef
> +endif
> +
> +endif # BR2_TARGET_UBOOT_ZYNQ
However, I believe this patch is not really necessary. Unless I'm
missing something, it is just defining a particular option of the
U-Boot configuration, and we're not going to add a Buildroot option for
each and every U-Boot option. Instead, you can define this option
directly in the U-Boot configuration. If you have an existing U-Boot
configuration and don't want to touch it, you can use a "configuration
fragment" referenced by BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES to
override just this particular option.
Let me know if that would work for you?
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-06 21:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 21:59 [Buildroot] [PATCH 1/1] boot/uboot: allow to use custom ps7_init files for zynq7000 SoC Taras Zaporozhets
2024-08-06 21:13 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox