mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: extensions changes - MEGASQUASH - squashed changes from c9cf3fc241cfb4c872f4aef7bbc41d5854db7ea3 to 6809de3d6063cb041205a8318e19da6a4dee68c9 ref extensions_08_10_2022_pre_v30
This commit is contained in:
16
extensions/image-output-qcow2.sh
Normal file
16
extensions/image-output-qcow2.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
add_host_dependencies__ovf_host_deps() {
|
||||
[[ "${SKIP_QCOW2}" == "yes" ]] && return 0
|
||||
export EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} qemu-utils"
|
||||
}
|
||||
|
||||
function post_build_image__900_convert_to_qcow2_img() {
|
||||
[[ "${SKIP_QCOW2}" == "yes" ]] && return 0
|
||||
display_alert "Converting image to qcow2" "${EXTENSION}" "info"
|
||||
export QCOW2_IMAGE_FILE="${DESTIMG}/${version}.img.qcow2"
|
||||
run_host_command_logged qemu-img convert -f raw -O qcow2 "${DESTIMG}/${version}.img" "${QCOW2_IMAGE_FILE}"
|
||||
run_host_command_logged qemu-img info "${QCOW2_IMAGE_FILE}"
|
||||
if [[ "${QCOW2_RESIZE_AMOUNT}" != "" ]]; then
|
||||
display_alert "Resizing qcow2 image by '${QCOW2_RESIZE_AMOUNT}' " "${EXTENSION}" "info"
|
||||
qemu-img resize "${QCOW2_IMAGE_FILE}" "${QCOW2_RESIZE_AMOUNT}"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user