rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | LOCAL_DIR := $(GET_LOCAL_DIR) |
| 2 | |
| 3 | MODULE := $(LOCAL_DIR) |
| 4 | COMMON_PLAT := $(LOCAL_DIR)/../mediatek/common |
| 5 | |
| 6 | ARCH ?= arm64 |
| 7 | ARM_CPU ?= cortex-a53 |
| 8 | WITH_SMP ?= 0 |
| 9 | WITH_KERNEL_VM ?= 1 |
| 10 | |
| 11 | LK_HEAP_IMPLEMENTATION ?= miniheap |
| 12 | |
| 13 | GLOBAL_INCLUDES += -I$(LK_TOP_DIR)/include \ |
| 14 | |
| 15 | MODULE_SRCS += \ |
| 16 | $(COMMON_PLAT)/boot_mode.c \ |
| 17 | $(LOCAL_DIR)/platform.c \ |
| 18 | $(LOCAL_DIR)/debug.c \ |
| 19 | $(LOCAL_DIR)/interrupts.c \ |
| 20 | $(LOCAL_DIR)/timer.c \ |
| 21 | |
| 22 | ifeq ($(WITH_KERNEL_VM),1) |
| 23 | KERNEL_ASPACE_BASE ?= 0xffff000000200000 |
| 24 | KERNEL_ASPACE_SIZE ?= 0x00000000f0000000 |
| 25 | MMU_IDENT_SIZE_SHIFT ?= 32 |
| 26 | endif |
| 27 | MEMBASE ?= 0x200000 |
| 28 | KERNEL_LOAD_OFFSET ?= 0x1000 |
| 29 | MEMSIZE ?= 0x00040000 # 256K |
| 30 | MACH_TYPE := 2635 |
| 31 | |
| 32 | MODULE_DEPS += \ |
| 33 | dev/interrupt/arm_gic \ |
| 34 | dev/timer/arm_generic \ |
| 35 | lib/bio \ |
| 36 | lib/partition \ |
| 37 | lib/fdt \ |
| 38 | lib/mempool \ |
| 39 | |
| 40 | ifeq ($(WITH_KERNEL_VM),1) |
| 41 | GLOBAL_DEFINES += MMU_IDENT_SIZE_SHIFT=$(MMU_IDENT_SIZE_SHIFT) |
| 42 | endif |
| 43 | |
| 44 | GLOBAL_DEFINES += \ |
| 45 | MEMBASE=$(MEMBASE) \ |
| 46 | MEMSIZE=$(MEMSIZE) \ |
| 47 | RAMBASE=$(RAMBASE) \ |
| 48 | MACH_TYPE=$(MACH_TYPE) \ |
| 49 | PLATFORM_SUPPORTS_PANIC_SHELL=1 \ |
| 50 | WITH_NO_FP=1 \ |
| 51 | |
| 52 | LINKER_SCRIPT += \ |
| 53 | $(BUILDDIR)/system-onesegment.ld |
| 54 | |
| 55 | include make/module.mk $(LOCAL_DIR)/drivers/rules.mk |