No real change except moving fdt walking code into the fdtwalk library. Also update some constants for ARM virt and bump the load address to make sure the FDT works. Turns out it had been missing for a while so it was actually not finding it because the kernel was loaded too close to the start of memory.
49 lines
900 B
Makefile
49 lines
900 B
Makefile
LOCAL_DIR := $(GET_LOCAL_DIR)
|
|
|
|
MODULE := $(LOCAL_DIR)
|
|
|
|
ifeq ($(ARCH),)
|
|
ARCH := arm64
|
|
endif
|
|
ifeq ($(ARCH),arm64)
|
|
ARM_CPU ?= cortex-a53
|
|
endif
|
|
ifeq ($(ARCH),arm)
|
|
ARM_CPU ?= cortex-a15
|
|
endif
|
|
WITH_SMP ?= 1
|
|
|
|
LK_HEAP_IMPLEMENTATION ?= dlmalloc
|
|
|
|
MODULE_SRCS += \
|
|
$(LOCAL_DIR)/debug.c \
|
|
$(LOCAL_DIR)/platform.c \
|
|
$(LOCAL_DIR)/secondary_boot.S \
|
|
$(LOCAL_DIR)/uart.c
|
|
|
|
MEMBASE := 0x40000000
|
|
MEMSIZE ?= 0x08000000 # 512MB
|
|
KERNEL_LOAD_OFFSET := 0x100000 # 1MB
|
|
|
|
MODULE_DEPS += \
|
|
lib/cbuf \
|
|
lib/fdtwalk \
|
|
dev/interrupt/arm_gic \
|
|
dev/timer/arm_generic \
|
|
dev/virtio/block \
|
|
dev/virtio/gpu \
|
|
dev/virtio/net \
|
|
|
|
GLOBAL_DEFINES += \
|
|
MEMBASE=$(MEMBASE) \
|
|
MEMSIZE=$(MEMSIZE) \
|
|
PLATFORM_SUPPORTS_PANIC_SHELL=1 \
|
|
CONSOLE_HAS_INPUT_BUFFER=1
|
|
|
|
GLOBAL_DEFINES += MMU_WITH_TRAMPOLINE=1 \
|
|
|
|
LINKER_SCRIPT += \
|
|
$(BUILDDIR)/system-onesegment.ld
|
|
|
|
include make/module.mk
|