Commit a8211b44 authored by Heather Ellsworth's avatar Heather Ellsworth

Merge branch 'qcow2' into 'master'

build a qcow2 image

Closes #9

See merge request Librem5/image-builder!37
parents 46ab95c9 d08bdeca
......@@ -55,6 +55,7 @@ build_type=unstable
NULL=
uboot_bin=
build_tarball=
want_qcow2=
while getopts ":hb:d:T:B" opt; do
case ${opt} in
......@@ -139,3 +140,9 @@ if [ "${pureos_board}" == "imx8" ] || [ "${pureos_board}" == "ec-som" ]; then
sudo dd if="files/uboot-${uboot_type}/m4.bin" of="${loop}" bs=1024 seek=2
sudo losetup -d "${loop}"
fi
if [ "${want_qcow2}" == 1 ]; then
qcow2="$(basename "${bootimg}" .img)".qcow2
qemu-img convert -f raw -O qcow2 "${bootimg}" "${qcow2}"
qemu-img resize -f qcow2 "${qcow2}" +28G
fi
......@@ -72,6 +72,7 @@ case ${pureos_board} in
qemu-x86_64)
board_type=x86
arch=x86_64
want_qcow2=1
fdt_file=
if [ -f ./bin/qemu-system-x86_64 ]; then
qemu=./bin/qemu-system-x86_64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment