2011-10-15 05:48:21 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) 2011 The Chromium OS Authors.
|
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2011-10-15 05:48:21 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is
|
|
|
|
# enabled. See doc/README.fdt-control for more details.
|
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
|
|
|
|
ifeq ($(DEVICE_TREE),)
|
|
|
|
DEVICE_TREE := notfound
|
|
|
|
endif
|
2013-07-24 17:09:19 +00:00
|
|
|
|
2014-02-05 02:28:26 +00:00
|
|
|
DTS := $(srctree)/arch/$(ARCH)/dts/$(DEVICE_TREE).dts
|
2013-07-24 17:09:19 +00:00
|
|
|
|
2014-02-05 02:28:26 +00:00
|
|
|
DTC_FLAGS += -R 4 -p 0x1000
|
2011-10-15 05:48:21 +00:00
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
$(obj)/dt.dtb: $(DTS) FORCE
|
|
|
|
$(call if_changed_dep,dtc)
|
2011-10-15 05:48:21 +00:00
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
targets += dt.dtb
|
2011-10-15 05:48:21 +00:00
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
$(DTS):
|
|
|
|
@echo >&2
|
|
|
|
@echo >&2 "Device Tree Source is not specified."
|
|
|
|
@echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'"
|
|
|
|
@echo >&2 "or build with 'DEVICE_TREE=<dts-file-name>' argument"
|
|
|
|
@/bin/false
|
2011-10-15 05:48:21 +00:00
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
.SECONDARY: $(obj)/dt.dtb.S
|
2011-10-15 05:48:21 +00:00
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
obj-$(CONFIG_OF_EMBED) := dt.dtb.o
|
2011-10-15 05:48:21 +00:00
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
dtbs: $(obj)/dt.dtb
|
|
|
|
@:
|
2011-10-15 05:48:21 +00:00
|
|
|
|
2014-02-05 02:28:25 +00:00
|
|
|
clean-files := dt.dtb.S
|