blob: a42533e2bf2d417273affa277a094a9714568872 [file] [log] [blame]
LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
COMMON_PLAT := $(LOCAL_DIR)/../common
ARCH ?= arm64
ARM_CPU ?= cortex-a53
WITH_SMP ?= 0
LK_HEAP_IMPLEMENTATION ?= miniheap
GLOBAL_INCLUDES += -I$(LK_TOP_DIR)/include
GLOBAL_CFLAGS += -fno-stack-protector
MODULE_SRCS += \
$(LOCAL_DIR)/platform.c \
$(LOCAL_DIR)/../common/debug.c \
$(LOCAL_DIR)/../common/interrupts.c \
$(LOCAL_DIR)/../common/boot_mode.c \
$(LOCAL_DIR)/fixup/plat_fixup.c \
GLOBAL_INCLUDES += \
$(LOCAL_DIR)/../common/include
MACH_TYPE := 8133
KERNEL_ASPACE_BASE ?= 0xfffffff000000000
KERNEL_ASPACE_SIZE ?= 0x0000000180000000
MMU_IDENT_SIZE_SHIFT ?= 32
CACHED_MEMPOOL_ADDR ?= 0xfffffff04c500000
CACHED_MEMPOOL_SIZE ?= 0x03A00000 # 58MB
UNCACHED_MEMPOOL_ADDR ?= 0xfffffff04c300000
UNCACHED_MEMPOOL_SIZE ?= 0x200000 # 2MB
BL33_ADDR ?= 0xfffffff043200000
# 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/partition \
lib/fdt \
lib/mempool \
lib/kcmdline
# if BOOTAPP is not specified elsewhere, and AVB is required, choose 'avbboot'
ifeq ($(strip $(SECURE_BOOT_ENABLE)),yes)
ifeq ($(strip $(SECURE_BOOT_TYPE)),avb)
BOOTAPP ?= avbboot
endif
endif
# otherwise, choose 'fitboot'
BOOTAPP ?= fitboot
MODULES += app/$(BOOTAPP)
GLOBAL_DEFINES += MMU_IDENT_SIZE_SHIFT=$(MMU_IDENT_SIZE_SHIFT)
GLOBAL_DEFINES += \
RAMBASE=$(RAMBASE) \
MACH_TYPE=$(MACH_TYPE) \
PLATFORM_SUPPORTS_PANIC_SHELL=1 \
WITH_NO_FP=1 \
CACHED_MEMPOOL_ADDR=$(CACHED_MEMPOOL_ADDR) \
CACHED_MEMPOOL_SIZE=$(CACHED_MEMPOOL_SIZE) \
UNCACHED_MEMPOOL_ADDR=$(UNCACHED_MEMPOOL_ADDR) \
UNCACHED_MEMPOOL_SIZE=$(UNCACHED_MEMPOOL_SIZE) \
BL33_ADDR=$(BL33_ADDR) \
LK_AS_BL33=$(LK_AS_BL33)
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))
LINKER_SCRIPT += \
$(BUILDDIR)/system-onesegment.ld
include $(LOCAL_DIR)/bl2_bl33_options.mk
include make/module.mk $(LOCAL_DIR)/drivers/rules.mk