diff --git a/tests/hwsim/README b/tests/hwsim/README index 8e8267050..e68b0dcc3 100644 --- a/tests/hwsim/README +++ b/tests/hwsim/README @@ -65,6 +65,9 @@ Debian/Ubuntu packages are likely to be needed: - libsqlite3-dev - libpcap-dev +example-setup.txt provides more complete step-by-step example on how a +test setup can be built. + wpaspy ------ diff --git a/tests/hwsim/example-setup.txt b/tests/hwsim/example-setup.txt new file mode 100644 index 000000000..ee55a4258 --- /dev/null +++ b/tests/hwsim/example-setup.txt @@ -0,0 +1,177 @@ +Step-by-step guide for setting up hostapd/wpa_supplicant test framework +----------------------------------------------------------------------- + +This document can be used as a quick guide for getting started with +hostapd/wpa_supplicant test framework with mac80211_hwsim. While the +example here uses Ubuntu 14.04.1 server to have a list of exact steps, +there are no requirements for using that specific distribution in the +testing setup. + +The steps here describe how to run a full Linux installation in a +virtual machine with any host system (e.g., Linux, Windows, or OS X as +the host and using kvm, VirtualBox, etc. for running the virtual guest +system). For more advanced (and significantly faster and with more +testing coverage) configuration on a Linux host system, parallel virtual +machines can be used as an alternative setup. See tests/hwsim/vm/README +for more details on that. + + +Install Ubuntu Server 14.04.1 in the virtual machine + +- download installation image, e.g., + http://releases.ubuntu.com/14.04.1/ubuntu-14.04.1-server-amd64.iso +- use virtualization software specific steps to create a new VM and + install the the guest system with default settings (i.e., no need to + select any extra packages during initial installation) +- if the host system has multiple CPU cores, it is likely a good idea to + enabled at least two CPUs in the guest; 1024 MB of RAM should be enough + for testing purposes +- 8 GB of virtual hard driver should be fine for this purpose +- boot to the installed operating system + + +Install the prerequisite packages that may not have been installed by default + +sudo apt-get install build-essential git libpcap-dev libsqlite3-dev binutils-dev libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libssl-dev libiberty-dev libdbus-1-dev iw bridge-utils python-pyrad + + +Install a recent kernel wireless components (mac80211_hwsim, mac80211, +cfg80211) + +For this step, the kernel version may be updated, but the simpler option +is to install the latest version of Backports package. For example: + +wget http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.19-rc1/backports-3.19-rc1-1.tar.xz +tar xJf backports-3.19-rc1-1.tar.xz +cd backports-3.19-rc1-1 + +cat > defconfigs/mac80211_hwsim <