Skip to content

Commit

Permalink
docs(readme): add info and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Oct 3, 2023
1 parent efa7ca8 commit 2a5cd4b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- master
- feature/*
- hotfix/*
tags:
- linux-msft-wsl-*
pull_request: {}
workflow_call: {}

Expand Down
69 changes: 39 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
# Windows-WSL2-Kernel-build-script
## Build the latest released kernel from Microsoft's GitHub Page

### Purpose
- Build the latest Microsoft WSL2 kernel release to link to your current distros.

### Supported Distros:
- Ubuntu

#### Supported architecture
- x86_x64

### Install info
- Run the below command in your WSL window
```
wget -qO build-kernel https://wsl2.optimizethis.net; sudo bash build-kernel
```

- The new kernel will be located in the root build directory
- The filename will be: `vmlinux`
- Place the file `vmlinux` into a folder inside Windows `%USERPROFILE%`
- I placed mine into the folder I created called `%USERPROFILE%\WSL2\vmlinux`

- Create a file called `%USERPROFILE%\.wslconfig`

- Visit the below website for instructions on how to link the kernel to WSL2
- https://learn.microsoft.com/en-us/windows/wsl/wsl-config
- You can also check out my person script that I use as well for ideas.

My personal [.wslconfig](https://github.com/slyfox1186/windows-wsl2-kernel-build-script/blob/main/.wslconfig) file
# Custom WSL2 Linux Kernel

This repository is forked from the excellent [Windows WSL2 Kernel Build Script
repo by
slyfox1186](https://github.com/slyfox1186/windows-wsl2-kernel-build-script).

This project aims to use GitHub Actions Workflows to produce and publish
up-to-date, versioned custom builds of
[WSL2-Linux-Kernel](https://github.com/microsoft/WSL2-Linux-Kernel) with
[`HIDDEV`](https://docs.kernel.org/hid/hiddev.html) and
[`HIDRAW`](https://docs.kernel.org/hid/hidraw.html) enabled.

These custom kernels builds can be used to enable full Yubikey passthrough to
WSL2 using [`usbipd`](https://github.com/dorssel/usbipd-win), with full FIDO2
functionality.

The versioning scheme of this project matches the versioning scheme used by
WSL2-Linux-Kernel.

## Usage

- Download the custom kernel from the releases page
- Make sure you have saved all your work in all WSL2 instances
- Shutdown all WSL2 instances with `wsl --shutdown`
- Edit (or create) the ~/.wslconfig file on Windows
- Specify the path to the custom kernel

```ini
# For example...
[wsl2]
kernel=C:\\Users\\YOUR_USERNAME\\Downloads\\vmlinux
```

- Start a WSL2 instance
- Check that the kernel is running with `uname -sr`

```
Linux 5.15.123.1-lgug2z-custom-WSL2
```

0 comments on commit 2a5cd4b

Please sign in to comment.