summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorChun-Chen TK Hsu <chunchenhsu@google.com>2019-08-09 18:54:04 +0800
committerChun-Chen TK Hsu <chunchenhsu@google.com>2019-08-10 05:20:31 +0000
commitf320cba1dfcc31b12ed5346c4d773888b18e0f43 (patch)
tree680c2eea64b24ae6eae87f2f4c8e0565c590d83c /system
parent386e2018fa81a467d0fafc9882290a17032fb891 (diff)
downloadgem5-f320cba1dfcc31b12ed5346c4d773888b18e0f43.tar.xz
system-arm: Refactor makefile to create targets with functions
This change simplifies writing targets which has same prefix but differrent number of CPUs. Change-Id: I3b7d67a554f5d27714ace6b88c9784ddaa3b34d5 Signed-off-by: Chun-Chen TK Hsu <chunchenhsu@google.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19989 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'system')
-rw-r--r--system/arm/dt/Makefile27
1 files changed, 11 insertions, 16 deletions
diff --git a/system/arm/dt/Makefile b/system/arm/dt/Makefile
index 626ff0891..c472a0e09 100644
--- a/system/arm/dt/Makefile
+++ b/system/arm/dt/Makefile
@@ -31,24 +31,19 @@ DTC?=dtc
DTC_CPP_FLAGS=-nostdinc -undef
+# $(1) is the prefix of DTB files
+NUM_CPUS := 1 2 4 8 16
+CREATE_TARGET=$(foreach n, $(NUM_CPUS), $(1)_$(n)cpu.dtb)
+
+TARGET_PREFIX=\
+ armv7_gem5_v1 \
+ armv8_gem5_v1 \
+ armv8_gem5_v2
+
TARGETS=\
- armv7_gem5_v1_1cpu.dtb \
- armv7_gem5_v1_2cpu.dtb \
- armv7_gem5_v1_4cpu.dtb \
- armv7_gem5_v1_8cpu.dtb \
- armv7_gem5_v1_16cpu.dtb \
- armv8_gem5_v1_1cpu.dtb \
- armv8_gem5_v1_2cpu.dtb \
- armv8_gem5_v1_4cpu.dtb \
- armv8_gem5_v1_8cpu.dtb \
- armv8_gem5_v1_16cpu.dtb \
+ $(foreach prefix, $(TARGET_PREFIX), $(call CREATE_TARGET, $(prefix))) \
armv8_gem5_v1_big_little_2_2.dtb \
- armv8_gem5_v1_big_little_2_4.dtb \
- armv8_gem5_v2_1cpu.dtb \
- armv8_gem5_v2_2cpu.dtb \
- armv8_gem5_v2_4cpu.dtb \
- armv8_gem5_v2_8cpu.dtb \
- armv8_gem5_v2_16cpu.dtb
+ armv8_gem5_v1_big_little_2_4.dtb
VEXPRESS_GEM5_V1_DTSIS=\
platforms/vexpress_gem5_v1.dtsi \