Use kernel arch for dts compilation.
Also use Image/BuildDTB to build dts for ramips.
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
SVN-Revision: 47823
KDIR=$(KERNEL_BUILD_DIR)
KDIR_TMP=$(KDIR)/tmp
-DTS_DIR:=$(LINUX_DIR)/arch/$(ARCH)/boot/dts/
+DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
IMG_PREFIX:=openwrt-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
# $(4) extra DTC flags
define Image/BuildDTB
$(CPP) -nostdinc -x assembler-with-cpp \
- -I$(LINUX_DIR)/arch/$(ARCH)/boot/dts \
- -I$(LINUX_DIR)/arch/$(ARCH)/boot/dts/include \
+ -I$(DTS_DIR) \
+ -I$(DTS_DIR)/include \
-undef -D__DTS__ $(3) \
-o $(2).tmp $(1)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
endef
define Build/patch-dtb
- $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $@.dtb ../dts/$(DTS).dts
+ $(call Image/BuildDTB,../dts/$(DTS).dts,$@.dtb)
$(STAGING_DIR_HOST)/bin/patch-dtb $@ $@.dtb
endef