[OpenWrt-Devel] [PATCH 4/7] kirkwood: generate factory images for Linksys EA[34]500

Claudio Leite leitec at staticky.com
Fri Nov 6 21:29:11 EST 2015


This is done with the new image generation system. It also
generates a sysupgrade.tar image.

These images only support squashfs-on-UBI in their present form.

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 target/linux/kirkwood/image/Makefile | 45 +++++++++++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 6 deletions(-)

diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 0aa75ff..6f15724 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -10,6 +10,45 @@ NAND_BLOCKSIZE := 2048-128k
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+DEVICE_VARS += DEVICE_DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE
+KERNEL_LOADADDR:=0x8000
+TARGET_DEVICES = ea3500 ea4500
+
+define Device/Default
+  KERNEL := kernel-bin | append-dtb | uImage none
+  KERNEL_NAME := zImage
+endef
+
+define Device/ea3500
+  DEVICE_DTS := kirkwood-ea3500
+  PAGESIZE := 512
+  SUBPAGESIZE := 256
+  BLOCKSIZE := 16KiB
+  KERNEL_SIZE := 2624k
+  FILESYSTEMS := squashfs
+  PROFILES := EA3500
+  IMAGES := factory.bin sysupgrade.tar
+  IMAGE/factory.bin := append-kernel $$$$(KERNEL_SIZE) | append-ubi
+  IMAGE/sysupgrade.tar := sysupgrade-nand
+endef
+
+define Device/ea4500
+  DEVICE_DTS := kirkwood-ea4500
+  PAGESIZE := 2048
+  SUBPAGESIZE := 512
+  BLOCKSIZE := 128KiB
+  KERNEL_SIZE := 2688k
+  FILESYSTEMS := squashfs
+  PROFILES := EA4500
+  IMAGES := factory.bin sysupgrade.tar
+  IMAGE/factory.bin := append-kernel $$$$(KERNEL_SIZE) | append-ubi
+  IMAGE/sysupgrade.tar := sysupgrade-nand
+endef
+
+define Build/append-dtb
+	cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@
+endef
+
 define Image/BuildKernel/Template
 
 	$(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
@@ -109,12 +148,6 @@ Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template)
 Image/BuildKernel/Template/DOCKSTAR=$(call Image/BuildKernel/Template,dockstar)
 Image/InstallKernel/Template/DOCKSTAR=$(call Image/InstallKernel/Template,dockstar)
 
-Image/BuildKernel/Template/EA3500=$(call Image/BuildKernel/Template,ea3500)
-Image/InstallKernel/Template/EA3500=$(call Image/InstallKernel/Template,ea3500)
-
-Image/BuildKernel/Template/EA4500=$(call Image/BuildKernel/Template,ea4500)
-Image/InstallKernel/Template/EA4500=$(call Image/InstallKernel/Template,ea4500)
-
 Image/BuildKernel/Template/GOFLEXHOME=$(call Image/BuildKernel/Template,goflexhome)
 Image/InstallKernel/Template/GOFLEXHOME=$(call Image/InstallKernel/Template,goflexhome)
 
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list