您的位置:首页 > 其它

hostapd移植步骤

2017-02-23 15:11 232 查看
1、首先从官网上下载

git clone git://w1.fi/srv/git/hostap.git


2、进入cd hostapd-2.0/hostapd

3、cp defconfig .config

4、修改Makefile

vim  Makefile

修改CC=arm-linux-gcc

5、修改.config

vim .config

#CONFIG_LIBNL32=y  把#去掉

6、make

7、出错,在.config 加

CONFIG_DRIVER_NL80211=y

CONFIG_LIBNL32=y

CFLAGS += -I/home/ke/work/AP/libnl-3.2.25/tmp/include/libnl3

LIBS += -L/home/ke/work/AP/libnl-3.2.25/tmp/lib

CFLAGS += -I/home/ke/work/AP/openssl-1.1.0e/tmp/include

LIBS += -L/home/ke/work/AP/openssl-1.1.0e/tmp/lib

8、输入make进行编译。

如果出现如下错误提示:

Package libnl-3.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `libnl-3.0.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libnl-3.0' found

则需要将libnl-3.0.pc所在目录添加到PKG_CONFIG_PATH变量中,先用如下命令查看所在目录:

# find / -name "libnl-3.0.pc"

./work/AP/libnl-3.2.25/tmp/lib/pkgconfig/libnl-3.0.pc

然后添加到PKG_CONFIG_PATH变量,命令如下:

export PKG_CONFIG_PATH=~/work/AP/libnl-3.2.25/tmp/lib/pkgconfig/libnl-3.0.pc/:$PKG_CONFIG_PATH

/********************************************************************************/

出错要的include及用到的lib
http://www.openssl.org/source/
tar xzf openssl-1.0.1d.tar.gz

cd openssl-1.0.1d/

 ./Configure shared no-asm --prefix=$PWD/tmp linux-elf

如果有出错,打开vim Makefile查看是不是正确的交叉编译器

这个是配置后./Configure shared no-asm --prefix=$PWD/tmp linux-elf正确的

PLATFORM=linux-elf

CROSS_COMPILE= /opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-

MAKEDEPEND=/opt/FriendlyARM/toolchain/4.9.3/bin/arm-linux-gcc

make  && make install
http://www.infradead.org/~tgr/libnl/
libnl-3.2.25.tar.gz

tar xzf libnl-3.2.25.tar.gz

./configure --host=arm-linux --prefix=$PWD/tmp

make && make install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: