aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/image/Makefile
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-03-29 18:15:38 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-03-29 18:15:38 +0000
commitf3524e5d5c92d604f7a525870b2017a150d2160a (patch)
treee902be7be3590a16e7273dc73513ec0c6119ccd8 /target/linux/brcm47xx/image/Makefile
parent173da5bde24719c959e9f09049573cc21a1c98d5 (diff)
downloadmaster-187ad058-f3524e5d5c92d604f7a525870b2017a150d2160a.tar.gz
master-187ad058-f3524e5d5c92d604f7a525870b2017a150d2160a.tar.bz2
master-187ad058-f3524e5d5c92d604f7a525870b2017a150d2160a.zip
brcm47xx: convert Linksys E1200 V2 to the new image building system
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45143 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/image/Makefile')
-rw-r--r--target/linux/brcm47xx/image/Makefile47
1 files changed, 46 insertions, 1 deletions
diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile
index 3291591996..386f42c333 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -105,6 +105,42 @@ define Image/Build/trxV2
endef
#################################################
+# Images
+#################################################
+
+define Build/trx-with-loader
+ $(STAGING_DIR_HOST)/bin/trx \
+ -o $@ \
+ -f $(KDIR)/loader.gz \
+ -f $(word 1,$^) \
+ $(call trxalign/$(lastword $(subst ., ,$(word 2,$^))),$(lastword $(subst ., ,$(word 2,$^))))
+endef
+
+define Build/linksys-bin
+ $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(DEVICE_ID) -v v$(VERSION) -i $@ -o $@.new
+ mv $@.new $@
+endef
+
+#################################################
+# Devices
+#################################################
+
+DEVICE_VARS += DEVICE_ID VERSION
+
+define Device/Default
+ IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)
+ KERNEL_IMAGE = vmlinux.lzma
+ FILESYSTEMS := $(FS_64K)
+ IMAGES := trx
+ IMAGE/bin := trx-with-loader
+endef
+
+define Device/linksys
+ IMAGES := bin
+ IMAGE/bin := trx-with-loader | linksys-bin
+endef
+
+#################################################
# Subtarget generic
#################################################
@@ -201,7 +237,6 @@ define Image/Build/mips74k/devices-with-64k-blocks
$(call Image/Build/CyberTAN,$(1),e900_v1,E900,1.0.4,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e1000_v1_v2,E100,1.1.2,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e1200_v1,E120,1.0.3,$(patsubst jffs2-%,jffs2,$(1)))
- $(call Image/Build/CyberTAN,$(1),e1200_v2,E122,1.0.4,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e1500_v1,E150,1.0.5,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e1550_v1,1550,1.0.3,$(patsubst jffs2-%,jffs2,$(1)))
$(call Image/Build/CyberTAN,$(1),e2000_v1,32XN,1.0.4,$(patsubst jffs2-%,jffs2,$(1)))
@@ -226,6 +261,16 @@ define Image/Build/mips74k/squashfs
$(call Image/Build/mips74k/devices-with-128k-blocks,$(1))
endef
+define Device/linksys-e1200-v2
+ $(Device/linksys)
+ DEVICE_ID := E122
+ VERSION := 1.0.4
+endef
+
+ifeq ($(SUBTARGET),mips74k)
+ TARGET_DEVICES += linksys-e1200-v2
+endif
+
#################################################
# Shared BuildImage defines
#################################################