平台:mips(mips-linux-gnu-gcc)
libnl库:libnl-3-dev(3.5.0)
官网:http://www.linuxfromscratch.org/blfs/view/svn/basicnet/libnl.html
之前hostapd不支持nl80211,现在想加入nl80211的支持
进入hostapd源码,打开.config,将CONFIG_DRIVER_NL80211打开
报
netlink/genl/genl.h: No such file or directory
这个先不理,netlink相关的include会在编译libnl库后出现,
直接移植libnl库
在官网下载libnl库源,
进入源码
1:
sudo ./configure --host=mips-linux-gnu --prefix=$(pwd)/__install --enable-static --enable-shared CC=/opt/mips-32/bin/mips-linux-gnu-gcc
其中–prefix=$(pwd)/__install指定了编译出来的库存放的路径,我一般将其放在当前目录下的__install目录下。注意,这里的编译器指定,必须使用绝对路径,否则会报错
可能出现:
configure: WARNING: bison not found. Please install before continuing.
configure: WARNING: flex not found. Please install before continuing.
configure: error: Required packages are missing. Please install them and rerun ./configure
解决方法:
sudo apt-get install bison
sudo apt-get install flex
配置成功后,看到如下输出
There have been some changes starting with 3.2 regarding where and how libnl
is being installed on the system in order to allow multiple l