| LOCAL_DIR := $(GET_LOCAL_DIR) |
| |
| MODULE := $(LOCAL_DIR) |
| MTK_COMMON_PLAT_DIR := $(LOCAL_DIR)/../../platform/mediatek/common |
| # [TODO] follow normal ways to remove lib from MODULE_INCLUDES |
| MODULE_INCLUDES += $(MODULE_BUILDDIR)/../../../include lib \ |
| $(MTK_COMMON_PLAT_DIR)/include |
| |
| SCRATCH_SIZE ?= 0x04000000 # 64MB |
| MAX_DTB_SIZE ?= 0x00200000 # 2MB |
| |
| GLOBAL_DEFINES += SCRATCH_SIZE=$(SCRATCH_SIZE) \ |
| MAX_DTB_SIZE=$(MAX_DTB_SIZE) |
| |
| # secure boot options |
| ifeq ($(strip $(SECURE_BOOT_ENABLE)),yes) |
| ifeq ($(strip $(SECURE_BOOT_TYPE)),avb) |
| GLOBAL_COMPILEFLAGS += -DAVB_VERIFY_KERNEL |
| |
| ifeq ($(strip $(AVB_ENABLE_ANTIROLLBACK)),yes) |
| GLOBAL_COMPILEFLAGS += -DAVB_ENABLE_ANTIROLLBACK |
| endif |
| endif # SECURE_BOOT_TYPE |
| endif # SECURE_BOOT_ENABLE |
| |
| ifeq ($(strip $(AB_OTA_UPDATER)),yes) |
| GLOBAL_COMPILEFLAGS += -DAB_OTA_UPDATER |
| endif |
| |
| # loading kernel format config, |
| # 0: fit image header 1: android image header |
| ENABLE_ANDROID_BOOTIMG_SUPPORT ?= 0 |
| GLOBAL_DEFINES += \ |
| ENABLE_ANDROID_BOOTIMG_SUPPORT=$(ENABLE_ANDROID_BOOTIMG_SUPPORT) |
| |
| ifeq ($(strip $(ENABLE_ANDROID_BOOTIMG_SUPPORT)),1) |
| MODULE_DEPS += lib/android_bootimg |
| endif |
| |
| # Todo: remove this option after cmdlineoverlay integration done |
| ifeq ($(strip $(ANDROID_2712)),yes) |
| MODULE_COMPILEFLAGS += -DMT2712_ANDROID |
| endif |
| |
| MODULE_DEPS += \ |
| lib/bio \ |
| lib/mempool \ |
| lib/fdt \ |
| lib/fit \ |
| lib/fastboot \ |
| lib/libavb \ |
| lib/libavb_ab \ |
| lib/android_dtbo |
| |
| MODULE_SRCS += \ |
| $(LOCAL_DIR)/blxboot.c \ |
| $(LOCAL_DIR)/blxboot_ab.c \ |
| $(LOCAL_DIR)/blxboot_plat.c \ |
| $(LOCAL_DIR)/dto.c \ |
| $(LOCAL_DIR)/imagelist.c \ |
| $(LOCAL_DIR)/avb.c \ |
| $(MTK_COMMON_PLAT_DIR)/drivers/smc/smc.c \ |
| $(MTK_COMMON_PLAT_DIR)/drivers/smc/psci.c |
| |
| ifeq ($(strip $(AB_OTA_UPDATER)),yes) |
| MODULE_DEPS += lib/bootctrl |
| endif |
| |
| ifeq ($(strip $(AB_UPGRADE_APP)),yes) |
| MODULE_DEPS += lib/upgrade_app_ctrl |
| endif |
| |
| ifeq ($(LK_AS_BL33),0) |
| MODULE_SRCS += $(LOCAL_DIR)/bl2boot.c |
| else |
| MODULE_SRCS += $(LOCAL_DIR)/bl33boot.c |
| endif |
| |
| GLOBAL_COMPILEFLAGS += -Os |
| |
| include $(LOCAL_DIR)/images_ab_slot_def.mk |
| include make/module.mk |