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 <sjg@chromium.org>master
parent
1ace402239
commit
714a5621c2
@ -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
|
@ -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>; |
||||||
|
}; |
||||||
|
}; |
Loading…
Reference in new issue