zoukankan      html  css  js  c++  java
  • [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@’.)
  • 相关阅读:
    nyoj-68-三点顺序-计算几何
    zoj--1089--Lotto---DFS VS 暴力求解
    zoj----1090---The Circumference of the Circle---数学几何
    nyoj-阶乘0
    nyoj-回文字符串--动态规划
    nyoj-最长公共子序列---动态规划
    hdu-1285确定比赛名次---拓扑排序
    等式数量---hash算法
    学生学籍管理系统
    2020.2.9 解决Zabbix agent is not available&windows下安装zabbix-agent 主机部署监控
  • 原文地址:https://www.cnblogs.com/hugetong/p/6373369.html
Copyright © 2011-2022 走看看