wpa_supplicant-2.6源码交叉编译

源码下载官网:

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


openssl编译:
./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


wpa_supplicant源码:
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

你可能感兴趣的:(交叉编译,源码,wpa_supplicant)