blob: 07361f67e66b4096bac769a43eb0e03c08c628f2 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001LOCAL_DIR := $(GET_LOCAL_DIR)
2
3MODULE := $(LOCAL_DIR)
4
5WITH_SMP := 1
6#LK_HEAP_IMPLEMENTATION ?= dlmalloc
7
8MODULE_DEPS := \
9 dev/timer/arm_generic \
10 lib/cbuf
11
12
13#lib/bio \
14 lib/cbuf \
15 lib/minip \
16 dev/interrupt/arm_gic \
17 dev/timer/arm_cortex_a9
18
19MODULE_SRCS += \
20 $(LOCAL_DIR)/gpio.c \
21 $(LOCAL_DIR)/intc.c \
22 $(LOCAL_DIR)/platform.c \
23
24MEMBASE := 0x00000000
25
26GLOBAL_DEFINES += \
27 ARM_ARCH_WAIT_FOR_SECONDARIES=1
28
29LINKER_SCRIPT += \
30 $(BUILDDIR)/system-onesegment.ld
31
32ifeq ($(TARGET),rpi2)
33ARCH := arm
34ARM_CPU := cortex-a7
35# put our kernel at 0x80000000
36KERNEL_BASE = 0x80000000
37KERNEL_LOAD_OFFSET := 0x00008000
38MEMSIZE ?= 0x10000000 # 256MB
39SMP_CPU_ID_BITS := 8
40GLOBAL_DEFINES += \
41 BCM2836=1
42
43MODULE_SRCS += \
44 $(LOCAL_DIR)/uart.c
45
46else ifeq ($(TARGET),rpi3)
47ARCH := arm64
48ARM_CPU := cortex-a53
49
50KERNEL_LOAD_OFFSET := 0x00080000
51MEMSIZE ?= 0x40000000 # 1GB
52
53GLOBAL_DEFINES += \
54 MEMBASE=$(MEMBASE) \
55 MEMSIZE=$(MEMSIZE) \
56 MMU_WITH_TRAMPOLINE=1 \
57 BCM2837=1
58
59MODULE_SRCS += \
60 $(LOCAL_DIR)/miniuart.c
61
62MODULE_DEPS += \
63 app/shell \
64 app/tests \
65 lib/fdt
66
67WITH_CPP_SUPPORT=true
68
69endif
70
71include make/module.mk