OpenWrt

From mochad

Jump to: navigation, search

Using mochad on OpenWrt

mochad works on OpenWrt devices but is not currently in the public package feeds. It can be easily added to the OpenWrt build environment.

Get OpenWrt

Get the OpenWrt source here and setup the build environment. I suggest using the backfire branch but mochad works on trunk also.

For the kamikaze 8.09 branch, see the last section.

<http://wiki.openwrt.org/doc/howto/build>

Add mochad to trunk or backfire

Assume the OpenWrt build directory is ~/openwrt/backfire.

$ cd ~/openwrt/backfire/package
$ mkdir mochad
$ wget http://sourceforge.net/projects/mochad/files/openwrt/Makefile
$ cd ..
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ make menuconfig
# Go to the Utilities menu and select mochad by pressing 'Y'. Exit
# and save changes.
$ make

mochad will be included in the firmware image file. The next step is to upgrade or upload the new firmware image file to your router or NAS.

mochad is known to work with OpenWrt backfire branch on the LinkSys NSLU2 and Buffalo WZR-HP-G300NH.

Add mochad to kamikaze 8.09

mochad does not build in the kamikaze 8.09 branch because libusb-1.0 is not available.

The following does allow mochad to build but I do not have hardware to test this so I make no guarantees.

First, get the source code.

$ mkdir kamikaze
$ cd kamikaze
$ svn co svn://svn.openwrt.org/openwrt/branches/8.09
$ cd 8.09

Update the package feeds.

$ ./scripts/feeds update -a
$ ./scripts/feeds install -a

Run menuconfig and select Target System and Target Profile. Exit and save.

make menuconfig

The following builds everything so will take a long time.

$ make

If this is not successful, see the following.

<http://wiki.openwrt.org/doc/howto/build>

libusb-1.0 is not available in the 8.09 branch so copy the package Makefile from backfire. This assumes you have checked out backfire in ~/backfire. I am not sure if any changes are needed to the Makefile because I do not have the hardware to test this.

$ cd package
$ mkdir libusb-1.0
$ cp ~/backfire/feeds/packages/libs/libusb-1.0/Makefile libusb-1.0

Get the mochad package Makefile. The package build system will get the source code when needed.

$ mkdir mochad
$ cd mochad
$ wget http://sourceforge.net/projects/mochad/files/openwrt/Makefile
$ cd ../..
$ make menuconfig

Go to the Utilties menu then select mochad by pressing 'Y'. libusb-1.0 is a dependency so will be automatically selected. Exit and save configuration

Build again.

$ make 

The bin directory should contain images with mochad "baked" in.