Skip to content

Instantly share code, notes, and snippets.

@Nislaco
Nislaco / build.sh
Last active February 7, 2025 03:09
Build script for Fedora 41 / WSL module
#!/bin/bash -e
BRANCH=linux-msft-wsl-6.6.y
DXBRANCH=main
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
sudo dnf install -y git dkms curl kernel-tools kernel-devel kernel-headers dwarves
@Nislaco
Nislaco / build.sh
Created February 6, 2025 21:08
build script for WSL dxgkrnl kernel mod for debian trixie on 6.12 for Hyper-V
#!/bin/bash -e
BRANCH=linux-msft-wsl-6.6.y
DXBRANCH=main
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms curl dwarves linux-source-6.12 linux-headers-amd64
@Nislaco
Nislaco / build.sh
Last active February 6, 2025 21:05
Working build script for WSL kernel module for 6.12.9+bpo-amd64
#!/bin/bash -e
BRANCH=linux-msft-wsl-6.6.y
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms curl dwarves linux-source-6.12
$username="username"
$ip="ip"
ssh ${username}@${ip} "mkdir -p ~/wsl/drivers; mkdir -p ~/wsl/lib;"
(Get-CimInstance -ClassName Win32_VideoController -Property *).InstalledDisplayDrivers | Select-String "C:\\Windows\\System32\\DriverStore\\FileRepository\\[a-zA-Z0-9\\._]+\\" | foreach {
$l=$_.Matches.Value.Substring(0, $_.Matches.Value.Length-1)
scp -r $l ${username}@${ip}:~/wsl/drivers/
}
@Nislaco
Nislaco / build.sh
Last active January 31, 2025 01:52
Build script for dxgkrnl kernel module from WSL linux-msft-wsl-6.6.y for Debian Trixie guest on Hyper-V for GPU-PV
#!/bin/bash -e
BRANCH=linux-msft-wsl-6.6.y
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms curl
@Nislaco
Nislaco / build.sh
Last active July 29, 2024 16:55
Build script for dxgkrnl kernel module from WSL linux-msft-wsl-5.15.y for Debian 12 Bookworm guest on Hyper-V for GPU-PV
#!/bin/bash -e
BRANCH=linux-msft-wsl-5.15.y
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms
@Nislaco
Nislaco / build.sh
Last active July 29, 2024 17:24
Build script for dxgkrnl module from WSL2-Linux-Kernel 6.6y for Debian 12 Bookworm guest. For GPU-PV passthrough on Hyper-V
#!/bin/bash -e
BRANCH=linux-msft-wsl-6.6.y
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms curl
cd /tmp
@Nislaco
Nislaco / build.sh
Last active July 27, 2024 20:23
Build script for WSL2-Linux-Kernel 5.15y for Ubuntu LTS guest
#!/bin/bash -e
BRANCH=linux-msft-wsl-5.15.y
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms
@Nislaco
Nislaco / build.sh
Last active January 29, 2025 22:45
Ubuntu LTS dxgkrnl 6.6.y script
#!/bin/bash -e
BRANCH=linux-msft-wsl-6.6.y
if [ "$EUID" -ne 0 ]; then
echo "Swithing to root..."
exec sudo $0 "$@"
fi
apt-get install -y git dkms
@Nislaco
Nislaco / mingw-copy-deps.sh
Last active September 6, 2020 16:15 — forked from h0tw1r3/mingw-copy-deps.sh
Recursively copy windows binary (dll/exe) dependencies from a sysroot (mingw toolchain) to the binaries directory.
#!/usr/bin/env bash
#
# Copyright: © 2015 Jeffrey Clark <https://github.com/h0tw1r3/>
# License: GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
#
set -o errtrace
error() {
echo "ERROR in $0 : line $1 exit code $2"
exit $2