Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion vcan-in-wsl2/vcan-in-wsl2.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# update
sudo apt-get update

# required packages
sudo apt install -y libelf-dev dwarves flex bison libssl-dev \
libncurses-dev
libncurses-dev bc make build-essential

# The below few connamds will checkout the 1GB default kernel
git clone https://github.com/microsoft/WSL2-Linux-Kernel
Expand All @@ -20,11 +23,16 @@ make menuconfig
#build the kernel
make -j4

#make modules and install them
make modules
sudo make modules_install

# We'll need to store our custom kernel in the Windows environment and
# launch it when we start wsl2.
# Change the path below to where you want to store it
cp vmlinux /mnt/c/Users/<USER>/
cat >> /mnt/c/Users/<USER>/.wslconfig << "ENDL"
[wsl2]
kernel=C:\\Users\\<USER>\\vmlinux
ENDL

Expand Down