[dpdk] SDK编译-简单扼要版
0. 前提:
環境是CentOS7,archlinux編譯有問題,不知道卻什么。
1. 解壓:
[root@dpdk dpdk]# tar Jxf dpdk-2.2.0.tar.xz
2. 設置環境變量
[root@dpdk dpdk-2.2.0]# export RTE_SDK=/root/src/thirdparty/dpdk/dpdk-2.2.0
[root@dpdk dpdk-2.2.0]# export RTE_TARGET=x86_64-native-linuxapp-gcc
[root@dpdk dpdk-2.2.0]# export |grep RTE
declare -x RTE_SDK="/root/src/thirdparty/dpdk/dpdk-2.2.0"
declare -x RTE_TARGET="x86_64-native-linuxapp-gcc"
[root@dpdk dpdk-2.2.0]#
3. 配置
[root@dpdk dpdk-2.2.0]# make config T=$RTE_TARGET O=$RTE_TARGET
4. 編譯
[root@dpdk dpdk-2.2.0]# cd x86_64-native-linuxapp-gcc/
[root@dpdk x86_64-native-linuxapp-gcc]# make
5. 編譯DEBUG版本
?[root@okk x86_64-native-linuxapp-gcc]# make WERROR_CFLAGS='-O0 -g' D=y V=y
6. 完
7. update @ 20170727
在16.04上,貌似還不支持 WERROR_CFLAGS 選項
使用如下:
[root@T185 x86_64-native-linuxapp-gcc]# make EXTRA_CFLAGS="-g -O0" D=y V=y
?
8. update @ 20180410
安裝到指定目錄:
使用如下:
make install DESTDIR=myinstall prefix=/usr參考:https://dpdk.org/doc/guides/prog_guide/dev_kit_root_make_help.html#install-targets
DISTDIR:
If your installation step would normally install /usr/local/bin/foo and /usr/local/lib/libfoo.a, then an installation invoked as in the exampleabove would install /tmp/stage/usr/local/bin/foo and /tmp/stage/usr/local/lib/libfoo.a instead.
prefix:
A prefix used in constructing the default values of the variables listed below. The default value of prefix should be /usr/local.When building the complete GNU system, the prefix will be empty and /usr will be a symbolic link to /. (If you are using Autoconf,
write it as ‘@prefix@’.)
?
轉載于:https://www.cnblogs.com/hugetong/p/6373369.html
總結
以上是生活随笔為你收集整理的[dpdk] SDK编译-简单扼要版的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何一步一步用DDD设计一个电商网站(十
- 下一篇: Linux vim 快捷键