Skip to content

Commit

Permalink
build: move elecom-wrc-gs-factory to image-commands.mk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
musashino205 authored and adschm committed Oct 30, 2021
1 parent 1b18195 commit 1b81497
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
13 changes: 13 additions & 0 deletions include/image-commands.mk
Expand Up @@ -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)))
Expand Down
13 changes: 0 additions & 13 deletions target/linux/ramips/image/mt7621.mk
Expand Up @@ -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
Expand Down

0 comments on commit 1b81497

Please sign in to comment.