aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/image
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-08-06 12:31:25 +0000
committerJohn Crispin <blogic@openwrt.org>2013-08-06 12:31:25 +0000
commitc1fe405c08124ea0089e24b4314d57f0d616fa37 (patch)
tree6be5186647b4beda5bd2999adff0e9e3ecc7a799 /target/linux/lantiq/image
parentbe05585b0c67bdf1119832ac0cfc6b93a62167e8 (diff)
downloadmaster-187ad058-c1fe405c08124ea0089e24b4314d57f0d616fa37.tar.gz
master-187ad058-c1fe405c08124ea0089e24b4314d57f0d616fa37.tar.bz2
master-187ad058-c1fe405c08124ea0089e24b4314d57f0d616fa37.zip
lantiq: add support for tplink images to .../image/Makefile
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37722 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/image')
-rw-r--r--target/linux/lantiq/image/Makefile21
1 files changed, 19 insertions, 2 deletions
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index 5e97337f52..0dbdb83854 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -49,6 +49,11 @@ define MkImageLzma
-d $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/uImage-$(1)$(2)
endef
+define TPLinkImageLzma
+ mktplinkfw -c -B $(2) -W 2 -F 8Mltq -s \
+ -k $(KDIR)/vmlinux$(3)-$(1).lzma -o $(KDIR)/uImage-$(1)$(3)
+endef
+
define MkImageEVA
lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux-$(1).lzma $(KDIR)/$(1).eva.prealign
dd if=$(KDIR)/$(1).eva.prealign of=$(KDIR)/$(1).eva bs=64k conv=sync
@@ -131,6 +136,18 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
endif
endef
+define Image/BuildKernelTPLink/Template
+ $(call PatchKernelLzma,$(1))
+ $(call TPLinkImageLzma,$(1),$(2))
+ $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(call PatchKernelLzma,$(1),-initramfs)
+ $(call Image/BuildLoader/Template,$(1),-initramfs)
+ $(CP) $(KDIR)/loader-initramfs-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs-loader
+ $(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs
+endif
+endef
+
define Image/BuildKernelEVA/Template
$(call PatchKernelLzma,$(1))
$(call MkImageEVA,$(1))
@@ -246,8 +263,8 @@ Image/Build/Profile/FRITZ3370=$(call Image/BuildNANDEVA/$(1),$(1),FRITZ3370)
Image/BuildKernel/Profile/VG3503J=$(call Image/BuildKernelLoader/Template,VG3503J)
Image/Build/Profile/VG3503J=$(call Image/BuildLoader/$(1),$(1),VG3503J)
-Image/BuildKernel/Profile/TDW8970=$(call Image/BuildKernelLoader/Template,TDW8970,$(1))
-Image/Build/Profile/TDW8970=$(call Image/BuildLoader/$(1),$(1),TDW8970)
+Image/BuildKernel/Profile/TDW8970=$(call Image/BuildKernelTPLink/Template,TDW8970,TD-W8970v1,$(1))
+Image/Build/Profile/TDW8970=$(call Image/Build/$(1),$(1),TDW8970)
endif