boot/uboot: add support for custom zynq ps7_init_gpl.c

On Zynq, the booloader is responsible for some basic initializations, such as
enabling peripherals, DDR 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
Vivado development tools.

This patch adds Buildroot support for custom zynq ps7_init_gpl.c files in the
same way that is already done for zynqmp when working with custom hardware
that is not already supported by u-boot.

To test this feature, the following configs can be added to any zynq_defconfig:

BR2_TARGET_UBOOT_ZYNQ=y
BR2_TARGET_UBOOT_ZYNQ_PS7_INIT_FILE=<path to custom board ps7_init_gpl.c>

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Neal Frager
2025-08-31 14:35:25 +01:00
committed by Julien Olivain
parent 78d58820a5
commit 98b57fafdf
3 changed files with 57 additions and 10 deletions

View File

@@ -71,17 +71,18 @@ you need to add them by yourself.
1) Start with a defconfig supported by Buildroot (e.g. Zedboard)
make zynq_zed_defconfig
2) make uboot-menuconfig
Visit the following menu and enable CONFIG_XILINX_PS_INIT_FILE
2) make menuconfig
Visit the following menu to enable BR2_TARGET_UBOOT_ZYNQ
ARM architecture --->
[*] Zynq/ZynqMP PS init file(s) location
Bootloaders --->
U-Boot --->
[*] Boot on the Xilinx Zynq SoCs
3) Copy ps7_init_gpl.c/h generated by the Xilinx Vivado tools into
output/build/uboot-custom/board/xilinx/zynq/custom_hw_platform/
3) make menuconfig
In the same menu, configure BR2_TARGET_UBOOT_ZYNQ_PS7_INIT_FILE
Bootloaders --->
U-Boot --->
(<Path to ps7_init_gpl.c>) Custom ps7_init_gpl file
4) make
Note: The files in step 3 will need to be re-copied after cleaning the
output directory and at this time, there is no way to save them as
part of the buildroot configuration, except as a U-Boot patch.