There are some prerequisites for putting OpenWRT on the WEMO, which are:
- You must have Linux, preferably Ubuntu
- The WEMO must be running stock firmware (pre 2.00.2176), due to an exploit Belkin locked access to the device (see here).
The following steps show how to create the toolchain for cross compilation, create tools for remote debugging, and create the firmware image for the WEMO.
- Install the latest build tools for linux.
sudo apt-get install subversion build-essential libncurses5-dev sudo apt-get install git-core python2.7-dev
- Checkout the latest OpenWRT.
mkdir ~/openwrt cd ~/openwrt git clone git://git.openwrt.org/openwrt.git
- Update and download the feeds, the feeds are source code for building packages to install in the firmware image.
cd ~/openwrt/openwrt ./scripts/feeds update -a ./scripts/feeds install -a
- Start the menu configuration for OpenWRT, this will check for dependencies required for cross compilation.
menu configuration configures which cross compilation tools are to be
compiled for creating a firmware image for a specific platform. For the
Belking WEMO select the Target System as "Ralink RT288x/RT3xxx" and
select the Subtarget as "RT3x5x/RT5350 based boards"
- This step enables options to build a toolchain for cross compiling and tools for remote debugging in eclipse (tutorial how to do this here). To build a toolchain and remote debugging tools select the following options:
- Enable "Advanced configuration options (for developers)" (press space bar), and from this menu (press enter to open once enabled) select "Toolchain Options --->" and ensure "Build gdb (NEW)" is enabled.
- Back in the main menu, enable "Build the OpenWRT based Toolchain"
- Select the "Development --->" menu and enable the "gdbserver" option, To select the option press space bar twice until an * appears next to the option, when M appears next to an option the package will be built but not installed in the firmware image.
- Back to the main menu, then select "Network --->", "SSH --->" and enable the package "openssh-sftp-server"
These options will allow for compilation and remote debugging using Eclipse, guide will be [here]
- Exit menu configuration and when prompted save the configuration.
- Begin the build processing with:
This can take several hours, if there are problems use the option V=99 to get a more verbrose output.
This completes the build of the firmware image, which can be found in:
The next step (here) is to connect serial lines to the Wemo, prepare the uboot environment, and finally flash the firmware image.