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 | |
Alex Leibovich | ed2fb47 | 2019-02-25 12:24:29 +0200 | [diff] [blame] | 19 | # Set board to work with DDR 32bit |
| 20 | DDR32 := 0 |
| 21 | $(eval $(call add_define,DDR32)) |
| 22 | |
Konstantin Porotchkin | f69ec58 | 2018-06-07 18:31:14 +0300 | [diff] [blame] | 23 | ifeq (${MARVELL_SECURE_BOOT},1) |
| 24 | DOIMAGE_SEC_FLAGS := -c $(DOIMAGE_SEC) |
| 25 | DOIMAGE_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 |
| 45 | else #MARVELL_SECURE_BOOT |
| 46 | DOIMAGE_LIBS_CHECK = |
| 47 | DOIMAGE_SEC_FLAGS = |
| 48 | endif #MARVELL_SECURE_BOOT |
| 49 | |
| 50 | mrvl_clean: |
| 51 | @echo " Doimage CLEAN" |
| 52 | ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean |
| 53 | |
| 54 | ${DOIMAGETOOL}: mrvl_clean |
Konstantin Porotchkin | d62a503 | 2018-08-14 12:26:45 +0300 | [diff] [blame] | 55 | @$(DOIMAGE_LIBS_CHECK) |
Konstantin Porotchkin | e7be6e2 | 2018-10-08 16:53:09 +0300 | [diff] [blame] | 56 | ${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH} VERSION=$(SUBVERSION) WTMI_IMG=$(WTMI_IMG) |
Konstantin Porotchkin | f69ec58 | 2018-06-07 18:31:14 +0300 | [diff] [blame] | 57 | |
| 58 | |