Help us understand the problem. What is going on with this article?

Raspberry Piで、hostapd 2.6 を野良ビルド

More than 1 year has passed since last update.

hostapdを入手

$ git clone git://w1.fi/hostap.git
$ cd hostap
$ git checkout hostap_2_6 

パッチを入手 (Dirの場所は適宜読み替えて)

$ cd ..
$ git clone https://github.com/pritambaral/hostapd-rtl871xdrv.git

パッチを当てる (Dirの場所は適宜読み替えて)

$ cd hostap/hostapd
$ patch -Np1 ../../hostapd-rtl871xdrv/rtlxdrv.patch
$ echo CONFIG_DRIVER_RTW=y >> hostapd/.config

ビルド準備 (これをあらかじめしていないと、ビルドエラーがでる)

$ sudo apt-get install libnl-dev libssl-dev

ビルドエラーの例

../src/drivers/driver_nl80211.c:17:31: fatal error: netlink/genl/genl.h: No such file or directory
 #include <netlink/genl/genl.h>
                               ^
compilation terminated.
Makefile:1036: recipe for target '../src/drivers/driver_nl80211.o' failed
make: *** [../src/drivers/driver_nl80211.o] Error 1
../src/crypto/tls_openssl.c:19:25: fatal error: openssl/ssl.h: No such file or directory
 #include <openssl/ssl.h>
                         ^
compilation terminated.
Makefile:1036: recipe for target '../src/crypto/tls_openssl.o' failed
make: *** [../src/crypto/tls_openssl.o] Error 1

終了後、バイナリをsbinへコピー

$ sudo cp hostapd /usr/sbin
$ sudo cp hostapd_cli /usr/sbin
mbamba
気が向くままに、Open Sourceを触った記録を、ここにまとめています。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away