Merge remote-tracking branch 'origin/add-ludos' into add-ludos

This commit is contained in:
Phil Clifford 2022-09-17 16:34:07 +01:00
commit d258c5a372
No known key found for this signature in database
GPG Key ID: 92F7A790E9BAF1F7
7 changed files with 60 additions and 14 deletions

@ -1 +1 @@
Subproject commit 65b307b65bf2cde7afbd37a6d654de066a869508
Subproject commit 3ede604a11b7a666f91bb19705d32d73fb0bd4d7

View File

@ -179,6 +179,8 @@ xdg-user-dirs (https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)
xrandr (https://gitlab.freedesktop.org/xorg/app/xrandr)
.IP \[bu] 2
zsync (http://zsync.moria.org.uk/)
.IP \[bu] 2
unzip (http://www.info-zip.org/UnZip.html)
.SH Usage
.SS Graphical User Interfaces
.PP
@ -296,6 +298,8 @@ All the official Ubuntu flavours are supported, just replace
.IP \[bu] 2
\f[C]freebsd\f[R] (FreeBSD)
.IP \[bu] 2
\f[C]freedos\f[R] (FreeDOS)
.IP \[bu] 2
\f[C]garuda\f[R] (Garuda Linux)
.IP \[bu] 2
\f[C]gentoo\f[R] (Gentoo)

View File

@ -159,6 +159,7 @@ Requirements
- [xdg-user-dirs](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)
- [xrandr](https://gitlab.freedesktop.org/xorg/app/xrandr)
- [zsync](http://zsync.moria.org.uk/)
- [unzip](http://www.info-zip.org/UnZip.html)
Usage
=====
@ -250,6 +251,7 @@ Other Operating Systems
- `elementary` (elementary OS)
- `fedora` (Fedora)
- `freebsd` (FreeBSD)
- `freedos` (FreeDOS)
- `garuda` (Garuda Linux)
- `gentoo` (Gentoo)
- `ghostbsd` (GhostBSD)

View File

@ -121,6 +121,8 @@ All the official Ubuntu flavours are supported, just replace
.IP \[bu] 2
\f[C]freebsd\f[R] (FreeBSD)
.IP \[bu] 2
\f[C]freedos\f[R] (FreeDOS)
.IP \[bu] 2
\f[C]garuda\f[R] (Garuda Linux)
.IP \[bu] 2
\f[C]gentoo\f[R] (Gentoo)

View File

@ -107,6 +107,7 @@ Other Operating Systems
- `elementary` (elementary OS)
- `fedora` (Fedora)
- `freebsd` (FreeBSD)
- `freedos` (FreeDOS)
- `garuda` (Garuda Linux)
- `gentoo` (Gentoo)
- `ghostbsd` (GhostBSD)

View File

@ -476,10 +476,25 @@ function vm_boot() {
NET_DEVICE="rtl8139"
fi
if [ "${guest_os}" == "freedos" ] ; then
# fix for #382
SMM="on"
fi
if [ -z "${disk_size}" ]; then
disk_size="16G"
fi
;;
ludos)
CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext"
fi
MACHINE_TYPE="pc"
NET_DEVICE="rtl8139"
disk_size="8G"
;;
kolibrios)
CPU="-cpu qemu32,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
@ -933,7 +948,7 @@ function vm_boot() {
args+=(-drive media=cdrom,index=1,file="${fixed_iso}")
fi
if [ -n "{iso}" ] && [ "${guest_os}" == "freedos" ]; then
if [ -n "${iso}" ] && [ "${guest_os}" == "freedos" ]; then
# FreeDOS reboots after partitioning the disk, and QEMU tries to boot from disk after first restart
# This flag sets the boot order to cdrom,disk. It will persist until powering down the VM
args+=(-boot order=dc)
@ -968,6 +983,12 @@ function vm_boot() {
args+=(-device ahci,id=ahci
-device ide-hd,bus=ahci.0,drive=SystemDisk
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
elif [ "${guest_os}" == "ludos" ] ; then
# shellcheck disable=SC2054,SC2206
args+=(-device virtio-blk-pci,drive=BootDisk
-drive id=BootDisk,if=none,format=raw,file="${img}"
-device virtio-blk-pci,drive=SystemDisk
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
else
# shellcheck disable=SC2054,SC2206
args+=(-device virtio-blk-pci,drive=SystemDisk
@ -1118,7 +1139,7 @@ VMPATH=""
# shellcheck disable=SC2155
readonly LAUNCHER=$(basename "${0}")
readonly DISK_MIN_SIZE=$((197632 * 8))
readonly VERSION="3.13"
readonly VERSION="3.14"
# PUBLICSHARE is the only directory exposed to guest VMs for file
# sharing via 9P, spice-webdavd and Samba. This path is not configurable.

View File

@ -308,7 +308,6 @@ function editions_garuda() {
mate \
qtile \
sway \
wayfire \
xfce
}
@ -374,7 +373,6 @@ function releases_manjaro() {
kde \
budgie \
cinnamon \
deepin \
i3 \
mate
}
@ -449,10 +447,19 @@ function releases_tails() {
}
function releases_ubuntu() {
echo 14.04 \
16.04 \
18.04 \
20.04 \
local LTS_SUPPORT="14.04 16.04 18.04 20.04"
case "${OS}" in
kubuntu|lubuntu|ubuntukylin|\
ubuntu-mate|ubuntustudio|xubuntu)
## after 14.04
LTS_SUPPORT="${LTS_SUPPORT/14.04 /}"
;;
ubuntu-budgie)
#after 16.04
LTS_SUPPORT="${LTS_SUPPORT/14.04 16.04 /}"
;;
esac
echo ${LTS_SUPPORT} \
21.10 \
daily-live \
daily-canary \
@ -891,8 +898,9 @@ function get_fedora() {
}
function get_freebsd() {
local EDITION="${1}"
local HASH=""
local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso"
local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-${EDITION}.iso"
local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}"
HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4)
@ -928,7 +936,11 @@ function get_garuda() {
cinnamon|mate) URL="http://mirrors.fossho.st/garuda/iso/community/${EDITION}/${RELEASE}";;
*) URL="http://mirrors.fossho.st/garuda/iso/garuda/${EDITION}/${RELEASE}";;
esac
ISO="garuda-${EDITION}-linux-zen-${RELEASE}.iso"
case ${EDITION} in
xfce|kde-barebones) ISO="garuda-${EDITION}-linux-lts-${RELEASE}.iso";;
*) ISO="garuda-${EDITION}-linux-zen-${RELEASE}.iso";;
esac
HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)"
echo "${URL}/${ISO} ${HASH}"
}
@ -1166,7 +1178,7 @@ function get_opensuse() {
ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso"
URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso"
fi
HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
HASH=$(wget -q -O- "${URL}/${ISO}.sha256" |awk '{if(NR==4) print $0}'|cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}"
}
@ -1219,7 +1231,7 @@ function get_rockylinux() {
8.5) URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64";;
*) URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64/";;
esac
HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO}" | cut -d' ' -f4)
HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO})" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}
@ -1270,7 +1282,7 @@ function get_ubuntu() {
URL="https://old-releases.ubuntu.com/releases/${RELEASE/eol-/}"
elif [[ "${RELEASE}" == *"daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
URL="https://cdimage.ubuntu.com/${OS}/${RELEASE}/current"
VM_PATH="${OS}-devel"
VM_PATH="${OS}-daily-live"
elif [ "${OS}" == "ubuntu" ]; then
URL="https://releases.ubuntu.com/${RELEASE}"
else
@ -1730,6 +1742,10 @@ create_vm() {
gzip -d "${VM_PATH}/${ISO}"
ISO="${ISO/.gz/}"
fi
if [[ ${OS} == "ludos" ]] && [[ ${ISO} =~ ".gz" ]] ; then
gzip -d "${VM_PATH}/${ISO}"
ISO="${ISO/.gz/}"
fi
make_vm_config "${ISO}"
}