Merge branch 'void' into mud-plus-void

This commit is contained in:
Phil 2022-01-31 02:19:19 +00:00
commit daa730a2d9
2 changed files with 65 additions and 6 deletions

View File

@ -394,11 +394,11 @@ function vm_boot() {
EFI_CODE="/usr/share/OVMF/x64/OVMF_CODE.secboot.fd" EFI_CODE="/usr/share/OVMF/x64/OVMF_CODE.secboot.fd"
efi_vars "/usr/share/OVMF/x64/OVMF_VARS.fd" "${EFI_VARS}" efi_vars "/usr/share/OVMF/x64/OVMF_VARS.fd" "${EFI_VARS}"
elif [ -e "/usr/share/edk2-ovmf/OVMF_CODE.fd" ]; then elif [ -e "/usr/share/edk2-ovmf/OVMF_CODE.fd" ]; then
EFI_CODE="/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd" EFI_CODE="/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd"
efi_vars "/usr/share/edk2-ovmf/OVMF_VARS.fd" "${EFI_VARS}" efi_vars "/usr/share/edk2-ovmf/OVMF_VARS.fd" "${EFI_VARS}"
elif [ -e "/usr/share/qemu/ovmf-x86_64-smm-ms-code.bin" ]; then elif [ -e "/usr/share/qemu/edk2-x86_64-secure-code.fd" ]; then
EFI_CODE="/usr/share/qemu/ovmf-x86_64-smm-ms-code.bin" EFI_CODE="/usr/share/qemu/edk2-x86_64-secure-code.fd"
efi_vars "/usr/share/qemu/ovmf-x86_64-smm-ms-vars.bin" "${EFI_VARS}" efi_vars "/usr/share/qemu/edk2-x86_64-code.fd" "${EFI_VARS}"
else else
echo "ERROR! SecureBoot was requested but no SecureBoot capable firmware was found." echo "ERROR! SecureBoot was requested but no SecureBoot capable firmware was found."
echo " Please install OVMF firmware." echo " Please install OVMF firmware."
@ -424,6 +424,9 @@ function vm_boot() {
elif [ -e "/usr/share/qemu/ovmf-x86_64-4m-code.bin" ]; then elif [ -e "/usr/share/qemu/ovmf-x86_64-4m-code.bin" ]; then
EFI_CODE="/usr/share/qemu/ovmf-x86_64-4m-code.bin" EFI_CODE="/usr/share/qemu/ovmf-x86_64-4m-code.bin"
efi_vars "/usr/share/qemu/ovmf-x86_64-4m-vars.bin" "${EFI_VARS}" efi_vars "/usr/share/qemu/ovmf-x86_64-4m-vars.bin" "${EFI_VARS}"
elif [ -e "/usr/share/qemu/edk2-x86_64-code.fd" ]; then
EFI_CODE="/usr/share/qemu/edk2-x86_64-code.fd"
efi_vars "/usr/share/qemu/edk2-x86_64-code.fd" "${EFI_VARS}"
else else
echo "ERROR! EFI boot requested but no EFI firmware found." echo "ERROR! EFI boot requested but no EFI firmware found."
echo " Please install OVMF firmware." echo " Please install OVMF firmware."

View File

@ -76,6 +76,7 @@ function pretty_name() {
ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";; ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";;
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";; ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
ubuntu-studio) PRETTY_NAME="Ubuntu Studio";; ubuntu-studio) PRETTY_NAME="Ubuntu Studio";;
void) PRETTY_NAME="Void Linux";;
zorin) PRETTY_NAME="Zorin OS";; zorin) PRETTY_NAME="Zorin OS";;
*) PRETTY_NAME="${SIMPLE_NAME^}";; *) PRETTY_NAME="${SIMPLE_NAME^}";;
esac esac
@ -234,6 +235,7 @@ function os_support() {
ubuntu-kylin \ ubuntu-kylin \
ubuntu-mate \ ubuntu-mate \
ubuntu-studio \ ubuntu-studio \
void \
windows \ windows \
xubuntu \ xubuntu \
zorin zorin
@ -442,6 +444,13 @@ function releases_ubuntu() {
canary canary
} }
function releases_void() {
echo base \
musl \
xfce \
xfce-musl
}
function languages_windows() { function languages_windows() {
LANGS=(Arabic LANGS=(Arabic
"Brazilian Portuguese" "Brazilian Portuguese"
@ -687,6 +696,9 @@ function make_vm_config() {
elif [[ "${OS}" == *"ubuntu"* ]]; then elif [[ "${OS}" == *"ubuntu"* ]]; then
GUEST="linux" GUEST="linux"
IMAGE_TYPE="iso" IMAGE_TYPE="iso"
elif [ "${OS}" == "void" ]; then
GUEST="linux"
IMAGE_TYPE="iso"
elif [ "${OS}" == "macos" ]; then elif [ "${OS}" == "macos" ]; then
GUEST="macos" GUEST="macos"
IMAGE_TYPE="img" IMAGE_TYPE="img"
@ -751,6 +763,10 @@ EOF
echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf" echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf"
fi fi
if [ "${OS}" == "void" ]; then
echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf"
fi
if [ "${OS}" == "zorin" ]; then if [ "${OS}" == "zorin" ]; then
case ${RELEASE} in case ${RELEASE} in
15education64|15edulite64|15edulite32) 15education64|15edulite64|15edulite32)
@ -1070,6 +1086,7 @@ function get_linuxmint() {
web_get "${URL}" "${VM_PATH}" web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}" check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}" make_vm_config "${ISO}"
} }
function get_manjaro() { function get_manjaro() {
@ -1151,6 +1168,7 @@ function get_nixos() {
web_get "${URL}" "${VM_PATH}" web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}" check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}" make_vm_config "${ISO}"
} }
function get_openbsd() { function get_openbsd() {
local HASH="" local HASH=""
@ -1166,6 +1184,40 @@ function get_openbsd() {
make_vm_config "${ISO}" make_vm_config "${ISO}"
} }
function get_void() {
local HASH=""
local ISO=""
local URL=""
local HASH_URL=""
validate_release "releases_void"
DATE=$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | awk 'NR == 1' |cut -d'.' -f1| cut -d'-' -f4)
URL="http://mirror.fit.cvut.cz/voidlinux/live/current"
case ${RELEASE} in
base)
ISO="void-live-x86_64-${DATE}.iso";;
musl)
ISO="void-live-x86_64-musl-${DATE}.iso";;
xfce)
ISO="void-live-x86_64-${DATE}-xfce.iso";;
xfce-musl)
ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
esac
case ${RELEASE} in
base)
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}.iso" | cut -d' ' -f4)";;
musl)
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";;
xfce)
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}-xfce.iso" | cut -d' ' -f4)";;
xfce-musl)
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";;
esac
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
function get_zorin() { function get_zorin() {
local ISO="" local ISO=""
local URL="" local URL=""
@ -1459,6 +1511,7 @@ function get_ubuntu() {
make_vm_config "${ISO}" make_vm_config "${ISO}"
fi fi
} }
function get_garuda() { function get_garuda() {
local HASH="" local HASH=""
local ISO="" local ISO=""
@ -1805,7 +1858,6 @@ function unattended_windows() {
EOF EOF
} }
function dbg_windows() { function dbg_windows() {
local DEBUG=0 local DEBUG=0
if [ ${DEBUG} -eq 1 ]; then if [ ${DEBUG} -eq 1 ]; then
@ -1956,6 +2008,8 @@ if [ -n "${2}" ]; then
get_archlinux get_archlinux
elif [ "${OS}" == "arcolinux" ]; then elif [ "${OS}" == "arcolinux" ]; then
get_arcolinux get_arcolinux
elif [ "${OS}" == "void" ]; then
get_void
elif [ "${OS}" == "debian" ]; then elif [ "${OS}" == "debian" ]; then
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
FREEDOM="${3}" FREEDOM="${3}"
@ -2129,6 +2183,8 @@ else
releases_tails releases_tails
elif [[ "${OS}" == *"ubuntu"* ]]; then elif [[ "${OS}" == *"ubuntu"* ]]; then
releases_ubuntu releases_ubuntu
elif [ "${OS}" == "void" ]; then
releases_void
elif [ "${OS}" == "windows" ]; then elif [ "${OS}" == "windows" ]; then
releases_windows releases_windows
elif [ "${OS}" == "zorin" ]; then elif [ "${OS}" == "zorin" ]; then