源码下载官网:
https://w1.fi/releases/
libnl-1.1.4交叉编译:
./configure CC=xx-gcc \--prefix=/home/xx/openspurce/wpa_s_2_6/opensrc/release \
--sysconfdir=/home/xxx/openspurce/wpa_s_2_6/opensrc/release --host=xxx --disable-static
其中,CC=交叉编译器, --host=编译适配主机的类型(在运行主机上通过uname -m查看)
make CC=xx-gcc
make install
./Configure linux-elf no-asm --prefix=/home/xx/openspurce/wpa_s_2_6/opensrc/release \
--openssldir=/home/xx/openspurce/wpa_s_2_6/opensrc/release \
--cross-compile-prefix=xx shared
其中,--cross-compile-prefix=交叉编译器
make CC=xx-gcc
make install
Makefile添加:
CFLAGS+=-I/home/xx/openspurce/wpa_s_2_6/opensrc/release/include/
LIBS += -L/home/xx/openspurce/wpa_s_2_6/opensrc/release/lib
LIBS_p += -L/home/xx/openspurce/wpa_s_2_6/opensrc/release/lib
LIBS_c += -L/home/xx/openspurce/wpa_s_2_6/opensrc/release/lib
cp defconfig .config(可配置编译选项)
make CC=xxx