Openssl工具移植
1.下载
ftp://ftp.openssl.org/source/old/0.9.x/
2. 解压
tar -xvf openssl-0.9.8za.tar.gz
4. 添加补丁
cd openssl-0.9.8za
cp ../wpa_supplicant-2.4/patches/openssl-0.9.8za-tls-extensions.patch ./
patch -p1 < openssl-0.9.8za-tls-extensions.patch
5.修改Makefile
./Configure linux-elf-arm -DB_ENDIAN linux:'arm-hisiv300-linux-gcc' shared --prefix=/home/float/share/wifi/ssl
6.编译
make
make install
1.下载
http://hostap.epitest.fi/wpa_supplicant/
2.解压
tar -xvf wpa_supplicant-2.4.tar.gz
3.修改编译配置文件
cp defconfig .config
vim .config
4编译
make
错误一:
../src/drivers/driver_nl80211.c:17:31: fatal error: netlink/genl/genl.h: No such file or directory
#include
^
compilation terminated.
Makefile:1758: recipe for target '../src/drivers/driver_nl80211.o' failed
安装库
sudo apt-get install libnl-dev
sudo apt-get install libpopt-dev
发现还是不行。手动下载安装库文件
http://www.infradead.org/~tgr/libnl/
安装库文件 参考: https://blog.csdn.net/u013286409/article/details/51355433
然后搜索genl.h文件,复制netlink目录到 ../src 目录下
cp /usr/local/arm/libnl1.1/include/netlink/ ./ -R
错误二:cannot find -lnl
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: cannot find -lnl
collect2: error: ld returned 1 exit status
Makefile:1622: recipe for target 'wpa_supplicant' failed
这个问题和上一个错误一样。都要手动连接一下库文件
vim .config
修改:
CC= arm-hisiv300-linux-gcc -L /home/float/share/wifi/ssl/lib -L /usr/local/arm/libnl1.1/lib
5.检查
float@ubuntu:~/share/wifi/wpa_supplicant-2.4/wpa_supplicant$ file wpa_supplicant
wpa_supplicant: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, not stripped
6.缩小文件
arm-hisiv300-linux-strip wpa_supplicant
arm-hisiv300-linux-strip wpa_cli