hostapd / wpa_supplicant
------------------------

This directory contains patches and configuration
for hostapd/wpa_supplicant.
It also contains executable compiled for diniv6.

hostapd version
---------------

The version used is the commit 31b6eb417b7aa6bb1e1f1fb9704bffbc5b63258c of hostapd git

git clone http://w1.fi/hostap.git
cd hostap
git checkout 31b6eb417b7aa6bb1e1f1fb9704bffbc5b63258c

compilation
-----------

1. get and extract sources
> git clone http://w1.fi/hostap.git
> cd hostap
> git checkout 31b6eb417b7aa6bb1e1f1fb9704bffbc5b63258c

2. apply patches and copy configuration
> for p in ../*.patch; do patch -i $p -p1; done
> cp ../wpa_supplicant.config wpa_supplicant/.config
> cp ../hostapd.config hostapd/.config

3. compilation

3.1 If you extracted sources on evaluation board (cevav7 or diniv6) then
> cd wpa_supplicant && make && cd -
> cd hostapd && make && cd -

3.2 Cross compilation using yocto sdk

> source </path/to/yocto/sdk>/environment-setup-corei7-64-poky-linux
> cd xxx/hostap/hostapd
> make clean
> make
> cd xxx/hostap/wpa_supplicant
> sed -e -i 's@-I/@-I=/@' Makefile
> make clean
> make

upgrade to a new hostapd version
--------------------------------

1. get and extract sources
> git clone http://w1.fi/hostap.git
> cd hostap
> git checkout <commit_id>

2. Apply each patch separately, and resolve potential conflicts
a. Apply first patch
> git am --3way ../0001-WAPI-Add-support-for-wapi-ASUE-AE.patch
> git status

If no conflicts, go to b.
Otherwise for each <file> in conflict:
> (resolve the conflict(s) in <file> and save)
> git add <file>

Once all conflicts are solved:
> git am --continue

b. Apply second patch and do the conflict checking and resolution
> git am --3way ../0002-add-ht_no_overlap_check.patch
> git status

etc.

3. Once all patches are applied and conflicts solved, you can compile as indicated above

4. Format the patches updated for the new <commit_id>
Get the last <local_commit_id> in the logs
> git log

Update the patches
> git format-patch <local_commit_id>~..

Copy the updated patches in root folder
> cp 00*.patch ../

5. Update README.txt with the new remote <commit_id>

6. Commit the updated patches and README.txt and note the SVN revision of the commit
<svn_patch_rev>

7. Go to yocto project
> cd <yocto_root>/meta-ceva/recipes-connectivity/hostapd

8. Create a new hostapd_<ver>.bb from the latest .bb file (e.g. hostapd_2.9.300.bb)

9. In the new .bb file, update RW_SVN with <svn_patch_rev>, and SRCREV_git with
"<commit_id>"

10. Commit the .bb file and relaunch the Yocto job on Jenkins

