blob: 78e91bc311ebd19e244d9dc651b424dc18eeb0a2 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001LOCAL_DIR := $(GET_LOCAL_DIR)
2
3MODULE := $(LOCAL_DIR)
4COMMON_PLAT := $(LOCAL_DIR)/../mediatek/common
5
6ARCH ?= arm64
7ARM_CPU ?= cortex-a53
8WITH_SMP ?= 0
9WITH_KERNEL_VM ?= 1
10
11LK_HEAP_IMPLEMENTATION ?= miniheap
12
13GLOBAL_INCLUDES += -I$(LK_TOP_DIR)/include \
14
15MODULE_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
22ifeq ($(WITH_KERNEL_VM),1)
23KERNEL_ASPACE_BASE ?= 0xffff000000200000
24KERNEL_ASPACE_SIZE ?= 0x00000000f0000000
25MMU_IDENT_SIZE_SHIFT ?= 32
26endif
27MEMBASE ?= 0x200000
28KERNEL_LOAD_OFFSET ?= 0x1000
29MEMSIZE ?= 0x00040000 # 256K
30MACH_TYPE := 2635
31
32MODULE_DEPS += \
33 dev/interrupt/arm_gic \
34 dev/timer/arm_generic \
35 lib/bio \
36 lib/partition \
37 lib/fdt \
38 lib/mempool \
39
40ifeq ($(WITH_KERNEL_VM),1)
41GLOBAL_DEFINES += MMU_IDENT_SIZE_SHIFT=$(MMU_IDENT_SIZE_SHIFT)
42endif
43
44GLOBAL_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
52LINKER_SCRIPT += \
53 $(BUILDDIR)/system-onesegment.ld
54
55include make/module.mk $(LOCAL_DIR)/drivers/rules.mk