aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-commands.mk
diff options
context:
space:
mode:
Diffstat (limited to 'include/image-commands.mk')
-rw-r--r--include/image-commands.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 37cb083bbf..2ec1922044 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -414,3 +414,10 @@ define Build/kernel2minor
kernel2minor -k $@ -r $@.new $(1)
mv $@.new $@
endef
+
+# Convert a raw image into a $1 type image.
+# E.g. | qemu-image vdi
+define Build/qemu-image
+ qemu-img convert -f raw -O $1 $@ $@.new
+ @mv $@.new $@
+endef