diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2016-09-10 00:04:24 +1000 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-10-11 21:10:52 +1000 |
commit | bb928649a4829ab50daf9bf8ccf4f35f815003b1 (patch) | |
tree | cd25d3121b81cfadf554c86d8c0d9ddb9e4167a7 | |
parent | 48b01cff79281148bbc2c32cbf1df3873ed4efad (diff) | |
download | meta-xilinx-bb928649a4829ab50daf9bf8ccf4f35f815003b1.tar.gz |
u-boot-spl-zynq-init.inc: Enable the FORCE_PS7INIT for new U-Boot
The directory structure in U-Boot for platform init files has changed in
more recent versions of U-Boot. The new naming scheme uses the name of
the device-tree (that is provided in U-Boot) to determine the name of
the directory in board/xilinx/zynq/.
This patch changes how FORCE_PS7INIT functions, such that it is a toggle
instead of requiring the target directory name. FORCE_PS7INIT is changed
to overwrite all the ps7_init_gpl* files in the board/xilinx/zynq/*
directories. This removes the need to specify the target
directory/config and also avoids any issues with the differences in
names between older and newer U-Boot versions.
Additionally this patch adds a [doc] string for the variable.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r-- | recipes-bsp/u-boot/u-boot-spl-zynq-init.inc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc b/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc index 3d4b75ef..cc06de6c 100644 --- a/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc +++ b/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc | |||
@@ -9,14 +9,19 @@ do_configure_prepend() { | |||
9 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.h ${S}/board/xilinx/zynq/ | 9 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.h ${S}/board/xilinx/zynq/ |
10 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.c ${S}/board/xilinx/zynq/ | 10 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.c ${S}/board/xilinx/zynq/ |
11 | fi | 11 | fi |
12 | if [ -n "${FORCE_PS7INIT}" -a -d "${S}/board/xilinx/zynq/${FORCE_PS7INIT}_hw_platform/" ]; then | 12 | if [ -n "${FORCE_PS7INIT}" ]; then |
13 | # overwrite the existing platforms ps7_init files | 13 | # overwrite all the existing platforms ps7_init files, this is a shotgun approach and only works due to |
14 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.h ${S}/board/xilinx/zynq/${FORCE_PS7INIT}_hw_platform/ | 14 | # u-boot being built for each machine seperately with seperate source directories. |
15 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.c ${S}/board/xilinx/zynq/${FORCE_PS7INIT}_hw_platform/ | 15 | for i in ${S}/board/xilinx/zynq/*/; do |
16 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.h $i | ||
17 | cp ${PLATFORM_INIT_STAGE_DIR}/ps7_init_gpl.c $i | ||
18 | done | ||
16 | fi | 19 | fi |
17 | fi | 20 | fi |
18 | } | 21 | } |
19 | 22 | ||
23 | FORCE_PS7INIT[doc] = "This variable is used to force the overriding of all ps7_init_gpl.* files in u-boot source with what is provided by virtual/zynq7-platform-init." | ||
24 | |||
20 | python () { | 25 | python () { |
21 | # Determine if target machine needs to provide a custom ps7_init_gpl.* | 26 | # Determine if target machine needs to provide a custom ps7_init_gpl.* |
22 | if d.getVar("SOC_FAMILY", True) == "zynq": | 27 | if d.getVar("SOC_FAMILY", True) == "zynq": |