+bios=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd
Current bios var is strongly correlated with aarch64, may be you need a function to prepare `BIOS` var for different arch, such as get_bios()
ok
+individual_option() +{
- aarch64=(
-machine virt-4.0,accel=kvm,gic-version=3
-cpu Kunpeng-920
-bios $bios
-nic $nic
- )
+}
If you want your script support many arch, how about modify `aarch64` to `APPENDS`? it looks more general.
already have append var from lkp code.
Btw, maybe you can unify the function naming. just as the follow:
good
Thanks, Yinsi
get_bios() get_helper() get_nic() get_qemu_command() get_public_option() get_individual_option() run_qemu() main() { step_1 step_2 step_3 }
Thanks Yu Chuan
+run_qemu() +{
case $qemu in
qemu-system-aarch64)
kvm=("${kvm[@]}" "${aarch64[@]}")
;;
qemu-kvm)
[ "$(arch)" == "aarch64" ] && kvm=("${kvm[@]}" "${aarch64[@]}")
;;
esac
"${kvm[@]}" --append "${append}"
} @@ -112,7 +145,11 @@ qemu_command parse_ipxe_script check_option_value get_initrd +get_nic
print_message
+public_option +individual_option
run_qemu
2.23.0