1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-13 11:51:54 +00:00
openmptcprouter/patches/images.patch

43 lines
1.3 KiB
Diff
Raw Normal View History

2019-06-01 12:10:00 +00:00
--- a/config/Config-images.in.orig 2019-05-28 14:40:45.246749741 +0200
+++ b/config/Config-images.in 2019-05-28 14:41:14.866378695 +0200
2019-05-29 06:24:15 +00:00
@@ -251,6 +251,13 @@
select TARGET_IMAGES_PAD
select PACKAGE_kmod-e1000
+ config VHDX_IMAGES
+ bool "Build Hyper-V image files (VHDX)"
+ depends on TARGET_x86
+ select GRUB_IMAGES
+ select TARGET_IMAGES_PAD
+ select PACKAGE_kmod-e1000
+
config TARGET_IMAGES_PAD
bool "Pad images to filesystem size (for JFFS2)"
depends on GRUB_IMAGES
2019-06-03 19:44:22 +00:00
--- a/target/linux/x86/image/Makefile.orig 2019-06-03 14:32:39.094356089 +0200
+++ b/target/linux/x86/image/Makefile 2019-06-03 19:04:23.875965073 +0200
2019-06-03 17:05:12 +00:00
@@ -143,6 +143,15 @@
2019-05-29 06:24:15 +00:00
endef
endif
2019-06-03 05:55:01 +00:00
+ifneq ($(CONFIG_VHDX_IMAGES),)
2019-06-03 17:05:12 +00:00
+ define Image/Build/vhdx
2019-05-29 06:24:15 +00:00
+ rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vhdx || true
+ qemu-img convert -f raw -O vhdx \
+ $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
+ $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vhdx
+ endef
+endif
+
define Image/Build/gzip
gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
2019-06-03 17:05:12 +00:00
@@ -175,6 +184,7 @@
$(call Image/Build/grub2,$(1))
$(call Image/Build/vdi,$(1))
$(call Image/Build/vmdk,$(1))
+ $(call Image/Build/vhdx,$(1))
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
else
$(CP) $(KDIR)/root.iso $(BIN_DIR)/$(IMG_PREFIX).iso