build: move seama commands to image-commands.mk
[openwrt/staging/lynxis.git] / include / image-commands.mk
index ac724d20ac4e1f9bafcfad8ea55fec1cc4fed5a9..c5b64c751d9cc9ac20537807976f5d32fa0f18b4 100644 (file)
@@ -49,6 +49,18 @@ define Build/eva-image
        mv $@.new $@
 endef
 
+define Build/seama
+       $(STAGING_DIR_HOST)/bin/seama -i $@ \
+               -m "dev=/dev/mtdblock/$(SEAMA_MTDBLOCK)" -m "type=firmware"
+       mv $@.seama $@
+endef
+
+define Build/seama-seal
+       $(STAGING_DIR_HOST)/bin/seama -i $@ -s $@.seama \
+               -m "signature=$(SEAMA_SIGNATURE)"
+       mv $@.seama $@
+endef
+
 define Build/zyxel-ras-image
        let \
                newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
@@ -90,6 +102,10 @@ define Build/append-squashfs-fakeroot-be
        cat $@.fakesquashfs >> $@
 endef
 
+define Build/append-string
+       echo -n $(1) >> $@
+endef
+
 # append a fake/empty uImage header, to fool bootloaders rootfs integrity check
 # for example
 define Build/append-uImage-fakehdr
@@ -238,6 +254,11 @@ define Build/pad-offset
        mv $@.new $@
 endef
 
+define Build/xor-image
+       $(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1)
+       mv $@.xor $@
+endef
+
 define Build/check-size
        @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \
                echo "WARNING: Image file $@ is too big" >&2; \