Konstantin Porotchkin | f69ec58 | 2018-06-07 18:31:14 +0300 | [diff] [blame] | 1 | # Copyright (C) 2018 Marvell International Ltd. |
| 2 | # |
| 3 | # SPDX-License-Identifier: BSD-3-Clause |
| 4 | # https://spdx.org/licenses |
| 5 | |
| 6 | # Marvell images |
| 7 | BOOT_IMAGE := boot-image.bin |
| 8 | BOOT_ENC_IMAGE := boot-image-enc.bin |
| 9 | FLASH_IMAGE := flash-image.bin |
| 10 | |
| 11 | # Make non-trusted image by default |
| 12 | MARVELL_SECURE_BOOT := 0 |
| 13 | $(eval $(call add_define,MARVELL_SECURE_BOOT)) |
| 14 | |
| 15 | # Enable compilation for Palladium emulation platform |
| 16 | PALLADIUM := 0 |
| 17 | $(eval $(call add_define,PALLADIUM)) |
| 18 | |
| 19 | ifeq (${MARVELL_SECURE_BOOT},1) |
| 20 | DOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC) |
| 21 | DOIMAGE_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 |
| 41 | else #MARVELL_SECURE_BOOT |
| 42 | DOIMAGE_LIBS_CHECK = |
| 43 | DOIMAGE_SEC_FLAGS = |
| 44 | endif #MARVELL_SECURE_BOOT |
| 45 | |
| 46 | mrvl_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 | |