I built and configured a kernel in WSL2 (wsl-5.4.91, gcc 9.4.0, Ubuntu 18.04 WSL)
While installing MLNX_OFED I get the error that there are no files in the lib/modules//build/scripts.
I there an easy way to copy the scripts in there?
I read this but didn't get far: https://unix.stackexchange.com/questions/594470/wsl-2-does-not-have-lib-modules
Here is how I got there:
home/thilo/MLNX_OFED_LINUX-5.4-1.0.3.0-ubuntu18.04-x86_64# ./mlnxofedinstall --add-kernel-support
but I got the following error:
ERROR: Failed executing "MLNX_OFED_SRC-5.4-1.0.3.0/install.pl --tmpdir /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127_logs --kernel-only --kernel 5.4.91-MS-new-WSL2+ --kernel-sources /lib/modules/5.4.91-MS-new-WSL2+/build --builddir /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127 --without-dkms --without-debug-symbols --build-only --distro ubuntu18.04" ERROR: See /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127_logs/mlnx_ofed_iso.127.log Failed to build MLNX_OFED_LINUX for 5.4.91-MS-new-WSL2+
Opening the mlnx_ofed_iso.127 file to see for the error
Logs dir: /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127_logs/OFED.326.logs
General log file: /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new WSL2+/mlnx_iso.127_logs/OFED.326.logs/general.log [32m
Below is the list of OFED packages that you have chosen
(some may have been added by the installer due to package dependencies): [0m ofed-scripts mlnx-tools mlnx-ofed-kernel-utils mlnx-ofed-kernel-modules iser-modules isert-modules srp-modules mlnx-nvme-modules kernel-mft-modules knem-modules
Checking SW Requirements...
[31mOne or more required packages for installing OFED-internal are missing.[0m
[31m/lib/modules/5.4.91-MS-new-WSL2+/build/scripts is required for the Installation.[0m
[31mAttempting to install the following missing packages: python3-distutils dh-python make dh-autoreconf chrpath linux-headers-5.4.91-MS-new-WSL2+ dpatch swig build-essential bzip2 debhelper graphviz quilt python3 pkg-config gcc[0m
[31mFailed command: apt-get install -y python3-distutils dh-python make dh-autoreconf chrpath linux-headers-5.4.91-MS-new-WSL2+ dpatch swig build-essential bzip2 debhelper graphviz quilt python3 pkg-config gcc[0m