]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - atf/arm-trusted-firmware.git/commitdiff
plat: marvell: armada: Building ${DOIMAGETOOL} is only for a8k
authorPali Rohár <pali@kernel.org>
Wed, 21 Oct 2020 09:50:40 +0000 (11:50 +0200)
committerPali Rohár <pali@kernel.org>
Wed, 21 Oct 2020 10:05:25 +0000 (12:05 +0200)
Currently a3k target is misusing ${DOIMAGETOOL} target for building flash
and UART images. It is not used for building image tool.

So move ${DOIMAGETOOL} target from common marvell include file into a8k
include file and add correct invocation of ${MAKE} into a3k for building
flash and UART images.

Part of this change is also checks that MV_DDR_PATH for a3k was specified
by user as this option is required for building a3k flash and UART images.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I5ae9d08b8505460933f17836c9b6435fd6e51bb6

plat/marvell/armada/a3k/common/a3700_common.mk
plat/marvell/armada/a8k/common/a8k_common.mk
plat/marvell/marvell.mk

index 8f65e92b31bf825eb2ca7cd9ddfe8b5a80b5e239..2050d59b63e0ed056073c81f6a2e50d30d17846f 100644 (file)
@@ -124,6 +124,8 @@ mrvl_flash: ${BUILD_PLAT}/${FIP_NAME} ${DOIMAGETOOL}
        $(shell truncate -s %128K ${BUILD_PLAT}/bl1.bin)
        $(shell cat ${BUILD_PLAT}/bl1.bin ${BUILD_PLAT}/${FIP_NAME} > ${BUILD_PLAT}/${BOOT_IMAGE})
        $(shell truncate -s %4 ${BUILD_PLAT}/${BOOT_IMAGE})
+       $(if $(value MV_DDR_PATH),,$(error "Platform '${PLAT}' for target '$@' requires MV_DDR_PATH. Please set MV_DDR_PATH to point to the right directory"))
+       ${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} WTMI_IMG=$(WTMI_IMG) MV_DDR_PATH=$(MV_DDR_PATH)
        $(shell truncate -s %4 $(WTMI_IMG))
        @echo
        @echo "Building uart images"
index a807891e511a48361974c9a1654580f3f981ad38..c8273265e8f2c62307402fa01de6c0039f033621 100644 (file)
@@ -4,8 +4,6 @@
 # SPDX-License-Identifier:     BSD-3-Clause
 # https://spdx.org/licenses
 
-include tools/marvell/doimage/doimage.mk
-
 PLAT_FAMILY            := a8k
 PLAT_INCLUDE_BASE      := include/plat/marvell/armada/$(PLAT_FAMILY)
 PLAT_COMMON_BASE       := plat/marvell/armada/a8k/common
@@ -34,6 +32,34 @@ DOIMAGEPATH          ?=      tools/marvell/doimage
 DOIMAGETOOL            ?=      ${DOIMAGEPATH}/doimage
 
 include plat/marvell/marvell.mk
+include tools/marvell/doimage/doimage.mk
+
+ifeq (${MARVELL_SECURE_BOOT},1)
+DOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC)
+DOIMAGE_LIBS_CHECK = \
+        if ! [ -d "/usr/include/mbedtls" ]; then \
+                        echo "****************************************" >&2; \
+                        echo "Missing mbedTLS installation! " >&2; \
+                        echo "Please download it from \"tls.mbed.org\"" >&2; \
+                       echo "Alternatively on Debian/Ubuntu system install" >&2; \
+                       echo "\"libmbedtls-dev\" package" >&2; \
+                        echo "Make sure to use version 2.1.0 or later" >&2; \
+                        echo "****************************************" >&2; \
+                exit 1; \
+        else if ! [ -f "/usr/include/libconfig.h" ]; then \
+                        echo "********************************************************" >&2; \
+                        echo "Missing Libconfig installation!" >&2; \
+                        echo "Please download it from \"www.hyperrealm.com/libconfig/\"" >&2; \
+                        echo "Alternatively on Debian/Ubuntu system install packages" >&2; \
+                        echo "\"libconfig8\" and \"libconfig8-dev\"" >&2; \
+                        echo "********************************************************" >&2; \
+                exit 1; \
+        fi \
+        fi
+else #MARVELL_SECURE_BOOT
+DOIMAGE_LIBS_CHECK =
+DOIMAGE_SEC_FLAGS =
+endif #MARVELL_SECURE_BOOT
 
 ROM_BIN_EXT ?= $(BUILD_PLAT)/ble.bin
 DOIMAGE_FLAGS  += -b $(ROM_BIN_EXT) $(NAND_DOIMAGE_FLAGS) $(DOIMAGE_SEC_FLAGS)
@@ -126,6 +152,14 @@ BLE_PATH   ?=  $(PLAT_COMMON_BASE)/ble
 include ${BLE_PATH}/ble.mk
 $(eval $(call MAKE_BL,e))
 
+mrvl_clean:
+       @echo "  Doimage CLEAN"
+       ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
+
+${DOIMAGETOOL}: mrvl_clean
+       @$(DOIMAGE_LIBS_CHECK)
+       ${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH}
+
 mrvl_flash: ${BUILD_PLAT}/${FIP_NAME} ${DOIMAGETOOL} ${BUILD_PLAT}/ble.bin
        $(shell truncate -s %128K ${BUILD_PLAT}/bl1.bin)
        $(shell cat ${BUILD_PLAT}/bl1.bin ${BUILD_PLAT}/${FIP_NAME} > ${BUILD_PLAT}/${BOOT_IMAGE})
index 82457536d3f8f2ebf1719afc2226143d0ed19863..b6a2b9995b8fd4a62da318cb53fe3a2ebbfc0e97 100644 (file)
@@ -19,40 +19,3 @@ $(eval $(call add_define,PALLADIUM))
 # Set board to work with DDR 32bit
 DDR32                          := 0
 $(eval $(call add_define,DDR32))
-
-ifeq (${MARVELL_SECURE_BOOT},1)
-DOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC)
-DOIMAGE_LIBS_CHECK = \
-        if ! [ -d "/usr/include/mbedtls" ]; then \
-                        echo "****************************************" >&2; \
-                        echo "Missing mbedTLS installation! " >&2; \
-                        echo "Please download it from \"tls.mbed.org\"" >&2; \
-                       echo "Alternatively on Debian/Ubuntu system install" >&2; \
-                       echo "\"libmbedtls-dev\" package" >&2; \
-                        echo "Make sure to use version 2.1.0 or later" >&2; \
-                        echo "****************************************" >&2; \
-                exit 1; \
-        else if ! [ -f "/usr/include/libconfig.h" ]; then \
-                        echo "********************************************************" >&2; \
-                        echo "Missing Libconfig installation!" >&2; \
-                        echo "Please download it from \"www.hyperrealm.com/libconfig/\"" >&2; \
-                        echo "Alternatively on Debian/Ubuntu system install packages" >&2; \
-                        echo "\"libconfig8\" and \"libconfig8-dev\"" >&2; \
-                        echo "********************************************************" >&2; \
-                exit 1; \
-        fi \
-        fi
-else #MARVELL_SECURE_BOOT
-DOIMAGE_LIBS_CHECK =
-DOIMAGE_SEC_FLAGS =
-endif #MARVELL_SECURE_BOOT
-
-mrvl_clean:
-       @echo "  Doimage CLEAN"
-       ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
-
-${DOIMAGETOOL}: mrvl_clean
-       @$(DOIMAGE_LIBS_CHECK)
-       ${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} VERSION=$(SUBVERSION) WTMI_IMG=$(WTMI_IMG)
-
-