diff options
Diffstat (limited to 'dts')
-rw-r--r-- | dts/Makefile | 60 | ||||
-rw-r--r-- | dts/README | 39 |
2 files changed, 99 insertions, 0 deletions
diff --git a/dts/Makefile b/dts/Makefile new file mode 100644 index 00000000000..986a6b3ee30 --- /dev/null +++ b/dts/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (c) 2011 The Chromium OS Authors. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundatio; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)libdts.o + +# Use a constant name for this so we can access it from C code. +# objcopy doesn't seem to allow us to set the symbol name independently of +# the filename. +DT_BIN := dt.dtb + +# TODO: get arch properly for objcopy line. +dt.o: $(TOPDIR)/board/$(BOARDDIR)/$(DEVICE_TREE).dts + $(DTC) -R 4 -p 0x1000 -O dtb -o $(DT_BIN) $< + $(OBJCOPY) -B armv5te -I binary -O elf32-littlearm $(DT_BIN) dt.o + rm $(DT_BIN) + +OBJS := dt.o + +OBJS := $(addprefix $(obj),$(OBJS)) + +all: $(obj).depend $(LIB) + +$(LIB): $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) $(LIB) + rm -f $(DT_BIN) + +distclean: clean + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/dts/README b/dts/README new file mode 100644 index 00000000000..ad939b9e669 --- /dev/null +++ b/dts/README @@ -0,0 +1,39 @@ +# +# Copyright (c) 2011 The Chromium OS Authors. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundatio; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +Emebdded Device Tree Support in U-Boot +====================================== + +This directory contains a Makefile for building the device tree blob and +embedding it in your U-Boot image. This is useful since it allows U-Boot to +configure itself according to what it finds there. If you have a number of +similar boards with different peripherals, you can describe the features of +each board in the device tree file, and have a single generic source base. + +Put your device tree file in board/<vendor>/dts/<soc>_<board>.dts. It will be +picked up and built into the image. + + +To do +===== +- Provide a way for U-Boot to find a device tree somewhere in memory on startup, +similar to how the environment works. |