Most programs available for Openmoko smartphones are Free Software, thus source code is available for studying, modifying, recompiling or re-distributing.
This page explains how you can receive the source code for the software included in the Openmoko Inc driven distributions, and what methods you could use to publish the source code if you write or modify a Free or Open Source Software for Openmoko compatible distributions.
If you modify an existing software to run on Openmoko smartphones and you publish the binary package, please always carefully read the original license and fulfill the described requirements regarding publishing the modified source code.
Getting source code for Om 2008.8 distribution
Om 2008.8 is built based on OpenEmbedded. All source code is available in the following source:
- The OpenEmbedded bitbake recipe files refer to the original source code
- The OpenEmbedded package directory contains the patches applied to build the binary
To receive the source code for a program the easiest way is to use MokoMakefile (the following steps are desribed on MokoMakefile page).
- Install MokoMakefile dependencies
- Make a directory for your build environment, change to that directory
- Download MokoMakefile to that directory
- To download the OpenEmbedded git repository type
- For Neo FreeRunner programs type
(use gta01 for Neo 1973).
Now you could start browsing the "openembedded/packages" and other downloaded directories finding the source code download URLs and patches, but of course the OpenEmbedded environment can do this for you. We can try with a small program, sidplayer:
bitbake -c patch sidplayer
This will download the source code and patch it with patches applied in the Om 2008.8 release. At this point you can find the source code in the following directory (under your work directory):
Updates, daily builds and packages in unstable
The above method retrieves the source code for software included in the release of the distribution. The same OpenEmbedded environment can be used to receive the actual source code. All you need is to change the "Makefile" (MokoMakefile) to refer to the development branch, removing the # from this line:
# OM_GIT_BRANCH := org.openmoko.dev
Source code for one specific build of a package
Publishing source code of your packages
Porting an exsiting application
If you port an existing application to one of the distributions available on Openmoko smartphones, make sure you clearly understand and fulfill the requirements of the original software's license.
Many Free Software uses the [GNU General Public License], which reqires you to accompany the distributed package with the corresponding source code or alternatively provide various methods to receive the source code from you. We recommend that you always publish the source code next to the binary package, see the license for other options. Always check the acutal program's license.
Note, that you must provide the source code which exactly matches the binary package you provide. Including all modifications. Not older, not newer source code than the binary package.
Writing new applications
If you write a new program, you may decide to publish or not publish the source code. We won't go into details of advantages or disadvantages of publishing software with under Free Software licenses, but we are sure that the Openmoko smartphone community will appreciate if you choose a license which provides the possibility of reading and modifying your program to their needs and redistributing it as they wish.
See [GNU General Public License] for a well designed Free Software license, which is an option to help you with good legal background for your software's licensing.