summaryrefslogtreecommitdiff
path: root/drivers/gpio/zynq_gpio.c
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2018-06-04 12:21:01 +0200
committerMichal Simek <michal.simek@xilinx.com>2018-06-15 08:54:04 +0200
commitc7df098a71e05dc81cee818747759e8060b59626 (patch)
treef1b1b9693020ed36ad8576e99b5614b2630c187a /drivers/gpio/zynq_gpio.c
parent343671e48329a45155e7f04dc8973bd35a7c55d1 (diff)
arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE
The value of PMUFW_INIT_FILE is prefixed with "$(srctree)/", thus forcing it to be a relative path inside the U-Boot source tree. Since the PMUFW is a binary file generated outside of U-Boot, the PMUFW binary must be copied inside the U-Boot source tree before the build. 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 PMUFW binary * putting an externally-generated binary in the source tree is ugly as hell Avoid these problems by accepting an absolute path for PMUFW_INIT_FILE. This would be as simple as removing the "$(srctree)/" prefix, but in order to keep backward compatibility we rather use the shell and readlink to get the absolute path even when starting from a relative path. Since 'readlink -f' produces an empty string if the file does not exist, we also add a check to ensure the file configured in PMUFW_INIT_FILE exists. Otherwise the build would exit successfully, but produce a boot.bin without PMUFW as if PMUFW_INIT_FILE were empty. Tested in the 12 possible combinations of: - PMUFW_INIT_FILE empty, relative, absolute, non-existing - building in-tree, in subdir, in other directory Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Simon Glass <sjg@chromium.org> Cc: Emmanuel Vadot <manu@bidouilliste.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/gpio/zynq_gpio.c')
0 files changed, 0 insertions, 0 deletions