From f320cba1dfcc31b12ed5346c4d773888b18e0f43 Mon Sep 17 00:00:00 2001 From: Chun-Chen TK Hsu Date: Fri, 9 Aug 2019 18:54:04 +0800 Subject: [PATCH] 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19989 Tested-by: kokoro Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg --- system/arm/dt/Makefile | 27 +++++++++++---------------- 1 file 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 \ -- 2.30.2