freebsd网络协议栈Linux用户层移植
$ export MAKEOBJDIRPREFIX=${PWD%/*}/build
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=amd64 TARGET_ARCH=amd64 -n
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=amd64 TARGET_ARCH=amd64 kernel-toolchain -s -j4
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=amd64 TARGET_ARCH=amd64 KERNCONF=GENERIC NO_MODULES=yes buildkernel -s -j4
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=arm64 TARGET_ARCH=aarch64 -n
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=arm64 TARGET_ARCH=aarch64 kernel-toolchain -s -j4
$ ./tools/build/make.py --debug --cross-bindir=/usr/lib/llvm-15/bin TARGET=arm64 TARGET_ARCH=aarch64 KERNCONF=GENERIC NO_MODULES=yes buildkernel -s -j4
$ sudo apt-get install build-essential
$ sudo apt install meson ninja-build
$ sudo apt install libnuma-dev
$ mkdir build
$ meson build
$ ninja -C build
# 安装软件
sudo apt install doxygen graphviz python3 python3-pip libgtest-dev ninja-build
# 安装conan
pip3 install conan
export PATH=~/.local/bin/:$PATH
conan profile detect --force
conan install conanfile.txt --build=missing -s build_type=Debug
conan install conanfile.txt --build=missing -s build_type=Release
# 生成Release
cmake --preset conan-release
# 配置编译
cmake -B build -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="build/Release/generators/conan_toolchain.cmake" -DCMAKE_BUILD_TYPE="Release"
# 执行编译
cmake --build build --config Release/Debug/RelWithDebInfo
# 执行测试
ctest -C Release/Debug/RelWithDebInfo