File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ as follows:
3535
36363 . Build the kernel using the WSL2 kernel configuration and put the modules in a ` modules `
3737 folder under the current working directory:
38- ` $ make KCONFIG_CONFIG=Microsoft/config-wsl MODLIB ="$PWD/modules" `
38+ ` $ make KCONFIG_CONFIG=Microsoft/config-wsl && make INSTALL_MOD_PATH ="$PWD/modules" modules_install `
3939
40- You may wish to include ` -j$(nproc) ` to build in parallel.
40+ You may wish to include ` -j$(nproc) ` on the first ` make ` command to build in parallel.
4141
42424 . Calculate the modules size (plus 1024 bytes for slack):
4343 ` modules_size=$(du -s "$PWD/modules" | awk '{print $1;}'); modules_size=$((modules_size + 1024)); `
@@ -49,7 +49,7 @@ as follows:
4949 ` lo_dev=$(losetup --find --show "$PWD/modules.img"); mkfs -t ext4 $lo_dev; sudo mount $lo_dev "$PWD/modules_img" `
5050
51517 . Copy over the modules, unmount the img now that we're done with it:
52- ` cp -r "$PWD/modules" "$PWD/modules_img"; sudo umount "$PWD/modules_img" `
52+ ` cp -r "$PWD/modules/lib/modules/$(make -s kernelrelease) " "$PWD/modules_img"; sudo umount "$PWD/modules_img" `
5353
54548 . Convert the img to VHDX:
5555 ` qemu-img convert -O VHDX "$PWD/modules.img" "$PWD/modules.vhdx" `
You can’t perform that action at this time.
0 commit comments