This project tree is meant to exercise and test the OS-agnostic portions of the framework.
As described in the main project README
, a C++ 20 compiler and CMake are required. So, any distribution satisfying these requirements may be used. A known working environment is ubuntu 23.10 (mantic) with a few development packages. Instructions for setting up this environment are provided below.
If development on Windows is desired, ubuntu may be installed in WSL using a rootfs image. To install WSL, on newer versions of Windows 11, use the following command: wsl --install --no-distribution
. For complete instructions, refer to https://learn.microsoft.com/en-us/windows/wsl/install. Then follow these steps to install mantic on WSL:
-
Download the ubuntu 23.10 wsl rootfs archive https://cloud-images.ubuntu.com/wsl/mantic/current/ubuntu-mantic-wsl-amd64-wsl.rootfs.tar.gz.
-
Choose a location to store the WSL ubuntu filesystem image. A good way to keep organized is to use a top-level directory for all wsl filesystem images such as
c:\wsl
, then add a sub-directory for each distribution installed, such asc:\wsl\mantic
,c:\wsl\fedora35
, etc. It's also recommended to do this on a non-system drive if one is available for performance reasons. -
Start an elevated command-prompt, and enter the following series of commands:
mkdir c:\wsl\mantic
wsl --import mantic c:\wsl\mantic c:\users\myusername\Downloads\ubuntu-mantic-wsl-amd64-wsl.rootfs.tar.gz
wsl -d mantic
- You are now running in a root shell on a fresh ubuntu 23.10 installation. Set up a non-root user to use by default:
adduser mycoolusername
# <accept all defaults by successively hitting 'Enter', and set a password>
usermod -G sudo mycoolusername
# install an editor if you don't like the ones pre-installed (vi and nano are available out of the box)
- Create the file
/etc/wsl.conf
(need sudo), and save the following contents to it:
[user]
default=mycoolusername
- Exit ubuntu:
exit
- Shutdown WSL so it can pick up the new default user changes, and re-run ubuntu:
wsl --shutdown
wsl -d mantic
You should now be logged on as mycoolusername
.
Execute the following commands in a shell:
sudo apt update
sudo apt-get install -y build-essential git ninja-build clang clang-format clang-tidy llvm lldb gnupg gdb zip unzip tar curl pkg-config wget
The above will install all the tools required to compile, lint, and debug the project. If hostapd will also be compiled (git://w1.fi/hostap.git), install the following additional development dependencies:
sudo apt-get install -y libnl-3-dev libssl-dev libwpa-client-dev libnl-genl-3-dev
Download and install docker from https://docs.docker.com/desktop/install/windows-install (amd64). During the installation, ensure the Use WSL 2 instead of Hyper-V (recommended)
box is checked.