Skip to content

Commit abff357

Browse files
Mitchell Levychessturo
authored andcommitted
Move modules_install into its own command
1 parent 6d68d42 commit abff357

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ as follows:
3535

3636
3. 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

4242
4. 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

5151
7. 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

5454
8. Convert the img to VHDX:
5555
`qemu-img convert -O VHDX "$PWD/modules.img" "$PWD/modules.vhdx"`

0 commit comments

Comments
 (0)