From 215633947ee0b3899f4955a28320e2e09d0fa33d Mon Sep 17 00:00:00 2001 From: Chase Covello <54591271+chasecovello@users.noreply.github.com> Date: Sun, 30 Apr 2023 03:51:54 -0700 Subject: [PATCH] Add initial Solaris/Illumos/OpenIndiana support (#697) * Add initial Solaris/Illumos support * Fix OpenIndiana kernel panic on boot The OpenIndiana kernel panics on boot in the AHCI driver. Switching the machine type from "q35" to "pc" seems to fix the issue. * Fix Illumos/OpenIndiana USB controller issue. * Add openindiana support * Updated quickget with current OpenIndiana release * Change OpenIndiana video card to vmware-svga OpenIndiana's default Xorg configuration doesn't work with QXL, virtio, or VGA, but it does with vmware-svga. * Updated man pages for OpenIndiana support * Changed default Solaris/OpenIndiana boot to legacy The OpenIndiana installer defaults to MBR partition table and BIOS boot code even in EFI mode, so changed quickget to set 'boot="legacy"' in the configuration file. --------- Co-authored-by: Phil Clifford --- docs/quickemu.1 | 4 +++- docs/quickemu.1.md | 1 + docs/quickget.1 | 4 +++- docs/quickget.1.md | 1 + quickemu | 11 +++++++++-- quickget | 25 +++++++++++++++++++++++++ 6 files changed, 42 insertions(+), 4 deletions(-) diff --git a/docs/quickemu.1 b/docs/quickemu.1 index f1b3f98..f2ef286 100644 --- a/docs/quickemu.1 +++ b/docs/quickemu.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 2.19.2 +.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. @@ -403,6 +403,8 @@ All the official Ubuntu flavours are supported, just replace .IP \[bu] 2 \f[V]openbsd\f[R] (OpenBSD) .IP \[bu] 2 +\f[V]openindiana\f[R] (OpenIndiana) +.IP \[bu] 2 \f[V]opensuse\f[R] (openSUSE) .IP \[bu] 2 \f[V]oraclelinux\f[R] (Oracle Linux) diff --git a/docs/quickemu.1.md b/docs/quickemu.1.md index 18d3f41..0a13c9a 100644 --- a/docs/quickemu.1.md +++ b/docs/quickemu.1.md @@ -293,6 +293,7 @@ with your preferred flavour. - `netbsd` (NetBSD) - `nixos` (NixOS) - `openbsd` (OpenBSD) +- `openindiana` (OpenIndiana) - `opensuse` (openSUSE) - `oraclelinux` (Oracle Linux) - `popos` (Pop!\_OS) diff --git a/docs/quickget.1 b/docs/quickget.1 index b36e705..0d01cea 100644 --- a/docs/quickget.1 +++ b/docs/quickget.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 2.19.2 +.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. @@ -185,6 +185,8 @@ All the official Ubuntu flavours are supported, just replace .IP \[bu] 2 \f[V]openbsd\f[R] (OpenBSD) .IP \[bu] 2 +\f[V]openindiana\f[R] (OpenIndiana) +.IP \[bu] 2 \f[V]opensuse\f[R] (openSUSE) .IP \[bu] 2 \f[V]oraclelinux\f[R] (Oracle Linux) diff --git a/docs/quickget.1.md b/docs/quickget.1.md index 5051be5..02a3dae 100644 --- a/docs/quickget.1.md +++ b/docs/quickget.1.md @@ -125,6 +125,7 @@ with your preferred flavour. - `netbsd` (NetBSD) - `nixos` (NixOS) - `openbsd` (OpenBSD) +- `openindiana` (OpenIndiana) - `opensuse` (openSUSE) - `oraclelinux` (Oracle Linux) - `popos` (Pop!\_OS) diff --git a/quickemu b/quickemu index e1a7df0..80578be 100755 --- a/quickemu +++ b/quickemu @@ -468,7 +468,7 @@ function vm_boot() { # Make any OS specific adjustments case ${guest_os} in - batocera|*bsd|freedos|haiku|linux) + batocera|*bsd|freedos|haiku|linux|*solaris) CPU="-cpu host,kvm=on" if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then CPU="${CPU},topoext" @@ -486,6 +486,11 @@ function vm_boot() { SMM="on" fi + if [[ "${guest_os}" == *"solaris" ]]; then + MACHINE_TYPE="pc" + USB_CONTROLLER="xhci" + fi + if [ -z "${disk_size}" ]; then disk_size="16G" fi @@ -726,6 +731,8 @@ function vm_boot() { gtk|none|spice) DISPLAY_DEVICE="qxl-vga";; sdl|spice-app) DISPLAY_DEVICE="virtio-vga";; esac + elif [ "${guest_os}" == "solaris" ]; then + DISPLAY_DEVICE="vmware-svga" else DISPLAY_DEVICE="qxl-vga" fi @@ -763,7 +770,7 @@ function vm_boot() { case ${DISPLAY_DEVICE} in bochs-display) VIDEO="${VIDEO},vgamem=67108864";; qxl|qxl-vga) VIDEO="${VIDEO},ram_size=65536,vram_size=65536,vgamem_mb=64";; - ati-vga|cirrus-vga|VGA) VIDEO="${VIDEO},vgamem_mb=64";; + ati-vga|cirrus-vga|VGA|vmware-svga) VIDEO="${VIDEO},vgamem_mb=64";; esac # Configure multiscreen if max_outputs was provided in the .conf file diff --git a/quickget b/quickget index d750797..1719466 100755 --- a/quickget +++ b/quickget @@ -58,6 +58,7 @@ function pretty_name() { nixos) PRETTY_NAME="NixOS";; macos) PRETTY_NAME="macOS";; openbsd) PRETTY_NAME="OpenBSD";; + openindiana) PRETTY_NAME="OpenIndiana";; opensuse) PRETTY_NAME="openSUSE";; oraclelinux) PRETTY_NAME="Oracle Linux";; popos) PRETTY_NAME="Pop!_OS";; @@ -209,6 +210,7 @@ function os_support() { lubuntu \ macos \ openbsd \ + openindiana \ opensuse \ oraclelinux \ popos \ @@ -489,6 +491,14 @@ function releases_openbsd(){ echo ${OBSD_RELEASES} } +function releases_openindiana(){ + echo 20230421 +} + +function editions_openindiana(){ + echo gui text minimal +} + function releases_opensuse(){ echo 15.0 15.1 15.2 15.3 15.4 microos tumbleweed } @@ -848,6 +858,9 @@ function make_vm_config() { openbsd) GUEST="openbsd" IMAGE_TYPE="iso";; + openindiana) + GUEST="solaris" + IMAGE_TYPE="iso";; reactos) GUEST="reactos" IMAGE_TYPE="iso";; @@ -886,6 +899,9 @@ EOF case ${OS} in alma|centos-stream|endless|nixos|oraclelinux|popos|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; + openindiana) + echo "boot=\"legacy\"" >> "${CONF_FILE}" + echo "disk_size=\"32G\"" >> "${CONF_FILE}";; batocera) echo "disk_size=\"8G\"" >> "${CONF_FILE}";; dragonflybsd|haiku|openbsd|netbsd|slackware|tails) @@ -1518,6 +1534,15 @@ function get_openbsd() { echo "${URL}/${ISO} ${HASH}" } +function get_openindiana(){ + local HASH="" + local ISO="" + local URL="" + URL="https://dlc.openindiana.org/isos/hipster/${RELEASE}" + ISO="OI-hipster-${EDITION}-${RELEASE}.iso" + HASH=$(wget -q -O- "${URL}/${ISO}.sha256" |cut -d' ' -f1) + echo "${URL}/${ISO} ${HASH}" +} function get_opensuse() { local HASH="" local ISO=""