hostapd移植步骤

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




  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值