diff options
author | Paul Spooren <mail@aparcar.org> | 2020-12-30 09:08:17 -1000 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-01-10 12:28:14 -1000 |
commit | ca289e322d87bd14271de84b25291c2979f96781 (patch) | |
tree | 9c8b805511653cff5ec8615150a36f8442ad24d3 /include | |
parent | cbd67dbdcd6f45ed54a4ec382c5a8ea4d082fa84 (diff) | |
download | upstream-ca289e322d87bd14271de84b25291c2979f96781.tar.gz upstream-ca289e322d87bd14271de84b25291c2979f96781.tar.bz2 upstream-ca289e322d87bd14271de84b25291c2979f96781.zip |
build/image: warn if missing qemu-img for VDI/VMDK
Currently `qemu-img` is used to convert raw x86 images to VDI and VMDK
images, used for virtual machines.
Having `qemu-img` in tree requires us to maintain an ancient version of
`qemu-utils`, which recently required extra work to compile with newer
compiler version.
This commit prints a warning message in case `qemu-img` is missing.
As a next step the in-tree version of `qemu-img` can be removed.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/image-commands.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk index 979eafb157..3beec80c8b 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -291,8 +291,12 @@ 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 $@ + if command -v qemu-img; then \ + qemu-img convert -f raw -O $1 $@ $@.new; \ + mv $@.new $@; \ + else \ + echo "WARNING: Install qemu-img to create VDI/VMDK images" >&2; exit 1; \ + fi endef define Build/qsdk-ipq-factory-nand |