Building FSO

From Openmoko

(Difference between revisions)
Jump to: navigation, search
 
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{FSO}}
 
{{FSO}}
  
= Building FSO =
+
The freesmartphone.org (FSO) image is based on the OpenEmbedded distribution.  OpenEmbedded is not part of Openmoko, and targets many different devices.
 
+
The freesmartphone.org (FSO) image is based on the OpenEmbedded distribution.  OpenEmbedded is not part of Openmoko, and targets many different devices.
+
  
 
FSO's source tree, documentation and bug tracker are not hosted at openmoko.org.  This wiki page simply points to the relevant portions of OpenEmbedded's documentation.  Openembedded.org and freesmartphone.org contain more complete documentation.
 
FSO's source tree, documentation and bug tracker are not hosted at openmoko.org.  This wiki page simply points to the relevant portions of OpenEmbedded's documentation.  Openembedded.org and freesmartphone.org contain more complete documentation.
  
== FsoMakefile ==
+
= FsoMakefile =
  
 
There are two ways to build an FSO image.
 
There are two ways to build an FSO image.
  
The first approach uses FsoMakefile to automatically download and configure the a build environment, and is the easiest way to build an image:
+
The first approach uses FsoMakefile to automatically download and configure the build environment, and is the easiest way to build an image:
 +
<pre>
 +
wget http://downloads.freesmartphone.org/Makefile
 +
make fso-gta02-testing-image
 +
</pre>
 +
This is the process used by the build servers to create new images.
  
wget http://shr.bearstech.com/Makefile
+
Ubuntu can throw up errors [[Talk:MokoMakefile]]
make fso-testing-image
+
  
This is the process used by the build servers to create new images.   
+
See http://downloads.freesmartphone.org/ for more informationNote that FsoMakefile and [[MokoMakefile]] are separate entities, and target different images.
  
See http://shr.bearstech.com/README for more information.  Note that FsoMakefile and [[MokoMakefile]] are separate entities, and target different images.
+
You can access the FsoMakefile directly from the git repository with this command (there is no difference between this and the above once the build starts):
 +
<pre>
 +
git clone git://git.freesmartphone.org/fso-makefile common
 +
ln -s common/Makefile Makefile
 +
make fso-gta02-testing-image
 +
</pre>
 +
You can also use [[Alternative FSO GIT repository|alternative FSO git repository]]
  
You can use the development copy of FsoMakefile (not recommended) with this command:
+
= Building manually =
  
git clone git://git.freesmartphone.org/fso-makefile common
+
While convenient, building with FsoMakefile does not tell you much about what is going on under the hoodFsoMakefile automatically downloads an OpenEmbedded build tree, configures it to build FSO and then builds the image.
  ln -s common/Makefile Makefile
+
make fso-testing-image
+
  
== Building manually ==
+
{{Note|The output from running the FsoMakefile is *exactly* the same output you get from running bitbake commands manually.  And the configuration files produced by the 'setup' target in the FsoMakefile are *exactly* the same configuration files you would create manually. So I just don't get why people say that using a Makefile doesn't tell you much about what is going on under the hood.  I think the difference is whether someone actually cares to look at what is going on or not. - RodWhitby}}
 
+
While convenient, building with FsoMakefile does not tell you much about what is going on under the hood.  FsoMakefile automatically downloads an OpenEmbedded build tree, configures it to build FSO and then builds the image.
+
  
 
OpenEmbedded's manual build directions at http://wiki.openembedded.net/index.php/Getting_Started describe the process in more detail.  They also explain how to build individual packages, and describe bitbake, which manages OpenEmbedded builds.
 
OpenEmbedded's manual build directions at http://wiki.openembedded.net/index.php/Getting_Started describe the process in more detail.  They also explain how to build individual packages, and describe bitbake, which manages OpenEmbedded builds.
Line 34: Line 38:
 
OpenEmbedded targets a number of devices, and their package database can produce a number of different images.  Therefore, as you follow their directions, you will need to modify them to build FSO for your device.
 
OpenEmbedded targets a number of devices, and their package database can produce a number of different images.  Therefore, as you follow their directions, you will need to modify them to build FSO for your device.
  
First, when you edit the targets in local.conf, you should need to set it to build an openmoko distrbution. If you wanted to build the angstrom distribution for a Neo1973, you would write this:
+
First, when you edit the targets in local.conf, you need to set it to build an Openmoko distribution.
  
BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
+
If you wanted to build FSO for a Neo1973, you would write this:
DISTRO = "angstrom-2008.1"
+
<pre>
MACHINE = "om-gta01"
+
BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
 
+
DISTRO = "openmoko"
To build FSO for a Freerunner, you would write this:
+
MACHINE = "om-gta01"
 
+
</pre>
BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
+
DISTRO = "openmoko"
+
MACHINE = "om-gta02"
+
  
 +
To build FSO for a FreeRunner, you would write this:
 +
<pre>
 +
BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
 +
DISTRO = "openmoko"
 +
MACHINE = "om-gta02"
 +
</pre>
 
If you want to build FSO's unstable branch then include the following two lines at the end of local.conf:
 
If you want to build FSO's unstable branch then include the following two lines at the end of local.conf:
 
+
<pre>
require conf/distro/include/fso-autorev.inc
+
require conf/distro/include/fso-autorev.inc
require conf/distro/include/moko-autorev.inc
+
require conf/distro/include/moko-autorev.inc
 
+
</pre>
these two .inc files tell bitbake to use the most recent versions of each package, instead of the (hopefully tested) preferred versions.
+
These two .inc files tell bitbake to use the most recent versions of each package, instead of the (hopefully tested) preferred versions.
  
 
Once you've finished setting up the build environment, you can build the FSO image with the command:
 
Once you've finished setting up the build environment, you can build the FSO image with the command:
 
+
<pre>
cd /stuff/build && bitbake fso-image
+
cd /stuff/build && bitbake fso-image
 
+
</pre>
[[category:Technical]]
+
{{Note|If you want to run manual bitbake commands after setting things up using the FsoMakefile, then don't forget to source the setup-env file first.}}
[[Category:Software (non openmoko)]]
+
[[category:FSO]]
+
 
+
  
 
= Configuration =
 
= Configuration =
Line 69: Line 73:
  
 
'''Step 1) Install the ipk-packages'''
 
'''Step 1) Install the ipk-packages'''
 
+
<pre>
opkg install moko-gtk-theme
+
opkg install openmoko-icon-theme-standard2 moko-gtk-engine
opkg install openmoko-icon-theme-standard2
+
</pre>
opkg install moko-gtk-engine
+
 
+
 
'''Step 2) Enable Theme'''
 
'''Step 2) Enable Theme'''
+
<pre>
vi /etc/gtk-2.0/gtkrc
+
nano /etc/gtk-2.0/gtkrc
 
+
</pre>
 
Add this line to the top:
 
Add this line to the top:
 
+
<pre>
include "/usr/share/themes/Moko/gtk-2.0/gtkrc"
+
include "/usr/share/themes/Moko/gtk-2.0/gtkrc"
 
+
</pre>
 
'''Step 3) Set icon theme'''
 
'''Step 3) Set icon theme'''
 
+
<pre>
vi /etc/gtk-2.0/gtkrc
+
nano /etc/gtk-2.0/gtkrc
 
+
</pre>
Add the line:
+
Add the line:<pre>
gtk-icon-theme-name="openmoko-standard"
+
gtk-icon-theme-name="openmoko-standard"
 
+
</pre>
 
'''Step 4) Third party themes (optional)'''
 
'''Step 4) Third party themes (optional)'''
  
 
Add one line per 'third-party' gtk theme you've installed.  For example, openmoko-mediaplayer is not packaged with FSO:
 
Add one line per 'third-party' gtk theme you've installed.  For example, openmoko-mediaplayer is not packaged with FSO:
 
+
<pre>
include "/usr/share/themes/Moko/gtk-2.0/openmoko-mediaplayer"
+
include "/usr/share/themes/Moko/gtk-2.0/openmoko-mediaplayer"
 
+
</pre>
 
'''Step 5) Other tweaks
 
'''Step 5) Other tweaks
  
 
To get "2007.2-style" icons (no text, smaller), so that all the terminal buttons fit on the screen at once:
 
To get "2007.2-style" icons (no text, smaller), so that all the terminal buttons fit on the screen at once:
 
+
<pre>
gtk-toolbar-style = GTK_TOOLBAR_ICONS
+
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-icon-sizes = "gtk-button=32,32:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24"
+
gtk-icon-sizes = "gtk-button=32,32:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24"
 
+
</pre>
 
And make any other changes you like.  I don't like double arrows on the tops and bottoms of sliders:
 
And make any other changes you like.  I don't like double arrows on the tops and bottoms of sliders:
 +
<pre>
 +
GtkScrollbar::has_secondary_backward_stepper = 0
 +
GtkScrollbar::has_secondary_forward_stepper = 0
 +
</pre>
 +
Look at existing gtkrc files for more options (if you find the manual, add a link).
  
GtkScrollbar::has_secondary_backward_stepper = 0
+
[[Category:FSO]]
GtkScrollbar::has_secondary_forward_stepper = 0
+
 
+
Look at existing gtkrc files for more options (if you find the manual, add a link).
+

Latest revision as of 14:28, 7 February 2009

Key pages on:
FSO

(Other distributions)


The freesmartphone.org (FSO) image is based on the OpenEmbedded distribution. OpenEmbedded is not part of Openmoko, and targets many different devices.

FSO's source tree, documentation and bug tracker are not hosted at openmoko.org. This wiki page simply points to the relevant portions of OpenEmbedded's documentation. Openembedded.org and freesmartphone.org contain more complete documentation.

Contents

[edit] FsoMakefile

There are two ways to build an FSO image.

The first approach uses FsoMakefile to automatically download and configure the build environment, and is the easiest way to build an image:

wget http://downloads.freesmartphone.org/Makefile
make fso-gta02-testing-image

This is the process used by the build servers to create new images.

Ubuntu can throw up errors Talk:MokoMakefile

See http://downloads.freesmartphone.org/ for more information. Note that FsoMakefile and MokoMakefile are separate entities, and target different images.

You can access the FsoMakefile directly from the git repository with this command (there is no difference between this and the above once the build starts):

git clone git://git.freesmartphone.org/fso-makefile common
ln -s common/Makefile Makefile
make fso-gta02-testing-image

You can also use alternative FSO git repository

[edit] Building manually

While convenient, building with FsoMakefile does not tell you much about what is going on under the hood. FsoMakefile automatically downloads an OpenEmbedded build tree, configures it to build FSO and then builds the image.

NOTE: The output from running the FsoMakefile is *exactly* the same output you get from running bitbake commands manually. And the configuration files produced by the 'setup' target in the FsoMakefile are *exactly* the same configuration files you would create manually. So I just don't get why people say that using a Makefile doesn't tell you much about what is going on under the hood. I think the difference is whether someone actually cares to look at what is going on or not. - RodWhitby


OpenEmbedded's manual build directions at http://wiki.openembedded.net/index.php/Getting_Started describe the process in more detail. They also explain how to build individual packages, and describe bitbake, which manages OpenEmbedded builds.

OpenEmbedded targets a number of devices, and their package database can produce a number of different images. Therefore, as you follow their directions, you will need to modify them to build FSO for your device.

First, when you edit the targets in local.conf, you need to set it to build an Openmoko distribution.

If you wanted to build FSO for a Neo1973, you would write this:

BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
DISTRO = "openmoko"
MACHINE = "om-gta01"

To build FSO for a FreeRunner, you would write this:

BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
DISTRO = "openmoko"
MACHINE = "om-gta02"

If you want to build FSO's unstable branch then include the following two lines at the end of local.conf:

require conf/distro/include/fso-autorev.inc
require conf/distro/include/moko-autorev.inc

These two .inc files tell bitbake to use the most recent versions of each package, instead of the (hopefully tested) preferred versions.

Once you've finished setting up the build environment, you can build the FSO image with the command:

cd /stuff/build && bitbake fso-image
NOTE: If you want to run manual bitbake commands after setting things up using the FsoMakefile, then don't forget to source the setup-env file first.


[edit] Configuration

NOTE: This section should be it's own page...


[edit] GTK

Currently GTK is not well supported in the FSO build. To use GTK applications you'll most likely have to install the gtk library, and the Openmoko theme.

Step 1) Install the ipk-packages

opkg install openmoko-icon-theme-standard2 moko-gtk-engine

Step 2) Enable Theme

nano /etc/gtk-2.0/gtkrc

Add this line to the top:

include "/usr/share/themes/Moko/gtk-2.0/gtkrc"

Step 3) Set icon theme

nano /etc/gtk-2.0/gtkrc
Add the line:
gtk-icon-theme-name="openmoko-standard"

Step 4) Third party themes (optional)

Add one line per 'third-party' gtk theme you've installed. For example, openmoko-mediaplayer is not packaged with FSO:

include "/usr/share/themes/Moko/gtk-2.0/openmoko-mediaplayer"

Step 5) Other tweaks

To get "2007.2-style" icons (no text, smaller), so that all the terminal buttons fit on the screen at once:

gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-icon-sizes = "gtk-button=32,32:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24"

And make any other changes you like. I don't like double arrows on the tops and bottoms of sliders:

GtkScrollbar::has_secondary_backward_stepper = 0
GtkScrollbar::has_secondary_forward_stepper = 0

Look at existing gtkrc files for more options (if you find the manual, add a link).

Personal tools
Key pages on:
FSO

(Other distributions)


Building FSO

The freesmartphone.org (FSO) image is based on the OpenEmbedded distribution. OpenEmbedded is not part of Openmoko, and targets many different devices.

FSO's source tree, documentation and bug tracker are not hosted at openmoko.org. This wiki page simply points to the relevant portions of OpenEmbedded's documentation. Openembedded.org and freesmartphone.org contain more complete documentation.

FsoMakefile

There are two ways to build an FSO image.

The first approach uses FsoMakefile to automatically download and configure the a build environment, and is the easiest way to build an image:

wget http://shr.bearstech.com/Makefile
make fso-testing-image

This is the process used by the build servers to create new images.

See http://shr.bearstech.com/README for more information. Note that FsoMakefile and MokoMakefile are separate entities, and target different images.

You can use the development copy of FsoMakefile (not recommended) with this command:

git clone git://git.freesmartphone.org/fso-makefile common
ln -s common/Makefile Makefile
make fso-testing-image

Building manually

While convenient, building with FsoMakefile does not tell you much about what is going on under the hood. FsoMakefile automatically downloads an OpenEmbedded build tree, configures it to build FSO and then builds the image.

OpenEmbedded's manual build directions at http://wiki.openembedded.net/index.php/Getting_Started describe the process in more detail. They also explain how to build individual packages, and describe bitbake, which manages OpenEmbedded builds.

OpenEmbedded targets a number of devices, and their package database can produce a number of different images. Therefore, as you follow their directions, you will need to modify them to build FSO for your device.

First, when you edit the targets in local.conf, you should need to set it to build an openmoko distrbution. If you wanted to build the angstrom distribution for a Neo1973, you would write this:

BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
DISTRO = "angstrom-2008.1"
MACHINE = "om-gta01"

To build FSO for a Freerunner, you would write this:

BBFILES = "/stuff/org.openembedded.dev/packages/*/*.bb"
DISTRO = "openmoko"
MACHINE = "om-gta02"

If you want to build FSO's unstable branch then include the following two lines at the end of local.conf:

require conf/distro/include/fso-autorev.inc
require conf/distro/include/moko-autorev.inc

these two .inc files tell bitbake to use the most recent versions of each package, instead of the (hopefully tested) preferred versions.

Once you've finished setting up the build environment, you can build the FSO image with the command:

cd /stuff/build && bitbake fso-image


Configuration

NOTE: This section should be it's own page...


GTK

Currently GTK is not well supported in the FSO build. To use GTK applications you'll most likely have to install the gtk library, and the Openmoko theme.

Step 1) Install the ipk-packages

opkg install moko-gtk-theme
opkg install openmoko-icon-theme-standard2
opkg install moko-gtk-engine

Step 2) Enable Theme

vi /etc/gtk-2.0/gtkrc

Add this line to the top:

include "/usr/share/themes/Moko/gtk-2.0/gtkrc"

Step 3) Set icon theme

vi /etc/gtk-2.0/gtkrc

Add the line:

gtk-icon-theme-name="openmoko-standard"

Step 4) Third party themes (optional)

Add one line per 'third-party' gtk theme you've installed. For example, openmoko-mediaplayer is not packaged with FSO:

include "/usr/share/themes/Moko/gtk-2.0/openmoko-mediaplayer"

Step 5) Other tweaks

To get "2007.2-style" icons (no text, smaller), so that all the terminal buttons fit on the screen at once:

gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-icon-sizes = "gtk-button=32,32:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24"

And make any other changes you like. I don't like double arrows on the tops and bottoms of sliders:

GtkScrollbar::has_secondary_backward_stepper = 0
GtkScrollbar::has_secondary_forward_stepper = 0

Look at existing gtkrc files for more options (if you find the manual, add a link).