Compiling -HEAD wifi code on -10 or -9

It's possible to run net80211/ath/iwn from -HEAD on -10 or -9. It can't be run on -8 because of an API change - you would also have to compile up ifconfig, wpa_supplicant, hostapd.

First, check out my build scripts:

$ svn checkout https://freebsd-wifi-build.googlecode.com/svn/trunk

Next, you need a built kernel. You need to disable all of the wireless stack and drivers so you can build them as modules. This includes the USB wireless drivers!

However, you must leave the wireless driver/stack options in there. The options are placed into opt_xxx.h files in the kernel build directory.

Note down the kernel build directory, you'll need it later!

Next, check out the wifi code. You do NOT want to check out all of HEAD as the include directories will pick up net/netinet from the HEAD checkout, not the target directory checkout.

$ svn checkout --depth=empty svn://svn.freebsd.org/base/head head/src
$ mkdir head/modules
$ cd head/src
$ svn update --depth=empty sys
$ cd sys
$ svn update --depth=empty dev modules
$ svn update crypto net80211
$ cd modules
$ svn update ath iwn wlan wlan_amrr wlan_rssadapt wlan_wep wpi ath_pci bwn mwl wi wlan_acl wlan_ccmp wlan_tkip wlan_xauth
$ cd ../dev
$ svn update ath bwi bwn iwi iwn mwl wi wpi

Next, put a script in modules, called 'build', which will build said modules:

X_KERNDIR="/home/adrian/work/freebsd/head/obj/usr/home/adrian/work/freebsd/head/src/sys/LUCY_11_i386/" ; export X_KERNDIR
X_SRCDIR="/home/adrian/work/freebsd/head/src/" ; export X_SRCDIR

/home/adrian/work/freebsd-wifi-build/svn/freebsd-wifi-build/scripts/build_modules/build_modules $*

Note that you should fix your paths above!

Finally, just run the build script:

$ ./build clean all install

Finally, the modules in your 'head/modules' directory can be copied into /boot/kernel/ .

AdrianChadd/HeadWifiOn9 (last edited 2013-10-31T01:23:11+0000 by AdrianChadd)