|Line 83:||Line 83:|
Revision as of 06:18, 16 March 2010
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català
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 our OpenEmbedded tree. All source code is available on the following way:
- 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 explained 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):
Note that the make setup step downloads a working copy of the Openmoko SVN, which contains the Om 2007.2 applications, but you can use the same bitbake command to receive the source code as it exactly specified in the build recipes. For example:
bitbake -c patch openmoko-calculator2
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
If you have a package from a download source, which was not accompanied with the source code, and it is not one of the above (Om 2008.8 release nor current unstable package), you have the following options to receive the source code of the "specific moment":
Publishing source code of your packages
Porting an existing 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 requires you to accompany the distributed package with the corresponding source code or provide one of the other specified ways to receive the source code from you. We recommend that you always publish the source code next to the binary download, see the license for other options. Always check the actual program's license.
Note, that you must provide the source code which exactly matches the binary package you provide. Including all your modifications. Not older, not newer source code than the binary package itself. Depending on the distribution method it may be easier to provide a link to the original source code and patch files with your modifications, this is also allowed in most licenses.
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 under Free Software licenses, but we are sure that the Openmoko 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.