| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
MARVELL_PLAT_BASE := plat/marvell/armada |
| 7 |
MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell/armada |
| 8 |
|
| 9 |
SEPARATE_CODE_AND_RODATA := 1 |
| 10 |
|
| 11 |
|
| 12 |
ARO_ENABLE := 0 |
| 13 |
$(eval $(call add_define,ARO_ENABLE)) |
| 14 |
|
| 15 |
|
| 16 |
LLC_SRAM := 0 |
| 17 |
$(eval $(call add_define,LLC_SRAM)) |
| 18 |
|
| 19 |
|
| 20 |
LLC_ENABLE := 1 |
| 21 |
$(eval $(call add_define,LLC_ENABLE)) |
| 22 |
|
| 23 |
include lib/xlat_tables_v2/xlat_tables.mk |
| 24 |
|
| 25 |
PLAT_INCLUDES += -I$(MARVELL_PLAT_INCLUDE_BASE)/common \ |
| 26 |
-I$(MARVELL_PLAT_INCLUDE_BASE)/common/aarch64 |
| 27 |
|
| 28 |
|
| 29 |
PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \ |
| 30 |
$(MARVELL_PLAT_BASE)/common/aarch64/marvell_common.c \ |
| 31 |
$(MARVELL_PLAT_BASE)/common/aarch64/marvell_helpers.S \ |
| 32 |
$(MARVELL_COMMON_BASE)/marvell_console.c |
| 33 |
|
| 34 |
BL1_SOURCES += drivers/delay_timer/delay_timer.c \ |
| 35 |
drivers/io/io_fip.c \ |
| 36 |
drivers/io/io_memmap.c \ |
| 37 |
drivers/io/io_storage.c \ |
| 38 |
$(MARVELL_PLAT_BASE)/common/marvell_bl1_setup.c \ |
| 39 |
$(MARVELL_PLAT_BASE)/common/marvell_io_storage.c \ |
| 40 |
$(MARVELL_PLAT_BASE)/common/plat_delay_timer.c |
| 41 |
|
| 42 |
ifdef EL3_PAYLOAD_BASE |
| 43 |
|
| 44 |
|
| 45 |
endif |
| 46 |
|
| 47 |
BL2_SOURCES += drivers/io/io_fip.c \ |
| 48 |
drivers/io/io_memmap.c \ |
| 49 |
drivers/io/io_storage.c \ |
| 50 |
common/desc_image_load.c \ |
| 51 |
$(MARVELL_PLAT_BASE)/common/marvell_bl2_setup.c \ |
| 52 |
$(MARVELL_PLAT_BASE)/common/marvell_io_storage.c \ |
| 53 |
$(MARVELL_PLAT_BASE)/common/aarch64/marvell_bl2_mem_params_desc.c \ |
| 54 |
$(MARVELL_PLAT_BASE)/common/marvell_image_load.c |
| 55 |
|
| 56 |
ifeq (${SPD},opteed) |
| 57 |
PLAT_INCLUDES += -Iinclude/lib |
| 58 |
BL2_SOURCES += lib/optee/optee_utils.c |
| 59 |
endif |
| 60 |
|
| 61 |
BL31_SOURCES += $(MARVELL_PLAT_BASE)/common/marvell_bl31_setup.c \ |
| 62 |
$(MARVELL_PLAT_BASE)/common/marvell_pm.c \ |
| 63 |
$(MARVELL_PLAT_BASE)/common/marvell_topology.c \ |
| 64 |
plat/common/plat_psci_common.c \ |
| 65 |
$(MARVELL_PLAT_BASE)/common/plat_delay_timer.c \ |
| 66 |
drivers/delay_timer/delay_timer.c |
| 67 |
|
| 68 |
|
| 69 |
$(eval $(call add_define,CONFIG_ARM64)) |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
ifneq ($(BL32_EXTRA1),) |
| 74 |
$(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1)) |
| 75 |
endif |
| 76 |
ifneq ($(BL32_EXTRA2),) |
| 77 |
$(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2)) |
| 78 |
endif |
| 79 |
|
| 80 |
|
| 81 |
ifeq (${MSS_SUPPORT}, 1) |
| 82 |
include $(MARVELL_PLAT_BASE)/common/mss/mss_common.mk |
| 83 |
endif |
| 84 |
|
| 85 |
$(BUILD_PLAT)/$(BOOT_IMAGE): $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(FIP_NAME) |
| 86 |
$(if $(shell find $(BUILD_PLAT)/bl1.bin -type f -size +128k),$(error "Image '$(BUILD_PLAT)/bl1.bin' is bigger than 128kB")) |
| 87 |
$(q)cp $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; } |
| 88 |
$(q)truncate -s %128K $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; } |
| 89 |
$(q)cat $(BUILD_PLAT)/$(FIP_NAME) >> $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; } |
| 90 |
$(q)truncate -s %4 $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; } |
| 91 |
$(s)echo |
| 92 |
$(s)echo "Built $@ successfully" |
| 93 |
$(s)echo |
| 94 |
|
| 95 |
.PHONY: mrvl_bootimage |
| 96 |
mrvl_bootimage: $(BUILD_PLAT)/$(BOOT_IMAGE) |
| 97 |
|
| 98 |
.PHONY: mrvl_flash |
| 99 |
mrvl_flash: $(BUILD_PLAT)/$(FLASH_IMAGE) |