blob: 82457536d3f8f2ebf1719afc2226143d0ed19863 [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
Alex Leiboviched2fb472019-02-25 12:24:29 +020019# Set board to work with DDR 32bit
20DDR32 := 0
21$(eval $(call add_define,DDR32))
22
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030023ifeq (${MARVELL_SECURE_BOOT},1)
24DOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC)
25DOIMAGE_LIBS_CHECK = \
26 if ! [ -d "/usr/include/mbedtls" ]; then \
27 echo "****************************************" >&2; \
28 echo "Missing mbedTLS installation! " >&2; \
29 echo "Please download it from \"tls.mbed.org\"" >&2; \
30 echo "Alternatively on Debian/Ubuntu system install" >&2; \
31 echo "\"libmbedtls-dev\" package" >&2; \
32 echo "Make sure to use version 2.1.0 or later" >&2; \
33 echo "****************************************" >&2; \
34 exit 1; \
35 else if ! [ -f "/usr/include/libconfig.h" ]; then \
36 echo "********************************************************" >&2; \
37 echo "Missing Libconfig installation!" >&2; \
38 echo "Please download it from \"www.hyperrealm.com/libconfig/\"" >&2; \
39 echo "Alternatively on Debian/Ubuntu system install packages" >&2; \
40 echo "\"libconfig8\" and \"libconfig8-dev\"" >&2; \
41 echo "********************************************************" >&2; \
42 exit 1; \
43 fi \
44 fi
45else #MARVELL_SECURE_BOOT
46DOIMAGE_LIBS_CHECK =
47DOIMAGE_SEC_FLAGS =
48endif #MARVELL_SECURE_BOOT
49
50mrvl_clean:
51 @echo " Doimage CLEAN"
52 ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
53
54${DOIMAGETOOL}: mrvl_clean
Konstantin Porotchkind62a5032018-08-14 12:26:45 +030055 @$(DOIMAGE_LIBS_CHECK)
Konstantin Porotchkine7be6e22018-10-08 16:53:09 +030056 ${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} VERSION=$(SUBVERSION) WTMI_IMG=$(WTMI_IMG)
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030057
58