summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>2017-01-23 14:41:15 +0100
committerMathias Kresin <dev@kresin.me>2017-01-27 11:10:10 +0100
commitf93a121533e8b7840588e1881f199850a1100db3 (patch)
tree51c317550102b69dd2ca1c67da811c89096bb36e
parentaeba0fe466b5e850d0cf0697fc120070230d7831 (diff)
downloadmtk-20170518-f93a121533e8b7840588e1881f199850a1100db3.zip
mtk-20170518-f93a121533e8b7840588e1881f199850a1100db3.tar.gz
mtk-20170518-f93a121533e8b7840588e1881f199850a1100db3.tar.bz2
ramips: cleanup mt7620 Netgear image code
1. Reuse functions defined in `image-commands.mk` 2. Rename fakeroot image Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
-rw-r--r--target/linux/ramips/image/Makefile2
-rw-r--r--target/linux/ramips/image/mt7620.mk24
-rw-r--r--target/linux/ramips/image/netgear-fake-uImage-hdr.bin (renamed from target/linux/ramips/image/ex2700-fakeroot.uImage)bin64 -> 64 bytes
3 files changed, 9 insertions, 17 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 255aa8c..2952c5f 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -22,7 +22,7 @@ define Image/Build/Initramfs
$(call Image/Build/Profile/$(PROFILE),initramfs)
endef
-DEVICE_VARS += DTS IMAGE_SIZE
+DEVICE_VARS += DTS IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID
loadaddr-y := 0x80000000
loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index f4f072f..50eae2f 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -7,18 +7,6 @@ define Build/tplink-header
-o $@.new -k $@ -r $(IMAGE_ROOTFS) && mv $@.new $@
endef
-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 $@
-endef
-
define Build/elecom-header
cp $@ $(KDIR)/v_0.0.0.bin
( \
@@ -64,24 +52,28 @@ endef
TARGET_DEVICES += ArcherMR200
define Device/ex2700
+ NETGEAR_HW_ID := 29764623+4+0+32+2x2+0
+ NETGEAR_BOARD_ID := EX2700
DTS := EX2700
BLOCKSIZE := 4k
IMAGE_SIZE := $(ralink_default_fw_size_4M)
IMAGES += factory.bin
- KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
+ KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | append-file netgear-fake-uImage-hdr.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
- netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
+ netgear-dni
DEVICE_TITLE := Netgear EX2700
endef
TARGET_DEVICES += ex2700
define Device/wn3000rpv3
+ NETGEAR_HW_ID := 29764836+8+0+32+2x2+0
+ NETGEAR_BOARD_ID := WN3000RPv3
DTS := WN3000RPV3
BLOCKSIZE := 4k
IMAGES += factory.bin
- KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
+ KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | append-file netgear-fake-uImage-hdr.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
- netgear-header -B WN3000RPv3 -H 29764836+8+0+32+2x2+0
+ netgear-dni
DEVICE_TITLE := Netgear WN3000RPv3
endef
TARGET_DEVICES += wn3000rpv3
diff --git a/target/linux/ramips/image/ex2700-fakeroot.uImage b/target/linux/ramips/image/netgear-fake-uImage-hdr.bin
index 9a534b6..9a534b6 100644
--- a/target/linux/ramips/image/ex2700-fakeroot.uImage
+++ b/target/linux/ramips/image/netgear-fake-uImage-hdr.bin
Binary files differ