Chun-Chen TK Hsu has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/19989 )

Change subject: dt: Refactor makefile to create targets with functions
......................................................................

dt: 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 <chunchen...@google.com>
---
M system/arm/dt/Makefile
1 file changed, 11 insertions(+), 16 deletions(-)



diff --git a/system/arm/dt/Makefile b/system/arm/dt/Makefile
index 626ff08..c472a0e 100644
--- a/system/arm/dt/Makefile
+++ b/system/arm/dt/Makefile
@@ -31,24 +31,19 @@

 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 \

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/19989
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3b7d67a554f5d27714ace6b88c9784ddaa3b34d5
Gerrit-Change-Number: 19989
Gerrit-PatchSet: 1
Gerrit-Owner: Chun-Chen TK Hsu <chunchen...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to