u-boot-brain/arch/arm
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
..
cpu Merge branch 'master' of git://git.denx.de/u-boot-sunxi 2018-07-03 23:09:34 -04:00
dts Merge branch 'master' of git://git.denx.de/u-boot-sunxi 2018-07-17 14:28:47 -04:00
include sunxi: R40: add gigabit ethernet clocks 2018-07-16 12:27:27 +05:30
lib ARM: image: Add option for ignoring ep bit 3 2018-06-19 07:31:45 -04:00
mach-aspeed regmap: change regmap_init_mem() to take ofnode instead udevice 2018-05-07 15:49:51 -04:00
mach-at91 board/aries: Remove 2018-07-02 15:52:50 -04:00
mach-bcm283x efi_loader: Convert runtime reset from switch to if statements 2018-06-14 10:52:14 +02:00
mach-bcmstb board: arm: Add support for Broadcom BCM7445 2018-07-10 16:55:57 -04:00
mach-davinci dm: gpio: Add DM compatibility to GPIO driver for Davinci 2018-06-18 14:43:12 -04:00
mach-exynos arm: v7: Kconfig: Rename CPU_V7 as CPU_V7A 2018-05-07 15:53:24 -04:00
mach-highbank SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-imx board/aries: Remove 2018-07-02 15:52:50 -04:00
mach-integrator env: Convert CONFIG_ENV_IS_IN... to a choice 2017-08-15 20:50:01 -04:00
mach-keystone SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-kirkwood ARM: add SBx81LIFKW board 2018-06-05 07:29:09 +02:00
mach-meson meson: use the clock driver 2018-06-19 07:31:47 -04:00
mach-mvebu arm: mvebu: Add Helios4 Armada 38x initial support 2018-06-12 13:17:19 +02:00
mach-omap2 ARM: mach-omap2: omap3/am335x: Enable ACR::IBE on Cortex-A8 SoCs for CVE-2017-5715 2018-06-29 11:30:39 -04:00
mach-orion5x ARM: orion5x: fix use of callee-saved registers in lowloevel_init 2018-06-07 09:12:26 -04:00
mach-owl board: Add uCRobotics Bubblegum-96 board support 2018-07-09 15:25:23 -04:00
mach-qemu arm: v7: Kconfig: Rename CPU_V7 as CPU_V7A 2018-05-07 15:53:24 -04:00
mach-rmobile ARM: renesas: Add R8A77990 E3 Ebisu board 2018-06-01 09:47:21 +02:00
mach-rockchip fastboot: Rename fb_set_reboot_flag to fastboot_set_reboot_flag 2018-05-30 11:59:21 +02:00
mach-s5pc1xx SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-snapdragon mach-snapdragon: increase size of malloc pool 2018-05-29 11:01:37 -04:00
mach-socfpga Merge branch 'master' of git://git.denx.de/u-boot-socfpga 2018-07-13 14:47:04 -04:00
mach-sti board: Add STMicroelectronics STiH410-B2260 support 2017-03-14 20:40:21 -04:00
mach-stm32 mach-stm32: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET 2018-07-13 14:47:29 -04:00
mach-stm32mp reset: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET 2018-07-09 15:25:43 -04:00
mach-sunxi dm: sunxi: Use DM for MMC and SATA on all A10 boards 2018-07-16 12:26:00 +05:30
mach-tegra arm: v7: Kconfig: Rename CPU_V7 as CPU_V7A 2018-05-07 15:53:24 -04:00
mach-uniphier ARM: uniphier: rename environment variable fdt_file to fdtfile 2018-05-23 00:32:39 +09:00
mach-versatile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-zynq arm: zynq: Remove checkboard and enable DISPLAY_CPUINFO 2018-05-11 09:23:43 +02:00
mach-zynqmp-r5 arm: zynqmp: Add ZynqMP minimal R5 support 2018-05-11 09:38:23 +02:00
thumb1/include/asm/proc-armv SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
config.mk SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable 2018-07-19 10:49:53 +02:00
Kconfig.debug
Makefile board: arm: Add support for Broadcom BCM7445 2018-07-10 16:55:57 -04:00