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@’.)
  • 相关阅读:
    6-2 播放厅模块基础环境构建
    6-1 Eureka实战之播放厅模块章节介绍
    5-18 影片模块作业思路讲解
    5-17 影院模块表现层构建
    5-16 影院模块基础环境构建
    5-15 影院模块表结构介绍
    5-14 影片模块整体测试
    5-13 影片保存实现
    5-12 影片保存准备
    5-11 影片详情查询实现
  • 原文地址:https://www.cnblogs.com/hugetong/p/6373369.html
Copyright © 2011-2022 走看看