ODROID-COMMON: dts, kbuild: Implement support for dtb vendor subdirs

This patch adds support of vendor sub directories for dtb files.
Subdirectories can be specified in $(dts-dirs). Kbuild traverses over
all directories while building and installing dtb files. The directory
tree is also reflected in the install path.

Change-Id: Iab8d4cf4b76f7122892e87137fd0ec60565e1db0
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
Robert Richter
2014-09-03 16:17:02 +02:00
committed by Dongjin Kim
parent e7a987818a
commit 73749eab8d
4 changed files with 21 additions and 64 deletions

View File

@@ -148,15 +148,19 @@ amlogic/%.dtb: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
%.dtb: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts/amlogic $(boot)/dts/amlogic/$@
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
ifeq ($(CONFIG_AMLOGIC_MODIFY),y)
%.dtbo: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts/amlogic $(boot)/dts/amlogic/$@
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
endif
PHONY += dtbs dtbs_install
dtbs dtbs_install: prepare scripts
$(Q)$(MAKE) $(build)=$(boot)/dts $@
dtbs: prepare scripts
$(Q)$(MAKE) $(build)=$(boot)/dts
dtbs_install: prepare scripts
$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
Image-dtb Image.gz-dtb: vmlinux scripts dtbs
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

View File

@@ -1,47 +1 @@
dts-dirs += al
dts-dirs += altera
dts-dirs += amd
dts-dirs += amlogic
dts-dirs += apm
dts-dirs += arm
dts-dirs += broadcom
dts-dirs += cavium
dts-dirs += exynos
dts-dirs += freescale
dts-dirs += hisilicon
dts-dirs += marvell
dts-dirs += mediatek
dts-dirs += nvidia
dts-dirs += qcom
dts-dirs += renesas
dts-dirs += rockchip
dts-dirs += socionext
dts-dirs += sprd
dts-dirs += xilinx
dts-dirs += lg
dts-dirs += zte
subdir-y := $(dts-dirs)
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
always := $(dtb-y)
targets += dtbs dtbs_install
targets += $(dtb-y)
DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES))
ifneq ($(DTB_NAMES),)
DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
else
DTB_LIST := $(dtb-y)
endif
targets += $(DTB_LIST)
dtbs: $(addprefix $(obj)/, $(DTB_LIST))
clean-files := dts/*.dtb *.dtb
dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
subdir-y += amlogic

View File

@@ -1,14 +1,11 @@
dtb-y += g12a_s905d2_skt.dtb
dtb-y += g12a_s905d2_skt_buildroot.dtb
dtb-y += g12a_s905d2_u200.dtb
dtb-y += g12a_s905d2_u200_buildroot.dtb
dtb-y += g12a_s905d2_u200_drm_buildroot.dtb
dtb-y += g12a_s905d2_u220.dtb
dtb-y += s905d2_odroidc3.dtb
targets += dtbs
DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES))
ifneq ($(DTB_NAMES),)
DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
else
DTB_LIST := $(dtb-y)
endif
targets += $(DTB_LIST)
dtbs: $(addprefix $(obj)/, $(DTB_LIST))
clean-files := *.dtb
always := $(dtb-y)
subdir-y := $(dts-dirs)
clean-files := *.dtb

View File

@@ -23,6 +23,8 @@ include $(src)/Makefile
PHONY += __dtbs_install_prep
__dtbs_install_prep:
ifeq ("$(dtbinst-root)", "$(obj)")
$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
$(Q)mkdir -p $(INSTALL_DTBS_PATH)
endif