This post is long overdue, since we began leaking the sources out without proper documentation of what we did to integrate Wi-Fi with our Android build for i.MX6.
In this recent post, we discussed how to get and compile the latest branch of Android for our boards. In this post, we'll describe the key bits we added in more detail.
For those of you coming in late to this series, the following posts describe the early steps in booting Freescale's Android release on our Nitrogen6X, Nitrogen6X-SOM, and BD-SL-i.MX6 (formerly SABRE Lite) boards.
- Stage 1: Booting Freescale's release over NFS
- Stage 2: Booting via SD card
- Stage 3: Customization for Nitrogen and SABRE Lite
At the end of Stage 3, we had no Wi-Fi or Bluetooth support, and adding it involves essentially two things:
- Removing Freescale's patches to support the Atheros Wi-Fi module
- Adding in support for the TiWi-R2 module on the Nitrogen6X
The first was probably the more difficult of the two. We started that process by identifying the Atheros-related patches in the Freescale patch set through a combination of grep
and eye-balls.
The primary places changed were in the wpa_supplicant
, bluez
and libhardware_legacy
modules.
You can get a pretty good snapshot of these changes by using this nice feature of GitHub to compare the branches nitrogen6x
and nit6x-wifi
of the repo default.xml
.
If you're new to repo
and Android, the default.xml
file is the piece used to consolidate a set of git
repositories into a unified build tree. It's hidden in the .repo/manifests/
directory, but crucial to understanding the Android build process.
The nit6x-wifi
branch is a temporary branch we used when performing the updates for Wi-Fi, and also the version we leaked out to those of you with access to the sources.
Other key changes include:
- Addition of the
wpa_supplicant
andhciattach
services and loading of modules in thedevice/boundary/
repository, and - Modification of
libhardware_legacy/wifi
to toggle theRESET
GPIO when the WLAN interface is brought down and up.
Note that there are additional changes included in some of these change-sets, but the highlights listed above show the bulk of what was done to integrate Wi-Fi in particular into the Nitrogen6X code base.
We hope that this brief overview helps as you walk through the process of customizing Android for your particular needs on i.MX6.