本文章记录ubuntu 编译vpp master代码
一、准备工作
安装gcc工具链
安装后查看版本
安装make 工具
安装git工具
二、以源码的方式编译vpp
1、下载VPP代码:git clone https://git.fd.io/vpp
2、通过make install-deps 安装编译需要依赖的库文件,在执行这个命令后,如下所示的工具和库文件将会被更新或者安装:主要是安装编译需要的工具、python包等等
The following NEW packages will be installed:
autoconf automake autopoint autotools-dev binfmt-support build-essential ccache check chrpath clang clang-14 clang-format-11 cmake cmake-data cpp-12 cscope curl dctrl-tools
debhelper debugedit dh-autoreconf dh-elpa-helper dh-python dh-strip-nondeterminism dkms dpkg-dev dwz exuberant-ctags fakeroot g++ g++-11 gcc-12 gettext git-review icu-devtools python3-distutils python3-filelock python3-jsonschema python3-lib2to3 python3-pip python3-pip-whl python3-platformdirs python3-ply python3-pygments python3-pyrsistent
python3-setuptools python3-setuptools-whl python3-venv python3-virtualenv python3-wheel python3-wheel-whl python3.10-dev python3.10-venv uuid-dev zlib1g-dev
3、通过make install-ext-deps安装额外需要的工具:
4、使用make build 编译debug版本的vpp
5、编译生成的二进制可执行文件和lib库路径:
6、运行vpp
./build-root/build-vpp_debug-native/vpp/bin/vpp -c startup.conf
三、配置文件配置
主要配置参数及意义如下所示: