#
define Build/tplink-header
- $(STAGING_DIR_HOST)/bin/mktplinkfw2 -V "ver. 2.0" -B $(1) \
+ $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -B $(1) \
-o $@.new -k $@ && mv $@.new $@
endef
-define Build/pad-ex2700
- cat ex2700-fakeroot.uImage >> $@; cat ex2700-fakeroot.uImage >> $@;
- dd if=$@ of=$@.new bs=64k conv=sync && truncate -s 128 $@.new && mv $@.new $@
-endef
-
-define Build/append-ex2700
- cat ex2700-fakeroot.uImage >> $@
+define Build/pad-kernel-ex2700
+ cp $@ $@.tmp && dd if=/dev/zero bs=64 count=1 >> $@.tmp \
+ && dd if=$@.tmp of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \
+ && cat ex2700-fakeroot.uImage >> $@.new && rm $@.tmp && mv $@.new $@
endef
define Build/netgear-header
- $(STAGING_DIR_HOST)/bin/mkdniimg \
- $(1) -v OpenWrt -i $@ \
- -o $@.new && mv $@.new $@
+ $(STAGING_DIR_HOST)/bin/mkdniimg \
+ $(1) -v OpenWrt -i $@ \
+ -o $@.new && mv $@.new $@
endef
define Build/poray-header
endef
define Build/umedia-header
- fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@
+ fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@
endef
define Build/elecom-header
define Device/ArcherC20i
DTS := ArcherC20i
- IMAGES += factory.bin
KERNEL := $(KERNEL_DTB)
KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j -r $(KDIR)/root.squashfs
DTS := EX2700
IMAGE_SIZE := $(ex2700_mtd_size)
IMAGES += factory.bin
- KERNEL := $(KERNEL_DTB) | pad-ex2700 | uImage lzma | append-ex2700
+ KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
DEVICE_TITLE := Netgear EX2700
endef
DTS := WT3020-8M
IMAGE_SIZE := $(ralink_default_fw_size_8M)
IMAGES += factory.bin
- IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 4M
+ IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 8M
DEVICE_TITLE := Nexx WT3020 (8MB)
endef
TARGET_DEVICES += wt3020-8M