From ad680c0e2091f35fe273a54ddd9bcd8b257e3aef Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 10 Oct 2024 23:40:43 +0200 Subject: [PATCH 1/2] fix: Workaround Virtio GPU driver bug --- src/install.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/install.sh b/src/install.sh index cf9cac1eb..99f3f612c 100644 --- a/src/install.sh +++ b/src/install.sh @@ -701,9 +701,6 @@ addDriver() { "winvista"* ) [[ "${driver,,}" == "viorng" ]] && return 0 ;; - "win11x64"* | "win2025"* ) - [[ "${driver,,}" == "viogpudo" ]] && return 0 - ;; esac local dest="$path/$target/$driver" @@ -714,9 +711,10 @@ addDriver() { addDrivers() { - local file="$1" - local index="$2" - local version="$3" + local src="$1" + local file="$2" + local index="$3" + local version="$4" local msg="Adding drivers to image..." info "$msg" && html "$msg" @@ -740,7 +738,6 @@ addDrivers() { addDriver "$version" "$drivers" "$target" "smbus" addDriver "$version" "$drivers" "$target" "qxldod" addDriver "$version" "$drivers" "$target" "viorng" - addDriver "$version" "$drivers" "$target" "viomem" addDriver "$version" "$drivers" "$target" "viostor" addDriver "$version" "$drivers" "$target" "NetKVM" addDriver "$version" "$drivers" "$target" "Balloon" @@ -751,6 +748,16 @@ addDrivers() { addDriver "$version" "$drivers" "$target" "vioserial" addDriver "$version" "$drivers" "$target" "qemupciserial" + case "${version,,}" in + "win11x64"* | "win2025"* ) + # Workaround Virtio GPU driver bug + local dst="$src/\$OEM\$/\$\$/Drivers" + mkdir -p "$dst" + ! cp -a "$dest/." "$dst" && return 1 + rm -rf "$dest/viogpudo" + ;; + esac + if ! wimlib-imagex update "$file" "$index" --command "add $dest /$target" >/dev/null; then return 1 fi @@ -772,10 +779,10 @@ addFolder() { local msg="Adding OEM folder to image..." info "$msg" && html "$msg" - local dest="$src/\$OEM\$/\$1/" + local dest="$src/\$OEM\$/\$1/OEM" mkdir -p "$dest" - ! cp -r "$folder" "$dest" && return 1 + ! cp -a "$folder/." "$dest" && return 1 local file file=$(find "$dest" -maxdepth 1 -type f -iname install.bat | head -n 1) @@ -824,7 +831,7 @@ updateImage() { index="2" fi - if ! addDrivers "$wim" "$index" "$DETECTED"; then + if ! addDrivers "$src" "$wim" "$index" "$DETECTED"; then error "Failed to add drivers to image!" && return 1 fi From 8af501f4a9670e95b7f974df30852d7e51833e93 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 10 Oct 2024 23:42:47 +0200 Subject: [PATCH 2/2] fix: Workaround VirtIO display driver bug --- src/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/install.sh b/src/install.sh index 99f3f612c..7f87fd1c7 100644 --- a/src/install.sh +++ b/src/install.sh @@ -738,6 +738,7 @@ addDrivers() { addDriver "$version" "$drivers" "$target" "smbus" addDriver "$version" "$drivers" "$target" "qxldod" addDriver "$version" "$drivers" "$target" "viorng" + addDriver "$version" "$drivers" "$target" "viomem" addDriver "$version" "$drivers" "$target" "viostor" addDriver "$version" "$drivers" "$target" "NetKVM" addDriver "$version" "$drivers" "$target" "Balloon"