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