aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorINAGAKI Hiroshi <musashino.open@gmail.com>2020-12-17 23:58:16 +0900
committerPetr Štetiar <ynezz@true.cz>2020-12-22 19:11:50 +0100
commitfa373b219d3ee3851dd942668e080fac5f867b0b (patch)
tree534e0f790584931e4284c51a4442783a7af1c4bb /target/linux/ramips
parentfdcdbdfdef512e0fdd719a704cff827a0633f5dc (diff)
downloadupstream-fa373b219d3ee3851dd942668e080fac5f867b0b.tar.gz
upstream-fa373b219d3ee3851dd942668e080fac5f867b0b.tar.bz2
upstream-fa373b219d3ee3851dd942668e080fac5f867b0b.zip
ramips: unify elecom-*-factory for ELECOM WRC-GHBK2-S/GS/GST devices
Most of Build/elecom-wrc-factory and Build/elecom-wrc-gs-factory are nearly equal, Unify those definitions by using "-N" option of mkhash and splitting the appending text at the end of firmware image for WRC-GS/GST devices. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/image/mt7621.mk21
1 files changed, 5 insertions, 16 deletions
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 282152e79d..cc0eb1d279 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -12,20 +12,8 @@ DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME
define Build/elecom-wrc-gs-factory
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
- ( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@
- ( \
- echo -n "ELECOM $(product) v$(version)" | \
- dd bs=32 count=1 conv=sync; \
- dd if=$@; \
- ) > $@.new
- mv $@.new $@
- echo -n "MT7621_ELECOM_$(product)" >> $@
-endef
-
-define Build/elecom-wrc-factory
- $(eval product=$(word 1,$(1)))
- $(eval version=$(word 2,$(1)))
- $(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@
+ $(eval hash_opt=$(word 3,$(1)))
+ $(STAGING_DIR_HOST)/bin/mkhash md5 $(hash_opt) $@ >> $@
( \
echo -n "ELECOM $(product) v$(version)" | \
dd bs=32 count=1 conv=sync; \
@@ -400,7 +388,7 @@ define Device/elecom_wrc-1167ghbk2-s
DEVICE_MODEL := WRC-1167GHBK2-S
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
- elecom-wrc-factory WRC-1167GHBK2-S 0.00
+ elecom-wrc-gs-factory WRC-1167GHBK2-S 0.00
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef
TARGET_DEVICES += elecom_wrc-1167ghbk2-s
@@ -411,7 +399,8 @@ define Device/elecom_wrc-gs
DEVICE_VENDOR := ELECOM
IMAGES += factory.bin
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
- elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00
+ elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 -N | \
+ append-string MT7621_ELECOM_$$$$(ELECOM_HWNAME)
DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
endef