我们都知道在高一点版本的PC的Linux中,一般都带有wpa_supplicant,校内网一般用这个登录,并且使用802.1x协议,今天就讲802.1x如何在mini2440中移植。
另外,这篇文章的很多部分借鉴了
http://blog.chinaunix.net/space.php?uid=12873540&do=blog&id=2912747这篇文章,并在这篇文章的基础上更新了详细的步骤,并且解决了这篇文章中没有提到的很多问题
1下载wpa_supplicant,在
http://hostap.epitest.fi/wpa_supplicant/
下载后解压
2修改Makefile
将wpa_supplicant-0.7.3/wpa_supplicant下的Makefile中
ifndef CC
CC=gcc
Endif
改为arm-linux-gcc
3再修改同一目录下defconfig文件.
山东大学的认证是用md5方式,将defconfig中除CONFIG_EAP_MD5=y外的其他CONFIG_EAP_xx去掉,因为,其他方式可能需要有相关的库,如tls就需要libtls.so库,为了编译方便,将用不到的尽量不要,免得编译时出错
# EAP-MD5
CONFIG_EAP_MD5=y //只保留这个,别的都注释掉
# EAP-MSCHAPv2
CONFIG_EAP_MSCHAPV2=y
# EAP-TLS
CONFIG_EAP_TLS=y
# EAL-PEAP
CONFIG_EAP_PEAP=y
# EAP-TTLS
CONFIG_EAP_TTLS=y
# EAP-GTC
CONFIG_EAP_GTC=y
# EAP-OTP
CONFIG_EAP_OTP=y
# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
#CONFIG_EAP_SIM=y
# EAP-PSK (experimental; this is _not_ needed for WPA-PSK)
#CONFIG_EAP_PSK=y
# EAP-PAX
#CONFIG_EAP_PAX=y
# LEAP
CONFIG_EAP_LEAP=y
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
#CONFIG_EAP_AKA=y
# EAP-SAKE
#CONFIG_EAP_SAKE=y
# EAP-GPSK
#CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
#CONFIG_EAP_GPSK_SHA256=y
然后执make就ok了,这时候我出现了错误:
../src/crypto/crypto_openssl.c:16:30: warning: openssl/opensslv.h: No such file or directory
../src/crypto/crypto_openssl.c:17:25: warning: openssl/err.h: No such file or directory
../src/crypto/crypto_openssl.c:18:25: warning: openssl/des.h: No such file or directory
../src/crypto/crypto_openssl.c:19:25: warning: openssl/aes.h: No such file or directory
../src/crypto/crypto_openssl.c:20:24: warning: openssl/bn.h: No such file or directory
../src/cryp