Enable device tree support on dockstar, goflexnet, ib62x0,
iconnect and nsa310 boards. The device tree is appended to
in uImage so there is no need to load it separately.

Signed-off-by: Wojciech Dubowik <wojciech.dubo...@neratec.com>
---
 target/linux/kirkwood/Makefile       |  4 ++--
 target/linux/kirkwood/image/Makefile | 22 +++++++++++++++++++++-
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile
index f0dda5a..1d5495a 100644
--- a/target/linux/kirkwood/Makefile
+++ b/target/linux/kirkwood/Makefile
@@ -12,11 +12,11 @@ BOARDNAME:=Marvell Kirkwood
 FEATURES:=targz usb jffs2_nand
 MAINTAINER:=Imre Kaloz <ka...@openwrt.org>
 
-LINUX_VERSION:=3.3.8
+LINUX_VERSION:=3.10.12
 
 include $(INCLUDE_DIR)/target.mk
 
-KERNELNAME:="uImage"
+KERNELNAME:="uImage zImage dtbs"
 
 DEFAULT_PACKAGES +=
 
diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index 7be27e6..7c53ef0 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -7,11 +7,31 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+TARGET_DTBS := kirkwood-dockstar kirkwood-goflexnet kirkwood-ib62x0 \
+               kirkwood-iconnect kirkwood-nsa310
 NAND_BLOCKSIZE := 2048:128k
 
+LOADADDR:=0x00008000
+UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
+
+define Image/Build/MkuImage
+       mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e $(LOADADDR) 
\
+       -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' -d $(1) $(2);
+endef
+
+define Image/Build/DTB
+       cp $(KDIR)/zImage$(2) $(KDIR)/zImage$(2)-$(1);
+       cat $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(1).dtb >> 
$(KDIR)/zImage$(2)-$(1);
+       $(call 
Image/Build/MkuImage,$(KDIR)/zImage$(2)-$(1),$(KDIR)/uImage$(2)-$(1))
+       cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
+endef
+
 define Image/BuildKernel
-# do mach-id fixup here, if needed
        cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
+       $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb)))
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+       $(call Image/Build/Initramfs)
+endif
 endef
 
 define Image/Build
-- 
1.8.1.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to