summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/image/Makefile
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-12-05 14:52:36 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-12-05 14:52:36 +0000
commit4dc9092f4bdc11cf233e7ef9714324db7f9adc66 (patch)
tree3340c2084122459c771470438c399d0d759f4a07 /target/linux/ar71xx/image/Makefile
parent3e7a6d182afe723381cbe047b1823912897ea6d0 (diff)
downloadmtk-20170518-4dc9092f4bdc11cf233e7ef9714324db7f9adc66.zip
mtk-20170518-4dc9092f4bdc11cf233e7ef9714324db7f9adc66.tar.gz
mtk-20170518-4dc9092f4bdc11cf233e7ef9714324db7f9adc66.tar.bz2
ar71xx: reclaim some unused space on TP-Link boards
With the default OpenWrt configuration, this increases the size of the rootfs_data partition by 384KB/128KB on the older/newer TP-Link models. SVN-Revision: 29447
Diffstat (limited to 'target/linux/ar71xx/image/Makefile')
-rw-r--r--target/linux/ar71xx/image/Makefile35
1 files changed, 31 insertions, 4 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index a4ed024..f624926 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -298,7 +298,7 @@ define Image/Build/Planex
fi
endef
-define Image/Build/TPLINK
+define Image/Build/TPLINKOLD
$(call Image/BuildLoaderAlone,$(2),gz,$(3),0x22000,0)
$(call MkuImageOKLI,$(2))
( \
@@ -317,6 +317,33 @@ define Image/Build/TPLINK
-o $(call sysupname,$(1),$(2))
endef
+define Image/Build/TPLINKOLD/initramfs
+ $(call Image/BuildLoader,$(2),gz,$(3),0x80060000)
+ -$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
+ -B $(4) -N OpenWrt -V $(REVISION) -s \
+ -k $(KDIR)/loader-$(2).gz \
+ -o $(call imgname,$(1),$(2))-uImage.bin
+endef
+
+define Image/Build/TPLINK
+ $(call Image/BuildLoaderAlone,$(2),gz,$(3),0x22000,0)
+ $(call MkuImageOKLI,$(2))
+ ( \
+ dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
+ dd if=$(KDIR)/vmlinux-$(2).okli conv=sync; \
+ ) > $(KDIR)/kernel-$(2).bin
+ -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ -B $(4) -N OpenWrt -V $(REVISION)\
+ -k $(KDIR)/kernel-$(2).bin \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
+ -o $(call factoryname,$(1),$(2))
+ -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ -B $(4) -N OpenWrt -V $(REVISION) -s \
+ -k $(KDIR)/kernel-$(2).bin \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
+ -o $(call sysupname,$(1),$(2))
+endef
+
define Image/Build/TPLINK/initramfs
$(call Image/BuildLoader,$(2),gz,$(3),0x80060000)
-$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
@@ -330,12 +357,12 @@ define Image/Build/TPLINK-LZMA
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION)\
-k $(KDIR)/vmlinux-$(2).bin.lzma \
- -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
-o $(call factoryname,$(1),$(2))
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION) -s \
-k $(KDIR)/vmlinux-$(2).bin.lzma \
- -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) -a 0x10000 \
-o $(call sysupname,$(1),$(2))
endef
@@ -745,7 +772,7 @@ endef
tlwr841nv15_cmdline=board=TL-WR841N-v1.5 console=ttyS0,115200
define Image/Build/Profile/TLWR841NV15
- $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr841n-v1.5,$(tlwr841nv15_cmdline),TL-WR841Nv1.5)
+ $(call Image/Build/Template/$(fs_squash)/$(1),TPLINKOLD,tl-wr841n-v1.5,$(tlwr841nv15_cmdline),TL-WR841Nv1.5)
endef
tlwr841ndv3_cmdline=board=TL-WR941ND console=ttyS0,115200