码迷,mamicode.com
首页 > 系统相关 > 详细

在ubuntu上编译 wpa_supplicant-2.6

时间:2018-05-22 10:44:29      阅读:752      评论:0      收藏:0      [点我收藏+]

标签:wifi   wlan   

1.1 libnl-3.4.0
./configure --prefix=/home/fnie/wpa/out/libnl --disable-static
make
make check
make install
// to install the API documentation:
mkdir -vp /home/fnie/wpa/out/libnl/doc
tar -xf ../libnl-doc-3.4.0.tar.gz --strip-components=1 --no-same-owner -C /home/fnie/wpa/out/libnl/doc

1.2 libnl-1.1-stable
后面编译 wpa_supplicant-2.6 时报错,"can‘t find -lnl",所以编译 libnl-1.1-stable。
./configure --prefix=/home/fnie/wpa/out/libnl-1.1-stable
make
make check
make install
// to install the API documentation:
mkdir -vp /home/fnie/wpa/out/libnl/doc
tar -xf ../libnl-doc-3.4.0.tar.gz --strip-components=1 --no-same-owner -C /home/fnie/wpa/out/libnl/doc

  1. openssl
    ./config shared --prefix=/home/fnie/wpa/out/ssl/prefix --openssldir=/home/fnie/wpa/out/ssl/configuration
    make
    make test
    make install

  2. wpa_supplicant-2.6
    cd ~/wpa/wpa_supplicant-2.6/wpa_supplicant
    cp defconfig .config
    修改配置文件 .config,在"#Uncomment following two linee and fix..."下增加如下语句,用来添加openssl和libnl的头文件和库文件目录,更新编译链接环境变量:
    CFLAGS += -I/home/fnie/wpa/out/ssl/prefix/include
    CFLAGS += -I/home/fnie/wpa/out/libnl/include
    LIBS += -L/home/fnie/wpa/out/ssl/prefix/lib
    LIBS += -L/home/fnie/wpa/out/libnl/lib
    LIBS += -L/home/fnie/wpa/out/libnl-1.1-stable/lib
    LIBS_p += -L/home/fnie/wpa/out/ssl/prefix/lib

    执行 make 进行编译,成功后生成三个目标文件 wpa_supplicant, wpa_cli, wpa_passphrase 。

在ubuntu上编译 wpa_supplicant-2.6

标签:wifi   wlan   

原文地址:http://blog.51cto.com/frankniefaquan/2118934

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!