| LOCAL_DIR := $(GET_LOCAL_DIR) |
| |
| MODULE := $(LOCAL_DIR) |
| |
| ARCH ?= arm64 |
| ARM_CPU ?= cortex-a53 |
| WITH_SMP ?= 0 |
| WITH_KERNEL_VM ?= 1 |
| WITH_MTK_PMIC_WRAP_AND_PMIC ?= 0 |
| AB_UPGRADE_APP := 1 |
| |
| LK_HEAP_IMPLEMENTATION ?= miniheap |
| |
| GLOBAL_INCLUDES += -I$(LK_TOP_DIR)/include \ |
| |
| MODULE_SRCS += \ |
| $(LOCAL_DIR)/platform.c \ |
| $(LOCAL_DIR)/plat_dbg_info.c \ |
| $(LOCAL_DIR)/../common/debug.c \ |
| $(LOCAL_DIR)/../common/interrupts.c \ |
| |
| GLOBAL_INCLUDES += \ |
| $(LOCAL_DIR)/../common/include \ |
| |
| ifeq ($(WITH_KERNEL_VM),1) |
| KERNEL_ASPACE_BASE ?= 0xfffffff000000000 |
| KERNEL_ASPACE_SIZE ?= 0x0000000180000000 |
| KERNEL_BASE ?= 0xfffffff000200000 # KERNEL_ASPACE_BASE + MEMBASE |
| MMU_IDENT_SIZE_SHIFT ?= 32 |
| endif |
| |
| MEMBASE ?= 0x200000 |
| KERNEL_LOAD_OFFSET ?= 0x1000 |
| MEMSIZE ?= 0x00080000 # 512K |
| MACH_TYPE := 6771 |
| |
| ifeq ($(WITH_KERNEL_VM),1) |
| GLOBAL_DEFINES += MMU_IDENT_SIZE_SHIFT=$(MMU_IDENT_SIZE_SHIFT) |
| else |
| GLOBAL_DEFINES += NOVM_MAX_ARENAS=2 |
| endif |
| |
| # LK build as BL2 or BL33 setting |
| LK_AS_BL33 ?= 0 |
| MODULE_DEPS += \ |
| dev/interrupt/arm_gic_v3 \ |
| dev/timer/arm_generic \ |
| lib/bio \ |
| lib/cksum \ |
| lib/partition \ |
| lib/fdt \ |
| lib/mempool \ |
| |
| GLOBAL_DEFINES += \ |
| MEMBASE=$(MEMBASE) \ |
| MEMSIZE=$(MEMSIZE) \ |
| RAMBASE=$(RAMBASE) \ |
| MACH_TYPE=$(MACH_TYPE) \ |
| PLATFORM_SUPPORTS_PANIC_SHELL=1 \ |
| NOVM_MAX_ARENAS=2 \ |
| WITH_NO_FP=1 \ |
| AB_UPGRADE_APP=$(AB_UPGRADE_APP) \ |
| |
| GLOBAL_CFLAGS += -fno-stack-protector -Wno-return-type\ |
| |
| LINKER_SCRIPT += \ |
| $(BUILDDIR)/system-onesegment.ld |
| |
| include make/module.mk $(LOCAL_DIR)/drivers/rules.mk |
| |
| WITH_DISPLAY ?= 0 |
| |
| ifeq ($(WITH_DISPLAY),1) |
| GLOBAL_DEFINES += WITH_DISPLAY=$(WITH_DISPLAY) |
| endif |
| |
| HDMI_MAIN_PATH ?= 0 |
| |
| ifeq ($(WITH_DISPLAY),1) |
| GLOBAL_DEFINES += HDMI_MAIN_PATH=$(HDMI_MAIN_PATH) |
| endif |
| |
| ifeq ($(WITH_PANEL_TPV_PH060PB16A),1) |
| GLOBAL_DEFINES += WITH_PANEL_TPV_PH060PB16A=$(WITH_PANEL_TPV_PH060PB16A) |
| endif |
| |
| TOOLCHAIN_PREFIX := $(ARCH_$(ARCH)_TOOLCHAIN_PREFIX) |
| $(info TOOLCHAIN_PREFIX = $(TOOLCHAIN_PREFIX)) |
| ifneq ($(call TOBOOL,$(CLANGBUILD)),true) |
| GCC_VER_GTE94 := $(shell echo `$(TOOLCHAIN_PREFIX)gcc -dumpfullversion | cut -f1-2 -d.` \>= 9.4 | bc ) |
| $(info GCC_VER = $(shell echo `$(TOOLCHAIN_PREFIX)gcc -dumpfullversion | cut -f1-2 -d.`)) |
| ifeq ($(GCC_VER_GTE94),1) |
| ARCH_COMPILEFLAGS += -mno-outline-atomics |
| endif |
| endif |
| $(info ARCH_COMPILEFLAGS = $(ARCH_COMPILEFLAGS)) |
| |