[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 example 
above 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值