fixes for efi firmware

This commit is contained in:
betcher 2022-10-28 10:28:44 +03:00
parent b871dfa0bc
commit f31a772965
3 changed files with 29 additions and 12 deletions

5
qemoo
View file

@ -5,8 +5,9 @@ QCOW2='none' # name for qcow2 image to install
SIZE='10' # size for qcow2 image to install
RAM='auto' # ram for machine
QEMUADD='' # additional parameters for qemu
EFI_FIRMWARE='-bios /usr/share/OVMF/OVMF_CODE.fd'
# architecture dependened efi firmware emulator
EFI=''
[ -f '/ect/qemoo.cfg' ] && . /etc/qemoo.cfg
[ -f './qemoo.cfg' ] && . ./qemoo.cfg
@ -20,7 +21,7 @@ do
"-R" | "--ram" ) shift ; RAM=$1 ;; # <par> size or RAM to guest machine
"-S" | "--show-cmdline" ) SHOW='yes' ;; # how qemu cmdline
"-a" | "--all" ) ALL='yes' ;; # use usb device as aggregate, with token, modem, etc
"-e" | "--efi" | "--uefi" ) EFI="-bios /usr/share/OVMF/OVMF_CODE.fd" ;; # efi instead legacy bios
"-e" | "--efi" | "--uefi" ) EFI="$EFI_FIRMWARE" ;; # efi instead legacy bios
"-h" | "--help" ) # this help
echo "Usage: $0 /path/to/image <parameters>"
cat $0 |sed -n '/).*#.*/s/).*#/ - /p' |grep -v cat

View file

@ -1,8 +1,20 @@
# Setup parameters for qemoo
QEMUADD="-vga std -smp 2" # additional parameters for qemu
#ACTION='run' # what to do (run or install, default: run)
#QCOW2='my_machine.qcow2' # name for qcow2 image to install (default: q${RANDOM}.qcow2)
#SIZE='10' # size (Gb) for qcow2 image to install (default: 10)
#RAM='4' # size of ram (Gb) for guest machine (default: RAM / 2, but not greater then 4)
#EFI='-bios /usr/share/OVMF/OVMF_CODE.fd' # enable efi boot
# additional parameters for qemu
QEMUADD="-vga std -smp 2"
# what to do (run or install, default: run)
#ACTION='run'
# name for qcow2 image to install (default: q${RANDOM}.qcow2)
#QCOW2='my_machine.qcow2'
# size (Gb) for qcow2 image to install (default: 10)
#SIZE='10'
# size of ram (Gb) for guest machine (default: RAM / 2, but not greater then 4)
#RAM='4'
# efi firmware emulator for current architicture
#EFI_FIRMWARE='-bios /usr/share/OVMF/OVMF_CODE.fd'

View file

@ -1,18 +1,22 @@
Summary: Wrapper for qemu to easy run guest machines
Name: qemoo
Version: 0.1
Release: 1
Release: 2
License: GPLv2+
Group: System/Base
Url: https://abf.io/import/qemoo
Source0: %{name}
Source1: %{name}.cfg
Buildarch: noarch
Requires: qemu
Requires: qemu-img
Requires: edk2-ovmf
Buildarch: noarch
# architecture dependened efi firmware emulator
# TODO: find efi firmware for all architectures that support efi
%ifarch x86_64
Requires: edk2-ovmf
%endif
%description
Wrapper for qemu to easy run guest machine