xref: /rk3399_ARM-atf/plat/marvell/marvell.mk (revision 486f868bab1d1729e8f6b5300cb9d75840f57774)
1*486f868bSKonstantin Porotchkin# Copyright (C) 2018 Marvell International Ltd.
2*486f868bSKonstantin Porotchkin#
3*486f868bSKonstantin Porotchkin# SPDX-License-Identifier:     BSD-3-Clause
4*486f868bSKonstantin Porotchkin# https://spdx.org/licenses
5*486f868bSKonstantin Porotchkin
6*486f868bSKonstantin Porotchkin# Marvell images
7*486f868bSKonstantin PorotchkinBOOT_IMAGE			:= boot-image.bin
8*486f868bSKonstantin PorotchkinBOOT_ENC_IMAGE			:= boot-image-enc.bin
9*486f868bSKonstantin PorotchkinFLASH_IMAGE			:= flash-image.bin
10*486f868bSKonstantin Porotchkin
11*486f868bSKonstantin Porotchkin# Make non-trusted image by default
12*486f868bSKonstantin PorotchkinMARVELL_SECURE_BOOT		:= 0
13*486f868bSKonstantin Porotchkin$(eval $(call add_define,MARVELL_SECURE_BOOT))
14*486f868bSKonstantin Porotchkin
15*486f868bSKonstantin Porotchkin# Enable compilation for Palladium emulation platform
16*486f868bSKonstantin PorotchkinPALLADIUM			:= 0
17*486f868bSKonstantin Porotchkin$(eval $(call add_define,PALLADIUM))
18*486f868bSKonstantin Porotchkin
19*486f868bSKonstantin Porotchkinifeq (${MARVELL_SECURE_BOOT},1)
20*486f868bSKonstantin PorotchkinDOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC)
21*486f868bSKonstantin PorotchkinDOIMAGE_LIBS_CHECK = \
22*486f868bSKonstantin Porotchkin        if ! [ -d "/usr/include/mbedtls" ]; then \
23*486f868bSKonstantin Porotchkin                        echo "****************************************" >&2; \
24*486f868bSKonstantin Porotchkin                        echo "Missing mbedTLS installation! " >&2; \
25*486f868bSKonstantin Porotchkin                        echo "Please download it from \"tls.mbed.org\"" >&2; \
26*486f868bSKonstantin Porotchkin			echo "Alternatively on Debian/Ubuntu system install" >&2; \
27*486f868bSKonstantin Porotchkin			echo "\"libmbedtls-dev\" package" >&2; \
28*486f868bSKonstantin Porotchkin                        echo "Make sure to use version 2.1.0 or later" >&2; \
29*486f868bSKonstantin Porotchkin                        echo "****************************************" >&2; \
30*486f868bSKonstantin Porotchkin                exit 1; \
31*486f868bSKonstantin Porotchkin        else if ! [ -f "/usr/include/libconfig.h" ]; then \
32*486f868bSKonstantin Porotchkin                        echo "********************************************************" >&2; \
33*486f868bSKonstantin Porotchkin                        echo "Missing Libconfig installation!" >&2; \
34*486f868bSKonstantin Porotchkin                        echo "Please download it from \"www.hyperrealm.com/libconfig/\"" >&2; \
35*486f868bSKonstantin Porotchkin                        echo "Alternatively on Debian/Ubuntu system install packages" >&2; \
36*486f868bSKonstantin Porotchkin                        echo "\"libconfig8\" and \"libconfig8-dev\"" >&2; \
37*486f868bSKonstantin Porotchkin                        echo "********************************************************" >&2; \
38*486f868bSKonstantin Porotchkin                exit 1; \
39*486f868bSKonstantin Porotchkin        fi \
40*486f868bSKonstantin Porotchkin        fi
41*486f868bSKonstantin Porotchkinelse #MARVELL_SECURE_BOOT
42*486f868bSKonstantin PorotchkinDOIMAGE_LIBS_CHECK =
43*486f868bSKonstantin PorotchkinDOIMAGE_SEC_FLAGS =
44*486f868bSKonstantin Porotchkinendif #MARVELL_SECURE_BOOT
45*486f868bSKonstantin Porotchkin
46*486f868bSKonstantin Porotchkinmrvl_clean:
47*486f868bSKonstantin Porotchkin	@echo "  Doimage CLEAN"
48*486f868bSKonstantin Porotchkin	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
49*486f868bSKonstantin Porotchkin
50*486f868bSKonstantin Porotchkin${DOIMAGETOOL}: mrvl_clean
51*486f868bSKonstantin Porotchkin	${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} WTMI_IMG=$(WTMI_IMG)
52*486f868bSKonstantin Porotchkin
53*486f868bSKonstantin Porotchkin
54