OSDN Git Service

x86: add PVE image build
authorTianling Shen <cnsztl@immortalwrt.org>
Thu, 17 Jun 2021 12:33:55 +0000 (20:33 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Mon, 25 Apr 2022 00:03:48 +0000 (08:03 +0800)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit c9344d6a6a424d7152fc8d01f9a09eed5912487a)

config/Config-images.in
target/linux/x86/image/Makefile

index 8086772..4dcb5ef 100644 (file)
@@ -261,6 +261,13 @@ menu "Target Images"
                depends on GRUB_IMAGES || GRUB_EFI_IMAGES
                default y if BUILDBOT
 
+       config QCOW2_IMAGES
+               bool "Build PVE/KVM image files (QCOW2)"
+               depends on TARGET_x86
+               depends on GRUB_IMAGES || GRUB_EFI_IMAGES
+               select PACKAGE_kmod-e1000
+               default y if BUILDBOT
+
        config VDI_IMAGES
                bool "Build VirtualBox image files (VDI)"
                depends on TARGET_x86
index 322131c..677b758 100644 (file)
@@ -107,6 +107,7 @@ define Device/Default
   ARTIFACT/image.iso := grub-config iso | iso
   IMAGE/combined.img := grub-config pc | combined | grub-install | append-metadata
   IMAGE/combined.img.gz := grub-config pc | combined | grub-install | gzip | append-metadata
+  IMAGE/combined.qcow2 := grub-config pc | combined | grub-install | qemu-image qcow2
   IMAGE/combined.vdi := grub-config pc | combined | grub-install | qemu-image vdi
   IMAGE/combined.vmdk := grub-config pc | combined | grub-install | qemu-image vmdk
   IMAGE/combined.vhdx := grub-config pc | combined | grub-install | qemu-image vhdx -o subformat=dynamic
@@ -115,6 +116,7 @@ define Device/Default
   ARTIFACT/image-efi.iso := grub-config iso | iso efi
   IMAGE/combined-efi.img := grub-config efi | combined efi | grub-install efi | append-metadata
   IMAGE/combined-efi.img.gz := grub-config efi | combined efi | grub-install efi | gzip | append-metadata
+  IMAGE/combined-efi.qcow2 := grub-config efi | combined efi | grub-install efi | qemu-image qcow2
   IMAGE/combined-efi.vdi := grub-config efi | combined efi | grub-install efi | qemu-image vdi
   IMAGE/combined-efi.vmdk := grub-config efi | combined efi | grub-install efi | qemu-image vmdk
   IMAGE/combined-efi.vhdx := grub-config efi | combined efi | grub-install efi | qemu-image vhdx -o subformat=dynamic
@@ -134,6 +136,10 @@ define Device/Default
     ARTIFACTS-$$(CONFIG_GRUB_IMAGES) += image.iso
     ARTIFACTS-$$(CONFIG_GRUB_EFI_IMAGES) += image-efi.iso
   endif
+  ifeq ($(CONFIG_QCOW2_IMAGES),y)
+    IMAGES-$$(CONFIG_GRUB_IMAGES) += combined.qcow2
+    IMAGES-$$(CONFIG_GRUB_EFI_IMAGES) += combined-efi.qcow2
+  endif
   ifeq ($(CONFIG_VDI_IMAGES),y)
     IMAGES-$$(CONFIG_GRUB_IMAGES) += combined.vdi
     IMAGES-$$(CONFIG_GRUB_EFI_IMAGES) += combined-efi.vdi