mirror of
https://github.com/coolsnowwolf/lede
synced 2025-01-09 05:17:30 +08:00
add generate Proxmox VE and KVM qcow2 support in x86/x64
This commit is contained in:
parent
53828b3900
commit
17d0fb76af
@ -261,6 +261,14 @@ menu "Target Images"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-tulip
|
||||
|
||||
config QCOW2_IMAGES
|
||||
bool "Build PVE/KVM image files (QCOW2)"
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
default n
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-e1000
|
||||
|
||||
config TARGET_IMAGES_PAD
|
||||
bool "Pad images to filesystem size (for JFFS2)"
|
||||
|
@ -267,6 +267,21 @@ ifneq ($(CONFIG_VHD_IMAGES),)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_QCOW2_IMAGES),)
|
||||
define Image/Build/qcow2
|
||||
rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).qcow2 || true
|
||||
/usr/bin/qemu-img convert -O qcow2 \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).qcow2
|
||||
endef
|
||||
define Image/Build/qcow2_efi
|
||||
rm $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).qcow2 || true
|
||||
/usr/bin/qemu-img convert -O qcow2 \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).qcow2
|
||||
endef
|
||||
endif
|
||||
|
||||
define Image/Build/gzip
|
||||
gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
||||
ifneq ($(CONFIG_GRUB_IMAGES),)
|
||||
@ -307,11 +322,13 @@ ifneq ($(CONFIG_GRUB_IMAGES),)
|
||||
$(call Image/Build/vdi,$(1))
|
||||
$(call Image/Build/vmdk,$(1))
|
||||
$(call Image/Build/vhd,$(1))
|
||||
$(call Image/Build/qcow2,$(1))
|
||||
endif
|
||||
ifneq ($(CONFIG_EFI_IMAGES),)
|
||||
$(call Image/Build/vdi_efi,$(1))
|
||||
$(call Image/Build/vmdk_efi,$(1))
|
||||
$(call Image/Build/vhd_efi,$(1))
|
||||
$(call Image/Build/qcow2_efi,$(1))
|
||||
endif
|
||||
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user