aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-03-20 00:10:57 -1000
committerDaniel Golle <daniel@makrotopia.org>2020-03-21 10:36:00 +0000
commit33cc7e763b1223585d38d3a6f87f48f7e54ff4e8 (patch)
tree8cfbda9c6dfc7df69c572dcbc2f17f611fddef14 /target/linux/x86
parentb2207e267b5971fbd92a7a9edd5ecdcd0d362603 (diff)
downloadupstream-33cc7e763b1223585d38d3a6f87f48f7e54ff4e8.tar.gz
upstream-33cc7e763b1223585d38d3a6f87f48f7e54ff4e8.tar.bz2
upstream-33cc7e763b1223585d38d3a6f87f48f7e54ff4e8.zip
x86: use qemu-image command from image-commands.mk
The `qemu-image` command converts images to the specified type and reduces redundant code. Adaption from Alexander Couzens <lynxis@fe80.eu> work[0]. [0]: https://git.openwrt.org/?p=openwrt/staging/lynxis.git;a=blob;f=target/linux/x86/image/Makefile;h=83b8140b7aefbe708fd09c9c61827e7e39bda8b4;hb=416cccf398e9589e3de386e05b61b1c46cace20d#l51 Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'target/linux/x86')
-rw-r--r--target/linux/x86/image/Makefile14
1 files changed, 2 insertions, 12 deletions
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index 494a190b86..dfa1742d5a 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -92,23 +92,13 @@ define Build/iso
-o $@ $@.boot $(TARGET_DIR)
endef
-define Build/vdi
- qemu-img convert -f raw -O vdi $@ $@.new
- @mv $@.new $@
-endef
-
-define Build/vmdk
- qemu-img convert -f raw -O vmdk $@ $@.new
- @mv $@.new $@
-endef
-
DEVICE_VARS += GRUB2_VARIANT
define Device/Default
ARTIFACT/image.iso := grub-config iso | iso
IMAGES := combined.img.gz
IMAGE/combined.img.gz := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | gzip
- IMAGE/combined.vdi := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | vdi
- IMAGE/combined.vmdk := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | vmdk
+ IMAGE/combined.vdi := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | qemu-image vdi
+ IMAGE/combined.vmdk := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | qemu-image vmdk
KERNEL := kernel-bin
KERNEL_INSTALL := 1
KERNEL_NAME := bzImage