一、准备工具:
iw.tar.bz2:
libnl:
~tgr/libnl/
二、交叉编译libnl
-
./configure --prefix=./install/ CC=arm-linux-gcc --host=arm
-
make
-
make instal
三、进入iw目录
-
export PKG_CONFIG_PATH=./install/lib/pkgconfig:$PKG_CONFIG_PATH
-
make CC=arm-linux-gcc
四、生成iw命令
五、如果出现
libnl-3.2.21/install/lib/libnl-3.a(socket.o): In function `nl_write_lock':
libnl-3.2.21/lib/../include/netlink-private/netlink.h:237: undefined reference to `pthread_rwlock_wrlock'
及如下错误
install/lib/libnl-3.a(utils.o): In function `nl_prob2int':
libnl-3.2.21/lib/utils.c:392: undefined reference to `rint'
collect2: ld returned 1 exit status
解决方法:
修改iw-3.7/Makefile
增加LDFLAGS += -lpthread -lm
阅读(2201) | 评论(0) | 转发(0) |