-# The pre-filled 64 bytes consist of
-# - 28 bytes seama_header
-# - 36 bytes of META data (4-bytes aligned)
-define Build/seama-factory
- ( dd if=/dev/zero bs=64 count=1; cat $(word 1,$^) ) >$@.loader.tmp
- ( dd if=$@.loader.tmp bs=64k conv=sync; dd if=$(word 2,$^) ) >$@.tmp.0
- tail -c +65 $@.tmp.0 >$@.tmp.1
- $(STAGING_DIR_HOST)/bin/seama \
- -i $@.tmp.1 \
- -m "dev=/dev/mtdblock/1" -m "type=firmware"
- $(STAGING_DIR_HOST)/bin/seama \
- -s $@ \
- -m "signature=$(1)" \
- -i $@.tmp.1.seama
- rm -f $@.loader.tmp $@.tmp.*
-endef
-
-define Build/seama-sysupgrade
- $(STAGING_DIR_HOST)/bin/seama \
- -i $(word 1,$^) \
- -m "dev=/dev/mtdblock/1" -m "type=firmware"
- ( dd if=$(word 1,$^).seama bs=64k conv=sync; dd if=$(word 2,$^) ) >$@
- rm -f $(word 1,$^).seama
-endef
-
-define Build/seama-initramfs
- $(STAGING_DIR_HOST)/bin/seama \
- -i $@ \
- -m "dev=/dev/mtdblock/1" -m "type=firmware"