kernel: bump 4.4 to 4.4.108
[openwrt/openwrt.git] / include / image.mk
index fc6bf06e96be11170fbba18ed1c3f2c5610f93a9..605cb066729324f9dd5d165857544d6a6757d2ab 100644 (file)
@@ -136,7 +136,7 @@ endef
 
 define Image/BuildKernel/MkuImage
        mkimage -A $(ARCH) -O linux -T kernel -C $(1) -a $(2) -e $(3) \
-               -n '$(call toupper,$(ARCH)) LEDE Linux-$(LINUX_VERSION)' -d $(4) $(5)
+               -n '$(call toupper,$(ARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $(4) $(5)
 endef
 
 define Image/BuildKernel/MkFIT
@@ -435,7 +435,27 @@ define Device/Build/compile
 
 endef
 
+ifndef IB
+define Device/Build/dtb
+  ifndef BUILD_DTS_$(1)
+  BUILD_DTS_$(1) := 1
+  $(KDIR)/image-$(1).dtb: FORCE
+       $(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@)
+
+  image_prepare: $(KDIR)/image-$(1).dtb
+  endif
+
+endef
+endif
+
 define Device/Build/kernel
+  $$(eval $$(foreach dts,$$(DEVICE_DTS), \
+       $$(call Device/Build/dtb,$$(notdir $$(dts)), \
+               $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
+               $$(dts) \
+       ) \
+  ))
+
   $(KDIR)/$$(KERNEL_NAME):: image_prepare
   $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
   $(call Device/Export,$$(KDIR_KERNEL_IMAGE),$(1))