交叉编译hostapd的方法
2017-01-03 17:51
316 查看
在调试wifi的过程中,需要使用到其Ap模式。折腾许久,在这里将方法记录下来,供以后查阅。
1. 进入hostapd目录,打开 .config 文件,选择合适的驱动。此处我选择 nl80211 的模式。此时直接编译会出现错误的信息。
通过查阅资料发现需要 添加一个 libnl 的库。其2.0以上版本,API 接口有改变。这里下载了 libnl1.*.* 的库文件进行编译。
编译方法如下:
./configure --prefix=/home/anyone/wifi/libnl --host=arm-linux其中 --prefix指定编译好后make install的路径。
2 、make3、
make install
此时在libnl的文件夹下就可以看见include的头文件以及lib目录下的库文件。libnl编译完成。
接下来编译hostapd工具
进入hostapd的.config文件进行配置
CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be
# shipped with your distribution yet. If that is the case, you need to build
# newer libnl version and point the hostapd build to use it.
LIBNL=/your libnl path
CFLAGS += -I$(LIBNL)/include
LIBS += -L$(LIBNL)/lib
其中LIBNL变量表示你的libnl的文件地址。
make之后即可得到 hostapd的应用程序。hostapd程序编译成功。
1. 进入hostapd目录,打开 .config 文件,选择合适的驱动。此处我选择 nl80211 的模式。此时直接编译会出现错误的信息。
通过查阅资料发现需要 添加一个 libnl 的库。其2.0以上版本,API 接口有改变。这里下载了 libnl1.*.* 的库文件进行编译。
编译方法如下:
./configure --prefix=/home/anyone/wifi/libnl --host=arm-linux其中 --prefix指定编译好后make install的路径。
2 、make3、
make install
此时在libnl的文件夹下就可以看见include的头文件以及lib目录下的库文件。libnl编译完成。
接下来编译hostapd工具
进入hostapd的.config文件进行配置
CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be
# shipped with your distribution yet. If that is the case, you need to build
# newer libnl version and point the hostapd build to use it.
LIBNL=/your libnl path
CFLAGS += -I$(LIBNL)/include
LIBS += -L$(LIBNL)/lib
其中LIBNL变量表示你的libnl的文件地址。
make之后即可得到 hostapd的应用程序。hostapd程序编译成功。
相关文章推荐
- 制作交叉编译工具链的方法总结(详细)
- C++技巧:用kdevelop进行交叉编译的方法
- boost 1.48 for ARM 交叉编译方法
- 交叉编译库依赖问题的解决方法
- 为qt-embedded添加jpeg库的交叉编译方法for arm
- 关于在FC6中安装m68k-elf-tools交叉编译碰到的问题及解决方法
- 交叉编译 zlib 的方法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法(转)
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- qt交叉编译环境搭建方法
- 为qt-embedded添加jpeg库的交叉编译方法for arm
- 制作交叉编译工具链的方法总结
- 交叉编译的一般方法
- 用kdevelop进行交叉编译的方法
- mips上交叉编译opal3.10.1 configure错误“checking linkable PTLib ... not found” 的解决方法
- Windows+cygwin下构造arm-linux交叉编译环境最简单的方法
- 嵌入式Linux下常用的交叉编译方法
- 嵌入式平台arm linux 之qt 4.5交叉编译到webkit时出错解决方法
- 交叉编译 LIVE555 Streaming Media 的方法
- linux库文件的搜索方法,以及交叉编译的库搜索方法