diff options
author | Simon Glass <sjg@chromium.org> | 2011-06-21 08:48:56 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:34 -0700 |
commit | ea1e225fb9a6a0dbd5a810a1de711e308bc4b175 (patch) | |
tree | fd243feeb7f82456470ca7a190faec7529aeefe7 /dts | |
parent | d82bf0abd79b65282349663f45e2f602cd70dd52 (diff) |
fdt: Add DEV_TREE_SEPARATE to provide an fdt separate from image
This adds support for an FDT to be concatenated to the u-boot-bin binary.
This is located at run-time by U-Boot.
BUG=chromium-os:11623
TEST=Either emerge with http://gerrit.chromium.org/gerrit/2961
or build manually:
make ... DEV_TREE_SEPARATE=true
and check that u-boot.dtb is built.
Change-Id: I7c8b1315d721bc957ef3fd07f167d86345868036
Reviewed-on: http://gerrit.chromium.org/gerrit/2962
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'dts')
-rw-r--r-- | dts/Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/dts/Makefile b/dts/Makefile index b885077f6a6..8863c041236 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -24,6 +24,9 @@ include $(TOPDIR)/config.mk LIB = $(obj)libdts.o +# We use DEV_TREE_SRC as the name of the device tree, if defined +# If not, we use CONFIG_DEFAULT_DEVICE_TREE + ifeq ($(DEV_TREE_SRC),) $(if $(CONFIG_DEFAULT_DEVICE_TREE),,\ $(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header \ @@ -38,9 +41,11 @@ endif # the filename. DT_BIN := $(obj)dt.dtb -# TODO: get arch properly for objcopy line. -$(obj)dt.o: $(TOPDIR)/board/$(BOARDDIR)/$(DEVICE_TREE).dts +$(DT_BIN): $(TOPDIR)/board/$(BOARDDIR)/$(DEVICE_TREE).dts $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $< + +# TODO: get arch properly for objcopy line. +$(obj)dt.o: $(DT_BIN) cd $(dir ${DT_BIN}) && \ $(OBJCOPY) -B armv5te -I binary -O elf32-littlearm \ $(notdir ${DT_BIN}) $@ @@ -54,7 +59,9 @@ OBJS := $(addprefix $(obj),$(OBJS)) all: $(obj).depend $(LIB) -$(LIB): $(OBJS) +binary: $(DT_BIN) + +$(LIB): $(OBJS) $(DTB) $(call cmd_link_o_target, $(OBJS)) clean: |