u-boot-brain/board/xilinx/zynqmp
Luca Ceresoli 6da4f67ad0 arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable
U-Boot needs to link ps7_init_gpl.c on Zynq or psu_init_gpl.c on
ZynqMP (PS init for short). The current logic to locate this file for
both platforms is:

 1. if a board-specific file exists in
    board/xilinx/zynq[mp]/$(CONFIG_DEFAULT_DEVICE_TREE)/ps?_init_gpl.c
    then use it
 2. otherwise use board/xilinx/zynq/ps?_init_gpl.c

In the latter case the file does not exist in the U-Boot sources and
must be copied in the source tree from the outside before starting the
build. This is typical when it is generated from Xilinx tools while
developing a custom hardware. However making sure that a
board-specific file is _not_ found (and used) requires some trickery
such as removing or overwriting all PS init files (e.g.: the current
meta-xilinx yocto layer).

This generates a few problems:

 * if the source tree is shared among different out-of-tree builds,
   they will pollute (and potentially corrupt) each other
 * the source tree cannot be read-only
 * any buildsystem must add a command to copy the PS init file binary
 * overwriting or deleting files in the source tree is ugly as hell

Simplify usage by allowing to pass the path to the desired PS init
file in kconfig variable XILINX_PS_INIT_FILE. It can be an absolute
path or relative to $(srctree). If the variable is set, the
user-specified file will always be used without being copied
around. If the the variable is left empty, for backward compatibility
fall back to the old behaviour.

Since the issue is the same for Zynq and ZynqMP, add one kconfig
variable in a common place and use it for both.

Also use the new kconfig help text to document all the ways to give
U-Boot the PS init file.

Build-tested with all combinations of:
 - platform: zynq or zynqmp
 - PS init file: from XILINX_PS_INIT_FILE (absolute, relative path,
   non-existing), in-tree board-specific, in board/xilinx/zynq[mp]/
 - building in-tree, in subdir, in other directory

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-19 10:49:53 +02:00
..
zynqmp-zc1232-revA SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zc1254-revA SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zc1275-revB SPDX: Correct SPDX tags from recent xilinx merge 2018-05-11 14:54:57 -04:00
zynqmp-zc1751-xm015-dc1 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zc1751-xm016-dc2 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zc1751-xm017-dc3 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zc1751-xm018-dc4 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zc1751-xm019-dc5 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zcu100-revC arm64: zynqmp: Reset FPD Watchdog on zcu100 2018-05-11 09:23:43 +02:00
zynqmp-zcu102-rev1.0 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zcu102-revA SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zcu104-revA SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zcu106-revA SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cmds.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig arm64: zynqmp: Add support for verifying secure images 2018-03-23 09:36:15 +01:00
MAINTAINERS MAINTAINERS: Fix Zynq/ZynqMP and Microblaze fragments 2018-03-23 09:36:15 +01:00
Makefile arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable 2018-07-19 10:49:53 +02:00
sleep.h arm64: zynqmp: Add empty sleep.h file for psu_init* compilation 2017-06-20 16:40:58 +02:00
tap_delays.c mmc: zynq_sdhci: Add support for SD3.0 2018-05-11 11:13:51 +02:00
xil_io.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp-zc1275-revA arm64: zynqmp: Add support for zc12xx boards 2018-04-09 12:14:52 +02:00
zynqmp-zcu104-revC arm64: zynqmp: Add support for zcu104 customer board 2018-04-09 12:14:52 +02:00
zynqmp.c arm64: zynqmp: Check return value from calloc 2018-06-15 08:54:05 +02:00