summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-09-20 15:31:13 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-09-27 10:09:51 +0100
commit7ed333d5eaecf4ad940d41bca3dee9c83e7bc822 (patch)
treeb9e497ca7f4668842ea98ab54253c3fc631b529d
parent507dc83dd8a52439df5df0e0c53f030824537d1a (diff)
AArch32: Add makefile support
This patch adds the necessary support to Makefiles in TFTF to enable build for AArch32. Change-Id: Ie8dae9323982f1f8d07192de67292c7e262bca07
-rw-r--r--Makefile29
-rw-r--r--framework/framework.mk24
-rw-r--r--plat/fvp/platform.mk4
3 files changed, 39 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 078f87d..6dcd28f 100644
--- a/Makefile
+++ b/Makefile
@@ -146,17 +146,32 @@ include framework/framework.mk
include tests/tests.mk
include ${PLAT_MAKEFILE_FULL}
+# Special handling for AArch32 builds
+ifeq (${ARCH},aarch32)
+ # Firmware update images (NS_BL1U and NS_BL2U) are not supported
+ # for AArch32.
+ ifeq (${FIRMWARE_UPDATE},1)
+ $(info Firmware Update images are not supported on AArch32)
+ $(info Forcing FIRMWARE_UPDATE to 0)
+ FIRMWARE_UPDATE := 0
+ endif
+ # AArch32 build is only supported for FVP currently
+ ifneq (${PLAT},fvp)
+ $(error AArch32 build is not supported on ${PLAT})
+ endif
+endif
+
.PHONY: all msg_start clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch
.SUFFIXES:
INCLUDES := -Iinclude \
-Iinclude/common \
- -Iinclude/common/aarch64 \
+ -Iinclude/common/${ARCH} \
-Iinclude/drivers \
-Iinclude/drivers/arm \
-Iinclude/drivers/io \
-Iinclude/lib \
- -Iinclude/lib/aarch64 \
+ -Iinclude/lib/${ARCH} \
-Iinclude/lib/utils \
-Iinclude/plat/common \
-Iinclude/runtime_services \
@@ -227,13 +242,19 @@ CFLAGS += -g
ASFLAGS += -g -Wa,--gdwarf-2
endif
+ASFLAGS_aarch64 = -mgeneral-regs-only
+CFLAGS_aarch64 = -mgeneral-regs-only
+
+ASFLAGS_aarch32 = -march=armv8-a
+CFLAGS_aarch32 = -march=armv8-a
+
ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
-Werror -Wmissing-include-dirs \
- -mgeneral-regs-only -D__ASSEMBLY__ \
+ -D__ASSEMBLY__ $(ASFLAGS_$(ARCH)) \
${DEFINES} ${INCLUDES}
CFLAGS += -nostdinc -pedantic -ffreestanding -Wall \
-Werror -Wno-error=unused-function \
- -Wmissing-include-dirs -mgeneral-regs-only \
+ -Wmissing-include-dirs $(CFLAGS_$(ARCH)) \
-std=c99 -c -Os ${DEFINES} ${INCLUDES}
CFLAGS += -ffunction-sections -fdata-sections
diff --git a/framework/framework.mk b/framework/framework.mk
index e7ea6d2..5327707 100644
--- a/framework/framework.mk
+++ b/framework/framework.mk
@@ -49,34 +49,34 @@ STD_LIB_SOURCES := lib/stdlib/abort.c \
lib/stdlib/subr_prf.c
FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c \
- framework/aarch64/arch.c \
- framework/aarch64/entrypoint.S \
- framework/aarch64/exceptions.S \
+ framework/${ARCH}/arch.c \
+ framework/${ARCH}/entrypoint.S \
+ framework/${ARCH}/exceptions.S \
framework/debug.c \
framework/main.c \
framework/nvm_results_helpers.c \
framework/report.c \
framework/timer/timer_framework.c \
- lib/aarch64/cache_helpers.S \
- lib/aarch64/misc_helpers.S \
+ lib/${ARCH}/cache_helpers.S \
+ lib/${ARCH}/misc_helpers.S \
lib/delay/delay.c \
lib/events/events.c \
lib/irq/irq.c \
- lib/locks/aarch64/spinlock.S \
+ lib/locks/${ARCH}/spinlock.S \
lib/power_management/hotplug/hotplug.c \
- lib/power_management/suspend/aarch64/asm_tftf_suspend.S \
+ lib/power_management/suspend/${ARCH}/asm_tftf_suspend.S \
lib/power_management/suspend/tftf_suspend.c \
lib/psci/psci.c \
- lib/smc/aarch64/asm_smc.S \
- lib/smc/aarch64/smc.c \
+ lib/smc/${ARCH}/asm_smc.S \
+ lib/smc/${ARCH}/smc.c \
${STD_LIB_SOURCES} \
lib/trusted_os/trusted_os.c \
lib/utils/mp_printf.c \
lib/utils/uuid.c \
- lib/xlat_tables/aarch64/xlat_tables.c \
+ lib/xlat_tables/${ARCH}/xlat_tables.c \
lib/xlat_tables/xlat_tables_common.c \
- plat/common/aarch64/platform_helpers.S \
- plat/common/aarch64/platform_mp_stack.S \
+ plat/common/${ARCH}/platform_helpers.S \
+ plat/common/${ARCH}/platform_mp_stack.S \
plat/common/plat_common.c \
plat/common/plat_state_id.c \
plat/common/plat_topology.c \
diff --git a/plat/fvp/platform.mk b/plat/fvp/platform.mk
index b483a0b..40128d6 100644
--- a/plat/fvp/platform.mk
+++ b/plat/fvp/platform.mk
@@ -34,10 +34,10 @@ PLAT_SOURCES := drivers/arm/gic/arm_gic_v2v3.c \
drivers/arm/gic/gic_common.c \
drivers/arm/gic/gic_v2.c \
drivers/arm/gic/gic_v3.c \
- drivers/arm/pl011/aarch64/pl011_console.S \
+ drivers/arm/pl011/${ARCH}/pl011_console.S \
drivers/arm/sp805/sp805.c \
drivers/arm/timer/system_timer.c \
- lib/semihosting/aarch64/semihosting_call.S \
+ lib/semihosting/${ARCH}/semihosting_call.S \
lib/semihosting/semihosting.c \
plat/fvp/fvp_pwr_state.c \
plat/fvp/fvp_timers.c \