Commit 528dafc3 authored by Pali Rohár's avatar Pali Rohár
Browse files

fix(plat/marvell/a8k): Require that MV_DDR_PATH is correctly set



Target mrvl_flash depends on external mv_ddr source code which is not
part of TF-A project. Do not expect that it is pre-downloaded at some
specific location and require user to specify correct path to mv_ddr
source code via MV_DDR_PATH build option.

TF-A code for Armada 37x0 platform also depends on mv_ddr source code
and already requires passing correct MV_DDR_PATH build option.

So for A8K implement same checks for validity of MV_DDR_PATH option as
are already used by TF-A code for Armada 37x0 platform.
Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Change-Id: I792f2bfeab0cec89b1b64e88d7b2c456e22de43a
parent 41e893ff
...@@ -129,15 +129,13 @@ There are several build options: ...@@ -129,15 +129,13 @@ There are several build options:
- MV_DDR_PATH - MV_DDR_PATH
This parameter is required for ``mrvl_flash`` and ``mrvl_uart`` targets.
For A7K/8K/CN913x, use this parameter to point to mv_ddr driver sources to allow BLE build. For A37x0, For A7K/8K/CN913x, use this parameter to point to mv_ddr driver sources to allow BLE build. For A37x0,
it is used for ddr_tool build. it is used for ddr_tool build.
Usage example: MV_DDR_PATH=path/to/mv_ddr Usage example: MV_DDR_PATH=path/to/mv_ddr
The parameter is optional for A7K/8K/CN913x, when this parameter is not set, the mv_ddr
sources are expected to be located at: drivers/marvell/mv_ddr. However, the parameter
is necessary for A37x0.
For the mv_ddr source location, check the section "Tools and external components installation" For the mv_ddr source location, check the section "Tools and external components installation"
If MV_DDR_PATH source code is a git snapshot then provide path to the full git If MV_DDR_PATH source code is a git snapshot then provide path to the full git
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# https://spdx.org/licenses # https://spdx.org/licenses
MV_DDR_PATH ?= drivers/marvell/mv_ddr
MV_DDR_LIB = $(BUILD_PLAT)/ble/mv_ddr_lib.a MV_DDR_LIB = $(BUILD_PLAT)/ble/mv_ddr_lib.a
LIBC_LIB = $(BUILD_PLAT)/lib/libc.a LIBC_LIB = $(BUILD_PLAT)/lib/libc.a
BLE_LIBS = $(MV_DDR_LIB) $(LIBC_LIB) BLE_LIBS = $(MV_DDR_LIB) $(LIBC_LIB)
...@@ -28,4 +26,7 @@ PLAT_INCLUDES += -I$(MV_DDR_PATH) \ ...@@ -28,4 +26,7 @@ PLAT_INCLUDES += -I$(MV_DDR_PATH) \
BLE_LINKERFILE := $(BLE_PATH)/ble.ld.S BLE_LINKERFILE := $(BLE_PATH)/ble.ld.S
$(MV_DDR_LIB): FORCE $(MV_DDR_LIB): FORCE
$(if $(value MV_DDR_PATH),,$(error "Platform '$(PLAT)' for BLE requires MV_DDR_PATH. Please set MV_DDR_PATH to point to the right directory"))
$(if $(wildcard $(value MV_DDR_PATH)/*),,$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' directory does not exist"))
$(if $(shell git -C $(value MV_DDR_PATH) rev-parse --show-cdup 2>&1),$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' does not contain valid mv-ddr-marvell git repository"))
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(PLAT_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble @+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(PLAT_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment