arm: Ship Linux device trees with gem5
Review Request #3248 - Created Dec. 8, 2015 and submitted
Changeset 11243:68bbd5bbe86f --------------------------- arm: Ship Linux device trees with gem5 Ship aarch32 and aarch64 device trees with gem5. We currently ship device trees as a part of the gem5 Linux kernel repository. This makes tracking hard since device trees are supposed to be platform dependent rather than kernel dependent (Linux considers device trees to be a stable kernel ABI). It also makes code sharing between aarch32 and aarch64 impossible. This changeset implements a set of device trees for the new VExpress_GEM5_V1 platform. The platform is described in a shared file that is separate from the memory/CPU description. Due to differences in how secondary CPUs are initialized, aarch32 and aarch64 use different base files describing CPU nodes and the machine's compatibility property.
There are systems when you actually want to keep the pre-processed .dts files around; e.g. not supporting the boot loader bits I can compile the DT into the kernel from the DTS files.
Add -P to the CPP flags to remove all the #cpp_left_behind lines.
I ended up using this today (sure not the most elegant solution):
--- Makefile.orig 2016-02-15 22:11:03.036374000 +0000
+++ Makefile 2016-02-15 14:56:23.160107000 +0000
@@ -40,7 +40,7 @@ TARGETS=\
GEN_DTS=mkdir -p .gen; \
- $(CPP) -x assembler-with-cpp \
+ $(CPP) -x assembler-with-cpp -P \
@@ -50,9 +50,11 @@ all: $(TARGETS)
.gen/armv7_gem5_v1_%cpu.dts: armv7.dts platforms/vexpress_gem5_v1.dtsi
+ cp -p $@ .
.gen/armv8_gem5_v1_%cpu.dts: armv8.dts platforms/vexpress_gem5_v1.dtsi
+ cp -p $@ .
$(DTC) -I dts -O dtb -o $@ $<
@@ -60,4 +62,4 @@ all: $(TARGETS)
$(RM) -r .gen
- $(RM) .dtb
+ $(RM) .dtb armv?gem5_v1*.dts