Skip to content

Commit

Permalink
WSL2 "boards" wsl2-x86/wsl2-arm64 with current (6.1.y) and edge (…
Browse files Browse the repository at this point in the history
…6.6.y) kernels with Microsoft patches

> tl,dr: add 4 small-ish UEFI-like kernels, with Microsoft patches & fixes, for use with Microsoft WSL2 on x86/arm64 and 6.1.y/6.6.y

- the boards are UEFI derivatives, using a common `microsoft` vendor include to modify
  - `KERNELPATCHDIR`/`LINUXFAMILY` (for now, we don't want those patches in regular UEFI builds / .debs)
  - disable `EXTRAWIFI` (kernel is for a VM, will never have wifi so doesn't need any drivers)
  - `LINUXCONFIG`, so we can use Microsoft's own monolithic kernel, required for WSL2 (their initrd is a mistery)
- really, what we're mostly interested right now are the kernels (in the future we might have an "Armbian" WSL2 app in the Microsoft Store)
  - `current` `6.1.y`:
    - rebased from https://github.com/microsoft/WSL2-Linux-Kernel/tree/linux-msft-wsl-6.1.y onto real 6.1.y
    - using Microsoft's `.config` exactly (monolithic, there are no `=m`'s)
  - `edge` `6.6.y`:
    - also from https://github.com/microsoft/WSL2-Linux-Kernel/tree/linux-msft-wsl-6.1.y but rebased onto 6.6.y
    - using updated Microsoft's `.config` (monolithic, there are no `=m`'s)
    - dropped 2 of 6.1.y's patches that were actually upstreamed in the meantime:
      - `mm-page_reporting-Add-checks-for-page_reporting_order-param` - mainlined in https://lore.kernel.org/all/1664517699-1085-2-git-send-email-shradhagupta@linux.microsoft.com/
      - `hv_balloon-Add-support-for-configurable-order-free-page-reporting` - mainlined in https://lore.kernel.org/all/1664517699-1085-3-git-send-email-shradhagupta@linux.microsoft.com/
    - drop the `arm64: hyperv: Enable Hyper-V synthetic clocks/timers` patch, since it causes asm breakage on 6.6.y
      - a shame, but I tried and can't fix it myself - @kelleymh ?
    - add my own patch to fix:
      - `1709-drivers-hv-dxgkrnl-restore-uuid_le_cmp-removed-from-upstream-in-f5b3c341a.patch` due to https://lore.kernel.org/all/20230202145412.87569-1-andriy.shevchenko@linux.intel.com/ landing in 6.6
      - `1710-drivers-hv-dxgkrnl-adapt-dxg_remove_vmbus-to-96ec29396-s-reality-void-return.patch` to adapt to
        https://lore.kernel.org/all/TYCP286MB2323A93C55526E4DF239D3ACCAFA9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM/
  • Loading branch information
rpardini authored and igorpecovnik committed Nov 27, 2023
1 parent e6ee3e7 commit 204d2e7
Show file tree
Hide file tree
Showing 98 changed files with 70,635 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/boards/wsl2-arm64.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# aarch64 Windows Subsystem for Linux 2 (Hyper-V)
declare -g BOARD_NAME="WSL2 arm64"
declare -g BOARDFAMILY="uefi-arm64"
declare -g BOARD_MAINTAINER="rpardini"
declare -g KERNEL_TARGET="current,edge"

# Source vendor-specific configuration (common hooks for wsl2 - changes LINUXFAMILY etc)
source "${SRC}/config/sources/vendors/microsoft/wsl2.hooks.sh"
8 changes: 8 additions & 0 deletions config/boards/wsl2-x86.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# x86_64 Windows Subsystem for Linux 2 (Hyper-V)
declare -g BOARD_NAME="WSL2 x86"
declare -g BOARDFAMILY="uefi-x86"
declare -g BOARD_MAINTAINER="rpardini"
declare -g KERNEL_TARGET="current,edge"

# Source vendor-specific configuration (common hooks for wsl2 - changes LINUXFAMILY etc)
source "${SRC}/config/sources/vendors/microsoft/wsl2.hooks.sh"

0 comments on commit 204d2e7

Please sign in to comment.