From cd6d3b18f8e921307e10666c8434541f1a3ddc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sp=C3=B6hel?= Date: Thu, 22 Apr 2021 11:20:32 +0200 Subject: Creating option for images booting efi or legacy bios. --- share/build-scripts/qemu | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'share/build-scripts/qemu') diff --git a/share/build-scripts/qemu b/share/build-scripts/qemu index f9ab4b4..4a0540d 100755 --- a/share/build-scripts/qemu +++ b/share/build-scripts/qemu @@ -33,7 +33,7 @@ export SCRIPT Parameters () { - GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:" + GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:,boot-method:," GETOPT_OPTIONS="b:,s:,n:,p:" PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${SCRIPT} --options ${GETOPT_OPTIONS} --shell sh -- "${@}")" @@ -84,6 +84,11 @@ Parameters () shift 2 ;; + --boot-method) + BOOT_METHOD="${2}" + shift 2 + ;; + --) shift 1 break @@ -128,12 +133,19 @@ then exit 1 fi +case "${BOOT_METHOD}" in + "") + BOOT_METHOD="efi" + ;; + + *) + ;; +esac + Create_Disk () { # FIXME image size as arg or preseed IMG_SIZE=12000 - #BOOT_METHOD="bios" - BOOT_METHOD="efi" dd if=/dev/zero of="${MACHINES}/${NAME}.img" bs=1024k count=0 seek="${IMG_SIZE}" parted "${MACHINES}/${NAME}.img" mklabel gpt -- cgit v1.2.3