Hostapd-0.8.x移植到ARM Linux

日期: 2013.7.30  作者:杨正 QQ:1209758756   Email:[email protected]

 

开发环境:

 

       Linux-3.0

 

目标环境:

 

       Fl2440

 

移植步骤:

 

注:在做移植hostapd之前先要移植openssllibnl,参考文档:

openssl-0.9.8e的移植

libnl的移植

 

1、下载hostapd的源代码包,并解压缩:

[lingyun@localhost wireless]$ wget http://hostap.epitest.fi/releases/hostapd-0.7.3.tar.gz

[lingyun@localhost wireless]$ tar -zxf hostapd-0.7.3.tar.gz

[lingyun@localhost wireless]$ cd hostapd-0.7.3

[lingyun@localhost hostapd-0.7.3]$ ls

COPYING  hostapd  patches  README  src

 

2、进入hostapd目录修改配置文件:

[lingyun@localhost hostapd]$ cp defconfig .config

[lingyun@localhost hostapd]$ vim .config

 # Driver interface for Host AP driver

CONFIG_DRIVER_HOSTAP=y

CROSS=/opt/buildroot-2012.08/arm920t/usr/bin/arm-linux-

OPENSSL_PATH=/home/lingyun/yangzheng/wireless

PRJ_TOP=/home/lingyun/yangzheng/wireless

 CC=${CROSS}gcc

CFLAGS+=-I${OPENSSL_PATH}/openssl_install/include

LDFLAGS+=-L${OPENSSL_PATH}/openssl_install/lib -lssl

 # Driver interface for wired authenticator

#CONFIG_DRIVER_WIRED=y

 # Driver interface for madwifi driver

#CONFIG_DRIVER_MADWIFI=y

#CFLAGS += -I../../madwifi # change to the madwifi source directory

 # Driver interface for drivers using the nl80211 kernel interface

CONFIG_DRIVER_NL80211=y

LIBNL=${PRJ_TOP}/libnl_install

CFLAGS += -I${LIBNL}/include/

LIBS += -L${LIBNL}/lib

 

# Wi-Fi Protected Setup (WPS)

CONFIG_WPS=y

# Enable UPnP support for external WPS Registrars

 

# IEEE 802.11n (High Throughput) support

CONFIG_IEEE80211N=y

 

# a file that usually has extension .p12 or .pfx)

#CONFIG_PKCS12=y

 

# Build IPv6 support for RADIUS operations

#CONFIG_IPV6=y

 

 [lingyun@localhost hostapd]$ make    //make之后遇到的问题,原因是库文件的路径没有设对,上面的做法是修改后的结果!!能成功编译的!!!

../src/drivers/driver_nl80211.c:22:31: fatal error: netlink/genl/genl.h: No such file or directory

compilation terminated.

make: *** [../src/drivers/driver_nl80211.o] Error 1

 

make成功之后,得到以下两个文件:

[lingyun@localhost hostapd]$ /opt/buildroot-2012.08/arm920t/usr/bin/arm-linux-strip hostapd

[lingyun@localhost hostapd]$ ls

***hostapd ** *hostapd_cli***

3、将hostpad和hostapd_cli拷贝至开发板/apps下

4、开发板上执行./hostapd –v,输出版本信息,表示移植成功 ,执行前先要赋予它可执行的权限:

>: chmod 775 hostapd

>: ./hostapd –v  或者在主目录下执行/apps/hostapd –v也行

hostapd v0.7.3

User space daemon for IEEE 802.11 AP management,

IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator

Copyright (c) 2002-2010, Jouni Malinen <[email protected]> and contributors

 

 

参考文献:http://blog.csdn.net/hinyunsin/article/details/6029749

 

你可能感兴趣的:(wifi,AP,hostapd)