xref: /rk3399_ARM-atf/plat/marvell/marvell.mk (revision dd47809e9ea75188060bf8b294efa8578d255c63)
1486f868bSKonstantin Porotchkin# Copyright (C) 2018 Marvell International Ltd.
2486f868bSKonstantin Porotchkin#
3486f868bSKonstantin Porotchkin# SPDX-License-Identifier:     BSD-3-Clause
4486f868bSKonstantin Porotchkin# https://spdx.org/licenses
5486f868bSKonstantin Porotchkin
6486f868bSKonstantin Porotchkin# Marvell images
7486f868bSKonstantin PorotchkinBOOT_IMAGE			:= boot-image.bin
8486f868bSKonstantin PorotchkinBOOT_ENC_IMAGE			:= boot-image-enc.bin
9486f868bSKonstantin PorotchkinFLASH_IMAGE			:= flash-image.bin
10486f868bSKonstantin Porotchkin
11486f868bSKonstantin Porotchkin# Make non-trusted image by default
12486f868bSKonstantin PorotchkinMARVELL_SECURE_BOOT		:= 0
13486f868bSKonstantin Porotchkin$(eval $(call add_define,MARVELL_SECURE_BOOT))
14486f868bSKonstantin Porotchkin
15486f868bSKonstantin Porotchkin# Enable compilation for Palladium emulation platform
16486f868bSKonstantin PorotchkinPALLADIUM			:= 0
17486f868bSKonstantin Porotchkin$(eval $(call add_define,PALLADIUM))
18486f868bSKonstantin Porotchkin
19486f868bSKonstantin Porotchkinifeq (${MARVELL_SECURE_BOOT},1)
20486f868bSKonstantin PorotchkinDOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC)
21486f868bSKonstantin PorotchkinDOIMAGE_LIBS_CHECK = \
22486f868bSKonstantin Porotchkin        if ! [ -d "/usr/include/mbedtls" ]; then \
23486f868bSKonstantin Porotchkin                        echo "****************************************" >&2; \
24486f868bSKonstantin Porotchkin                        echo "Missing mbedTLS installation! " >&2; \
25486f868bSKonstantin Porotchkin                        echo "Please download it from \"tls.mbed.org\"" >&2; \
26486f868bSKonstantin Porotchkin			echo "Alternatively on Debian/Ubuntu system install" >&2; \
27486f868bSKonstantin Porotchkin			echo "\"libmbedtls-dev\" package" >&2; \
28486f868bSKonstantin Porotchkin                        echo "Make sure to use version 2.1.0 or later" >&2; \
29486f868bSKonstantin Porotchkin                        echo "****************************************" >&2; \
30486f868bSKonstantin Porotchkin                exit 1; \
31486f868bSKonstantin Porotchkin        else if ! [ -f "/usr/include/libconfig.h" ]; then \
32486f868bSKonstantin Porotchkin                        echo "********************************************************" >&2; \
33486f868bSKonstantin Porotchkin                        echo "Missing Libconfig installation!" >&2; \
34486f868bSKonstantin Porotchkin                        echo "Please download it from \"www.hyperrealm.com/libconfig/\"" >&2; \
35486f868bSKonstantin Porotchkin                        echo "Alternatively on Debian/Ubuntu system install packages" >&2; \
36486f868bSKonstantin Porotchkin                        echo "\"libconfig8\" and \"libconfig8-dev\"" >&2; \
37486f868bSKonstantin Porotchkin                        echo "********************************************************" >&2; \
38486f868bSKonstantin Porotchkin                exit 1; \
39486f868bSKonstantin Porotchkin        fi \
40486f868bSKonstantin Porotchkin        fi
41486f868bSKonstantin Porotchkinelse #MARVELL_SECURE_BOOT
42486f868bSKonstantin PorotchkinDOIMAGE_LIBS_CHECK =
43486f868bSKonstantin PorotchkinDOIMAGE_SEC_FLAGS =
44486f868bSKonstantin Porotchkinendif #MARVELL_SECURE_BOOT
45486f868bSKonstantin Porotchkin
46486f868bSKonstantin Porotchkinmrvl_clean:
47486f868bSKonstantin Porotchkin	@echo "  Doimage CLEAN"
48486f868bSKonstantin Porotchkin	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
49486f868bSKonstantin Porotchkin
50486f868bSKonstantin Porotchkin${DOIMAGETOOL}: mrvl_clean
51*dd47809eSKonstantin Porotchkin	@$(DOIMAGE_LIBS_CHECK)
52486f868bSKonstantin Porotchkin	${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} WTMI_IMG=$(WTMI_IMG)
53486f868bSKonstantin Porotchkin
54486f868bSKonstantin Porotchkin
55