summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--arch/sandbox/config.mk2
-rw-r--r--arch/sandbox/dts/Makefile11
-rw-r--r--arch/sandbox/dts/sandbox.dts20
-rw-r--r--include/configs/sandbox.h1
5 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 25af43b..9374108 100644
--- a/Makefile
+++ b/Makefile
@@ -708,6 +708,7 @@ ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin
ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img
ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin
+ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
ifneq ($(CONFIG_SPL_TARGET),)
ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
endif
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 23b057e..668aa71 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -11,3 +11,5 @@ __HAVE_ARCH_GENERIC_BOARD := y
cmd_u-boot__ = $(CC) -o $@ -T u-boot.lds \
-Wl,--start-group $(u-boot-main) -Wl,--end-group \
$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
+
+CONFIG_ARCH_DEVICE_TREE := sandbox
diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile
new file mode 100644
index 0000000..a4c980b
--- /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 0000000..96a4438
--- /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>;
+ };
+};
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index e77d06b..fbb9791 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -32,6 +32,7 @@
#define CONFIG_FIT_SIGNATURE
#define CONFIG_RSA
#define CONFIG_CMD_FDT
+#define CONFIG_DEFAULT_DEVICE_TREE sandbox
#define CONFIG_FS_FAT
#define CONFIG_FS_EXT4