marvell: Move BLE from external repo to the platform folder
The BLE is the pre-TF-A boot stage required by Marvell Armada
BootROM for bringing up DRAM and allow the boot image copy to it.
Since this is not a standard boot level and only uses the TF-A
as a build environment, it was introduced out of source tree.
However it turns out that such remote location introduces additional
complexity to the upstream TF-A build process.
In order to simplify the build environment the BLE source folder
is relocated from the external repository to A8K platform directory.
The build documentation is updated accordingly.
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
diff --git a/plat/marvell/a8k/common/ble/ble.mk b/plat/marvell/a8k/common/ble/ble.mk
new file mode 100644
index 0000000..a76083e
--- /dev/null
+++ b/plat/marvell/a8k/common/ble/ble.mk
@@ -0,0 +1,31 @@
+# Copyright (C) 2018 Marvell International Ltd.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+# https://spdx.org/licenses
+
+MV_DDR_PATH ?= drivers/marvell/mv_ddr
+
+MV_DDR_LIB = $(CURDIR)/$(BUILD_PLAT)/ble/mv_ddr_lib.a
+LIBC_LIB = $(CURDIR)/$(BUILD_PLAT)/lib/libc.a
+BLE_LIBS = $(MV_DDR_LIB) $(LIBC_LIB)
+PLAT_MARVELL = plat/marvell
+
+BLE_SOURCES += $(BLE_PATH)/ble_main.c \
+ $(BLE_PATH)/ble_mem.S \
+ drivers/delay_timer/delay_timer.c \
+ $(PLAT_MARVELL)/common/plat_delay_timer.c
+
+PLAT_INCLUDES += -I$(MV_DDR_PATH) \
+ -I$(CURDIR)/include/ \
+ -I$(CURDIR)/include/drivers \
+ -I$(CURDIR)/include/lib \
+ -I$(CURDIR)/include/lib/libc \
+ -I$(CURDIR)/include/lib/libc/aarch64 \
+ -I$(CURDIR)/drivers/marvell
+
+BLE_LINKERFILE := $(BLE_PATH)/ble.ld.S
+
+FORCE:
+
+$(MV_DDR_LIB): FORCE
+ @+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(PLAT_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(CURDIR)/$(BUILD_PLAT)/ble