Cross-compile packages for MBWE using Optware

This page provides quick instructions on cross-compiling packages using optware. If you want more information, check out Add A Package To Optware

1. Copy the SVN tree:
(of course, these commands shouldn't be run as root)

$ cd ~         #you can use whatever directory you want
$ svn co optware

2. Build the toolchain:

$ cd optware
$ platform=mbwe-bluering #or 'cs05q1armel' for whitelight, or whatever optware target you desire
$ make ${platform}-target
$ cd ${platform}
$ make directories toolchain ipkg-utils

3. Now you can configure, build, stage, package and check optware packages:

$ package=amule #as an example; may use whatever optware package you like
$ make ${package}-unpack #download, unpack and configure
$ make ${package} #build
$ make ${package}-stage #install to the staging dir, useful when you want to build something that depends on headers, shared libs, etc. provided by the package
$ make ${package}-ipk #assemble .ipk that can be installed using ipkg
$ make ${package}-check #check the assembled .ipk: whether it has been striped, built for the right architecture, etc.

needless to say, most of the above depend on others, e.g., if you issue $ make amule-check - it will configure, build, package amule, and only then check the packaged .ipk

4. If you want to compile some package currently unavailable on optware, the best way to do so is by using templates: lookup "Making a package using the template" on the Add A Package To Optware page for instructions on doing so. Naturally, lots of useful examples are available in optware/make/*.mk

Quick build notes: If you are using a recent version of Ubuntu, the default shell will not allow the toolchain to compile (errors like "csu/version-info.h:1: error: missing terminating " character"), type $ ls -la /bin/sh and if the result points to dash, then:
1. Check if bash is installed: $ ls -la /bin/bash, if not, install it:

$ sudo apt-get bash

2. Change the shell:
$ sudo ln -sf /bin/bash /bin/sh

With dash as /bin/sh, it sometimes causes optware perl build to stop with 'You haven't done a "make depend" yet!' error message.

New (windows) build system: If you are starting from scratch with a windows box, then the easiest route is to install VirtualBox ( and then install a version of linux into that, pick your favourite. Create a machine with at least 6Gb of hard disc. You will need to install some packages to build with: $ sudo apt-get install gcc cvs flex bison make pkg-config rsync gettext libglib2.0-dev autoconf libtool automake automake1.9 sudo patch bzip2 gzip wget sed texinfo subversion for Debian/Ubuntu

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License