SHR Development

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Before beginning)
(Set up your local.conf)
Line 23: Line 23:
  
 
=== Set up your local.conf ===
 
=== Set up your local.conf ===
Cd to your selected build directory.
+
Cd to $MOKO/openembedded
  
Create a directory under your current directory called 'conf'.
+
Append the following lines to conf/local.conf:
 
+
  cp $MOKO/openembedded/conf/local.conf conf/local.conf.
+
 
+
Append the following lines to your local.conf:
+
 
   BBFILES += "$SHRSVN/trunk/packages/*.bb $MOKO/openembedded/packages/*/*.bb"
 
   BBFILES += "$SHRSVN/trunk/packages/*.bb $MOKO/openembedded/packages/*/*.bb"
 
   SELECTED_OPTIMIZATION = "-Os -g"
 
   SELECTED_OPTIMIZATION = "-Os -g"

Revision as of 18:40, 29 July 2008

Contents

Building openmoko-dialer3

Currently this is the only package of any size being developed for SHR, and it's the only one with any instructions. If you start another SHR project (please check with Bobby before starting one), put instructions for working on the project here!

Before beginning

You must build openembedded before you can build SHR packages. The easiest way is to go to http://wiki.openmoko.org/wiki/Mokomakefile and build using the instructions for FSO.

* Note: if building FSO fails using MokoMakefile (zhone! or no dbus show up on the top of the newly booted image), try using this
  method: http://wiki.openmoko.org/wiki/FSO

The rest of these instructions are written assuming that you used Mokomakefile and that the directory you downloaded the base Makefile into (using wget) is $MOKO.

You must also download the SHR code using subversion. See http://projects.openmoko.org/projects/shr. We will refer to the directory to which you downloaded the project as $SHRSVN. (This directory should contain $SHRSVN/packages/openmoko-dialer3.bb)

Set up your BBPATH

 export BBPATH=.:$MOKO/openembedded/:$MOKO/bitbake/:$MOKO/:$SHRSVN/trunk/packages/

Set up the CACHE

 export CACHE=tmp/cache


Set up your local.conf

Cd to $MOKO/openembedded

Append the following lines to conf/local.conf:

 BBFILES += "$SHRSVN/trunk/packages/*.bb $MOKO/openembedded/packages/*/*.bb"
 SELECTED_OPTIMIZATION = "-Os -g"

Note: Spaces are important in your bitbake conf files! You must have spaces before & after the = or +=

Set up your openmoko.conf (if using 2007.2)

edit $MOKO/openembedded/conf/distro/openmoko.conf

and make sure that these Gtk+ options are set:

# Select package versions we want to use.
PREFERRED_PROVIDER_gtk+ = "gtk+-fastscaling"
PREFERRED_VERSION_gtk+-fastscaling = "2.10.14"


Add your cross-compiler to your PATH

 export PATH=$MOKO/build/tmp/cross/bin/:$MOKO/build/tmp/staging/x86_64-linux/usr/bin:$PATH

Run bitbake

 bitbake openmoko-dialer3

After the first time you build successfully, you can build with

 bitbake -b openmoko-dialog3_svn

which is much faster.

To recompile, and only recompile

  bitbake -c compile -b $SHRSVN/trunk/packages/openmoko-dialer3.bb

Troubleshooting

General

One thing to try is to unset all environment variables not listed in this page. LIBPATH and INCLUDE can be particularly troublesome.

Personal tools

Building openmoko-dialer3

Currently this is the only package of any size being developed for SHR, and it's the only one with any instructions. If you start another SHR project (please check with Bobby before starting one), put instructions for working on the project here!

Before beginning

You must build openembedded before you can build SHR packages. The easiest way is to go to http://wiki.openmoko.org/wiki/Mokomakefile and build using the instructions for FSO.

* Note: if building FSO fails using MokoMakefile (zhone! or no dbus show up on the top of the newly booted image), try using this
  method: http://wiki.openmoko.org/wiki/FSO

The rest of these instructions are written assuming that you used Mokomakefile and that the directory you downloaded the base Makefile into (using wget) is $MOKO.

You must also download the SHR code using subversion. See http://projects.openmoko.org/projects/shr. We will refer to the directory to which you downloaded the project as $SHRSVN. (This directory should contain $SHRSVN/packages/openmoko-dialer3.bb)

Set up your BBPATH

 export BBPATH=.:$MOKO/openembedded/:$MOKO/bitbake/:$MOKO/:$SHRSVN/trunk/packages/

Set up the CACHE

 export CACHE=tmp/cache


Set up your local.conf

Cd to $MOKO/openembedded

Append the following lines to conf/local.conf:

 BBFILES += "$SHRSVN/trunk/packages/*.bb $MOKO/openembedded/packages/*/*.bb"
 SELECTED_OPTIMIZATION = "-Os -g"

Note: Spaces are important in your bitbake conf files! You must have spaces before & after the = or +=

Set up your openmoko.conf (if using 2007.2)

edit $MOKO/openembedded/conf/distro/openmoko.conf

and make sure that these Gtk+ options are set:

# Select package versions we want to use.
PREFERRED_PROVIDER_gtk+ = "gtk+-fastscaling"
PREFERRED_VERSION_gtk+-fastscaling = "2.10.14"


Add your cross-compiler to your PATH

 export PATH=$MOKO/build/tmp/cross/bin/:$MOKO/build/tmp/staging/x86_64-linux/usr/bin:$PATH

Run bitbake

 bitbake openmoko-dialer3

After the first time you build successfully, you can build with

 bitbake -b openmoko-dialog3_svn

which is much faster.

To recompile, and only recompile

  bitbake -c compile -b $SHRSVN/trunk/packages/openmoko-dialer3.bb

Troubleshooting

General

One thing to try is to unset all environment variables not listed in this page. LIBPATH and INCLUDE can be particularly troublesome.