xref: /rk3399_ARM-atf/plat/marvell/marvell.mk (revision 57adbf37e6177eab79277ce5406a9bbde930ee3c)
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
19*57adbf37SAlex Leibovich# Set board to work with DDR 32bit
20*57adbf37SAlex LeibovichDDR32				:= 0
21*57adbf37SAlex Leibovich$(eval $(call add_define,DDR32))
22*57adbf37SAlex Leibovich
23486f868bSKonstantin Porotchkinifeq (${MARVELL_SECURE_BOOT},1)
24486f868bSKonstantin PorotchkinDOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC)
25486f868bSKonstantin PorotchkinDOIMAGE_LIBS_CHECK = \
26486f868bSKonstantin Porotchkin        if ! [ -d "/usr/include/mbedtls" ]; then \
27486f868bSKonstantin Porotchkin                        echo "****************************************" >&2; \
28486f868bSKonstantin Porotchkin                        echo "Missing mbedTLS installation! " >&2; \
29486f868bSKonstantin Porotchkin                        echo "Please download it from \"tls.mbed.org\"" >&2; \
30486f868bSKonstantin Porotchkin			echo "Alternatively on Debian/Ubuntu system install" >&2; \
31486f868bSKonstantin Porotchkin			echo "\"libmbedtls-dev\" package" >&2; \
32486f868bSKonstantin Porotchkin                        echo "Make sure to use version 2.1.0 or later" >&2; \
33486f868bSKonstantin Porotchkin                        echo "****************************************" >&2; \
34486f868bSKonstantin Porotchkin                exit 1; \
35486f868bSKonstantin Porotchkin        else if ! [ -f "/usr/include/libconfig.h" ]; then \
36486f868bSKonstantin Porotchkin                        echo "********************************************************" >&2; \
37486f868bSKonstantin Porotchkin                        echo "Missing Libconfig installation!" >&2; \
38486f868bSKonstantin Porotchkin                        echo "Please download it from \"www.hyperrealm.com/libconfig/\"" >&2; \
39486f868bSKonstantin Porotchkin                        echo "Alternatively on Debian/Ubuntu system install packages" >&2; \
40486f868bSKonstantin Porotchkin                        echo "\"libconfig8\" and \"libconfig8-dev\"" >&2; \
41486f868bSKonstantin Porotchkin                        echo "********************************************************" >&2; \
42486f868bSKonstantin Porotchkin                exit 1; \
43486f868bSKonstantin Porotchkin        fi \
44486f868bSKonstantin Porotchkin        fi
45486f868bSKonstantin Porotchkinelse #MARVELL_SECURE_BOOT
46486f868bSKonstantin PorotchkinDOIMAGE_LIBS_CHECK =
47486f868bSKonstantin PorotchkinDOIMAGE_SEC_FLAGS =
48486f868bSKonstantin Porotchkinendif #MARVELL_SECURE_BOOT
49486f868bSKonstantin Porotchkin
50486f868bSKonstantin Porotchkinmrvl_clean:
51486f868bSKonstantin Porotchkin	@echo "  Doimage CLEAN"
52486f868bSKonstantin Porotchkin	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
53486f868bSKonstantin Porotchkin
54486f868bSKonstantin Porotchkin${DOIMAGETOOL}: mrvl_clean
55dd47809eSKonstantin Porotchkin	@$(DOIMAGE_LIBS_CHECK)
561e66bacbSKonstantin Porotchkin	${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} VERSION=$(SUBVERSION) WTMI_IMG=$(WTMI_IMG)
57486f868bSKonstantin Porotchkin
58486f868bSKonstantin Porotchkin
59