I've never attempted this, so my knowledge on the subject is limited. I'll learn at the same time you do.
You took your first question out of context. let's view it as the instructions put it:
Quote:
Hostapd
Hostapd is a userspace daemon that handles the configuration, association etc for WLAN Access Points.
[edit]
Get the latest version of hostapd
* git clone git://w1.fi/srv/git/hostap.git
* cd hostap/hostapd
* cp defconfig .config
* edit .config to CONFIG_DRIVER_NL80211=y and CFLAGS += -I#WHERE YOUR KERNEL HEADERS ARE#
* make
|
You first need git installed, so enter this command.
Code:
sudo apt-get install git git-core
Then you need to download the source code of hostapd, using git:
Code:
git clone git://w1.fi/srv/git/hostap.git
This will create a folder in your home directory named hostap. There is a filed named defconfig in the folder hostapd. It wants you to copy it as a file named .config:
Code:
cd ~/hostap/hostapd
Code:
cp defconfig .config
Putting a dot in front of the config file makes it hidden, so you will need to go to the "View" settings of the file browser and select "Show Hidden Files". It says to then edit the .config file.
Quote:
|
edit .config to CONFIG_DRIVER_NL80211=y and CFLAGS += -I#WHERE YOUR KERNEL HEADERS ARE#
|
So install the kernel headers first.
Code:
sudo apt-get install linux-headers-`uname -r`
They should install in the /usr/source/ folder. The uname -r section of the command is surrounded by backticks (`). Then open the file for editing.
For me, the headers are in this folder:
/usr/src/linux-headers-2.6.28-13-generic
There already is a section for the nl80211, but it is commented out:
Code:
# Driver interface for drivers using the nl80211 kernel interface
#CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be
# shipped with your distribution yet. If that is the case, you need to build
# newer libnl version and point the hostapd build to use it.
#LIBNL=/usr/src/libnl
#CFLAGS += -I$(LIBNL)/include
#LIBS += -L$(LIBNL)/lib
According to the instructions, I would edit it to this:
Code:
# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be
# shipped with your distribution yet. If that is the case, you need to build
# newer libnl version and point the hostapd build to use it.
#LIBNL=/usr/src/libnl
CFLAGS += -I/usr/src/linux-headers-2.6.28-13-generic
#LIBS += -L$(LIBNL)/lib
I then ran this command:
It started out OK, but then exited because of errors. The first several errors were these.
Code:
../src/drivers/driver_nl80211.c:23:31: warning: netlink/genl/genl.h: No such file or directory
../src/drivers/driver_nl80211.c:24:33: warning: netlink/genl/family.h: No such file or directory
../src/drivers/driver_nl80211.c:25:31: warning: netlink/genl/ctrl.h: No such file or directory
I would assume that I am missing something. Maybe the .config file had a clue, because the original said to install a recent version of libnl, which has something to do with netlink. You may notice that my error has to do with netlink, so this seems to be the problem. I have libnl1-1.1-3 installed in /usr/lib, so I edited the .config file to look like this:
Code:
# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be
# shipped with your distribution yet. If that is the case, you need to build
# newer libnl version and point the hostapd build to use it.
#LIBNL=/usr/src/libnl
#CFLAGS += -I$(LIBNL)/include
LIBS += -L$(LIBNL)/usr/lib
CFLAGS += -I/usr/src/linux-headers-2.6.28-13-generic
But this didn't work either.
I'm not sure where to go with this. You could try getting the libnl source and uncomment that part of the .config file.
It's Friday and I'm going to drink some beer!