WSL Debian Setup
Windows Subsystem for Linux configuration for OpenPower FPGA development.
Install WSL with Debian
# Run in PowerShell (Admin)
wsl --install -d Debian
wsl --set-default-version 2
Reboot when prompted.
Configure WSL
1. Set Resource Limits
Create %UserProfile%\.wslconfig:
[wsl2]
memory=16GB
processors=8
swap=8GB
Restart WSL:
wsl --shutdown
2. Update Debian
sudo apt update && sudo apt upgrade -y
3. Install Development Tools
sudo apt install -y \
build-essential git cmake curl wget \
python3 python3-pip python3-venv \
device-tree-compiler bison flex \
libssl-dev libncurses-dev \
screen minicom \
usbutils
USB Device Passthrough (FPGA Programmers)
Install usbipd (Windows PowerShell)
winget install --id=dorssel.usbipd-win
Attach FPGA Device
# List devices
usbipd list
# Attach (replace BUSID with your device)
usbipd bind --busid 1-4
usbipd attach --wsl --busid 1-4
Verify in WSL
lsusb | grep Xilinx
X11 for Vivado GUI (Optional)
1. Install X Server (Windows)
Download VcXsrv or X410 from Microsoft Store.
2. Configure WSL
Add to ~/.bashrc:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
export LIBGL_ALWAYS_INDIRECT=1
Reload:
source ~/.bashrc
3. Test
sudo apt install -y x11-apps
xclock
File System Performance
Store projects in WSL filesystem, not /mnt/c/
# Good (fast)
~/projects/microwatt
# Bad (slow)
/mnt/c/Users/YourName/projects/microwatt
Vivado Installation Path
Install in WSL filesystem:
/opt/Xilinx/Vivado/2025.1
Not in /mnt/c/ - performance will be poor.
Verification
# Check WSL version
wsl --version
# Inside WSL
uname -a # Should show Linux kernel 5.10+
nproc # Check CPU count
free -h # Check memory
Common Issues
“WSL not found”
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
USB device not appearing:
- Ensure usbipd is running
- Check Windows firewall
- Try
usbipd attach --wsl --auto-attach --busid X-X
Slow file access:
- Move projects from
/mnt/c/to~/projects/