build: move elecom-wrc-gs-factory to image-commands.mk
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Fri, 23 Apr 2021 09:36:15 +0000 (18:36 +0900)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 30 Oct 2021 20:05:25 +0000 (22:05 +0200)
ELECOM WRC-X3200GST3 uses the same header/footer as WRC-GS/GST devices
in ramips/mt7621 subtarget, so move "Build/elecom-wrc-gs-factory" to
image-commands.mk to use from mediatek/mt7622 subtarget.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
include/image-commands.mk
target/linux/ramips/image/mt7621.mk

index 1c9e8c12bb5fa8d9c073230c775e440524dc1f81..91865e1e7eb1c09b1b1b2bcbfc262f5571f1e144 100644 (file)
@@ -187,6 +187,19 @@ define Build/elecom-product-header
        mv $(fw).new $(fw)
 endef
 
+define Build/elecom-wrc-gs-factory
+       $(eval product=$(word 1,$(1)))
+       $(eval version=$(word 2,$(1)))
+       $(eval hash_opt=$(word 3,$(1)))
+       $(MKHASH) md5 $(hash_opt) $@ >> $@
+       ( \
+               echo -n "ELECOM $(product) v$(version)" | \
+                       dd bs=32 count=1 conv=sync; \
+               dd if=$@; \
+       ) > $@.new
+       mv $@.new $@
+endef
+
 define Build/elx-header
        $(eval hw_id=$(word 1,$(1)))
        $(eval xor_pattern=$(word 2,$(1)))
index c81e79c900a1d31bead408f990e4b1a2f6958fd7..a0236234d19371a79904b31d5df5857a10b77e75 100644 (file)
@@ -9,19 +9,6 @@ DEFAULT_SOC := mt7621
 KERNEL_DTB += -d21
 DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME
 
-define Build/elecom-wrc-gs-factory
-       $(eval product=$(word 1,$(1)))
-       $(eval version=$(word 2,$(1)))
-       $(eval hash_opt=$(word 3,$(1)))
-       $(MKHASH) md5 $(hash_opt) $@ >> $@
-       ( \
-               echo -n "ELECOM $(product) v$(version)" | \
-                       dd bs=32 count=1 conv=sync; \
-               dd if=$@; \
-       ) > $@.new
-       mv $@.new $@
-endef
-
 define Build/gemtek-trailer
        printf "%s%08X" ".GEMTEK." "$$(cksum $@ | cut -d ' ' -f1)" >> $@
 endef