From 714a5621c2df0b1cfce525b9add071fc9bfd726b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 26 Feb 2014 15:59:14 -0700 Subject: sandbox: Build a device tree file for sandbox Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE option to make it easier to use device tree with sandbox. This adjusts the Makefile to build a u-boot.dtb file which can be passed to sandbox U-Boot with: ./u-boot -d u-boot.dtb Signed-off-by: Simon Glass --- arch/sandbox/dts/Makefile | 11 +++++++++++ arch/sandbox/dts/sandbox.dts | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 arch/sandbox/dts/Makefile create mode 100644 arch/sandbox/dts/sandbox.dts (limited to 'arch/sandbox/dts') diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile new file mode 100644 index 0000000000..a4c980b235 --- /dev/null +++ b/arch/sandbox/dts/Makefile @@ -0,0 +1,11 @@ +dtb-$(CONFIG_SANDBOX) += sandbox.dtb + +targets += $(dtb-y) + +DTC_FLAGS += -R 4 -p 0x1000 + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts new file mode 100644 index 0000000000..96a4438073 --- /dev/null +++ b/arch/sandbox/dts/sandbox.dts @@ -0,0 +1,20 @@ +/dts-v1/; + +/ { + triangle { + compatible = "demo-shape"; + colour = "cyan"; + sides = <3>; + character = <83>; + }; + square { + compatible = "demo-shape"; + colour = "blue"; + sides = <4>; + }; + hexagon { + compatible = "demo-simple"; + colour = "white"; + sides = <6>; + }; +}; -- cgit v1.2.1