From: Michael Tremer Date: Thu, 13 Jun 2019 11:18:52 +0000 (+0100) Subject: Generate a VHD image X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee0e3beb39da302fb9735b8b3846ee675192b350;p=people%2Fteissler%2Fipfire-2.x.git Generate a VHD image Signed-off-by: Michael Tremer --- diff --git a/.gitignore b/.gitignore index 69175e69b..8834c5366 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ *.img.xz *.iso *.tar.bz2 +*.vhd /*.md5 diff --git a/lfs/flash-images b/lfs/flash-images index dcad81ab3..98adb3124 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -36,7 +36,7 @@ ifeq "$(EFI)" "1" endif PART_ROOT = /dev/mapper/$(patsubst /dev/%,%,$(DEVICE))p3 -IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).2gb-ext4.$(BUILD_ARCH)-full-core$(CORE).img.xz +IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).2gb-ext4.$(BUILD_ARCH)-full-core$(CORE) FSTAB_FMT = UUID=%s %-8s %-4s %-10s %d %d\n @@ -255,5 +255,9 @@ ifeq "$(BUILD_ARCH)" "armv5tel" endif # Compress Image - xz $(XZ_OPT) < $(IMG) > $(IMAGE_FILE) + xz $(XZ_OPT) < $(IMG) > $(IMAGE_FILE).img.xz + + # Make VHD image + qemu-img convert -O vpc -o subformat=fixed,force_size $(IMG) $(IMAGE_FILE).vhd + rm -rf $(IMG) $(MNThdd) diff --git a/make.sh b/make.sh index d6f6f7147..d8a5474db 100755 --- a/make.sh +++ b/make.sh @@ -1670,7 +1670,7 @@ buildpackages() { lfsmake2 flash-images fi - mv $LFS/install/images/{*.iso,*.img.xz,*.bz2} $BASEDIR >> $LOGFILE 2>&1 + mv $LFS/install/images/{*.iso,*.img.xz,*.bz2,*.vhd} $BASEDIR >> $LOGFILE 2>&1 ipfirepackages