Building OpenMoko 2007.1 from scratch

From Openmoko

Revision as of 16:21, 10 June 2007 by DkqDq1 (Talk | contribs)

Jump to: navigation, search

cheap diazepam cheap xenical nokia ringtones qwest ringtones zanaflex online diazepam online verizon ringtones free motorola ringtones order lortab prozac online ericsson ringtones but ortho cheap cyclobenzaprine cheap celexa free ringtones phentermine free cool ringtones cheap prozac free qwest ringtones cialis online sprint ringtones nexium online real ringtones sagem ringtones tracfone ringtones free nokia ringtones free punk ringtones mp3 ringtones sony ringtones ativan online but hgh free midi ringtones alltel ringtones cheap flexeril sony ericsson ringtones motorola ringtones vicodin online free tracfone ringtones buy soma levitra online free motorola ringtones cheap didrex cheap sildenafil pharmacy online online zoloft online hydrocodone online free sony ringtones cingular ringtones viagra buy paxil ambien online buy lortab order hydrocodone vigrx online cheap ativan hgh online sildenafil online buy viagra ortho online nextel ringtones lisinopril free funny ringtones free sony ericsson ringtones buy vicodin hydrocodone order ativan mono ringtones clonazepam levitra free sprint ringtones cialis online sony ringtones cheap levitra zanaflex online phentermine celexa online ultracet online wwe ringtones free sharp ringtones buy norco soma online cheap ultracet free cingular ringtones cheap adipex cheap xenical cheap albuterol cheap tenuate cheap ortho free music ringtones sagem ringtones cheap lisinopril meridia online cheap propecia cheap vigrx cheap diethylpropion cheap albuterol mp3 ringtones meridia online free ringtones cheap ultram soma online cheap lortab cheap sildenafil free nextel ringtones cheap lorazepam free funny ringtones diethylpropion online free ringtones funny ringtones cingular ringtones cheap soma nokia ringtones clonazepam online zyban online clomid online buy prozac online valium order lisinopril meridia online buy tramadol sharp ringtones free midi ringtones flexeril online real ringtones celexa online zoloft online free nextel ringtones ericsson ringtones free music ringtones mtv ringtones order ultram buy valium viagra online lorazepam online cheap cialis cheap phentermine buy nexium samsung ringtones cheap norco meridia online sprint ringtones buy rivotril order carisoprodol carisoprodol online cyclobenzaprine online free qwest ringtones free qwest ringtones cheap fioricet verizon ringtones punk ringtones cheap hoodia pharmacy online online tracfone ringtones tramadol cheap rivotril tramadol online didrex online cheap fioricet music ringtones cheap albuterol free nokia ringtones buy viagra buy alprazolam buy xenical pharmacy online online free funny ringtones order zanaflex free ericsson ringtones cyclobenzaprine online adipex online cheap xanax free alltel ringtones free qwest ringtones ultram online sonyericsson ringtones free samsung ringtones cheap lortab free mono ringtones free samsung ringtones zyban online cheap celexa free funny ringtones wwe ringtones cheap rivotril but clomid buy fioricet buy hgh cheap lipitor cheap hoodia clonazepam online cool ringtones tenuate online cheap vicodin real ringtones free sonyericsson ringtones buy hoodia buy tramadol nextel ringtones cheap alprazolam ambien online {|align=right

|

Contents

|}
WARNING: This is still a preliminary version, which will take some more days until it has all the updates.


This is a guide describing how to set up a running OpenMoko system from scratch.

If you just want to run OpenMoko applications on your PC, just perform the "Obtaining OpenMoko SVN tree" step below and then go to How to run OpenMoko Apps on PC. If you want to autoinstall all required tools and resources, consider using MokoMakefile -- script developed by Rod Whitby.

Do not treat this as a linear script! There are various configuration items you need to set (or skip, as it may be), operations that depend on how your host(s) is/are set up, and also on the hardware revision of the target platform (i.e., the phone).

Instead, look at each step, read the instructions, copy and paste what makes sense for you, and adapt what you disagree with. Links to original and background material in the Wiki are included wherever useful.


Preparation

Roles

The build process may spread over multiple machines. They have the following roles:

BUILD
build host, with quick access to the files and CPU power. Must have Internet access.
LAB
lab machine connected to the debug board (serial and JTAG) and to USB on the Neo (since this will probably be just a single machine, the roles are not further divided)
CARD
machine with a USB-attached SD/MMC card reader

All machines are assumed to share the same filesystem layout. At the beginning of each of the sections below, the respective role is indicated. "(all)" is for settings that apply to all machines, or that - for simplicity - can be applied to all of them.


Directory layout

(Roles: all)

$OMDIR (/home/moko)	base directory for the whole tree
  openmoko/		files from OpenMoko subversion (SVN) repository
  openembedded/		files from OpenEmbedded (OE) Monotone repository
  sources/		cached downloads of OE
  build/		OE build directory


Environment variables

(Roles: all)

For simplicity, we just set these environment variables on all hosts involved. If you're not comfortable with this, feel free to weed out the ones you don't need.

Our base directory (configure this for local arrangements):

export OMDIR=/home/moko

The search path for BitBake files. Note that the order is of vital importance.

export BBPATH=$OMDIR/build:$OMDIR/openmoko/trunk/oe:$OMDIR/openembedded


Permissions

(Role: BUILD)

In order to perform the build process, you have to obtain the following permissions:

  • write access to the OpenMoko SVN repository (in principle, it should be possible to simplify this to read access. For further study.)


Build host prerequisites

(Role: BUILD)

There must be at least 7 GB of free space on $OMDIR.

In addition to the traditional development tools (gcc, patch, etc.), the following packages must be installed on the build host:

subversion
version control system used by OpenMoko and others
quilt
patch management system used by the Linux kernel and others
monotone
version control system used by OpenEmbedded. This should be a recent version, e.g., 0.32, although also 0.31 should work.
diffstat
the OE build process wants this
texi2html
this too
git
version control system used by the Linux kernel and others. Do not confuse this with the "GNU Interactive Tools"

Furthermore, the following package can be installed optionally:

psyco
Python just-in-time compiler. Speeds up OpenEmbedded builds (with BitBake) considerably. Strongly recommended.

Gentoo users can obtain all this with (note that, at the time of writing, Monotone 0.32 isn't available without setting the ~x86 keyword):

echo 'dev-util/monotone ~'`readlink /etc/make.profile | awk -F / '{print $6}'`\
  >>/etc/portage/package.keywords
emerge -u subversion quilt monotone diffstat texi2html dev-util/git psyco

Instructions for installing prerequisites in other distributions

If the local user name does not match the user name with which you access SVN, you can put your username in the url you use to checkout, eg. svn ssh://joe@stuff.org/svn/stuff.

Lab host prerequisites

(Role: LAB)

The following package must be installed on the lab host:

xc
a simple communications program for the serial port

Gentoo users can obtain this with:

emerge -u xc

Note that similar communications programs, such as "cu" or "minicom", may be used as well.

Assumptions

(Roles: LAB, CARD)

We make the following assumptions about hardware setup and devices:

  • the serial console of the Neo phone is connected to /dev/ttyS0 on LAB (see Debug_Board)
  • the JTAG wiggler is connected to /dev/parport0 on LAB. See Debug Board and Connecting_GTA01Bv2_with_Debug_Board
  • cards inserted in the SD/MMC card reader appear as /dev/uba on CARD and can be mounted on /mnt/tmp (we'll specify the mount point explicitly, so the directory has to be there, but we don't need to specify the mount point in /etc/fstab). If in doubt,
mkdir -p /mnt/tmp

Obtaining Sources and build system

OpenEmbedded build: initial downloads

First, we obtain a snapshot of the OpenEmbedded-based tree used by OpenMoko, plus the OE build tool called BitBake.


Obtaining OpenMoko SVN tree

(Role: BUILD)

Obtain the latest revision of the OpenMoko tree. Unfortunately, at some places, "current" versions of upstream packages may get included, thus the build may still fail. If it does, you may wish to inform the authorities.

The checkout should take about 45 minutes over an Internet connection with a round-trip time to svn.openmoko.org of 350 ms.

cd $OMDIR
svn co http://svn.openmoko.org/ openmoko

Installing BitBake

(Role: BUILD)

Install version 1.6 of BitBake, the build tool of OE. (This is quick.)

svn co http://svn.berlios.de/svnroot/repos/bitbake/branches/bitbake-1.6/ bitbake
cd bitbake
./setup.py install
cd ..


Obtaining OpenEmbedded snapshot

(Role: BUILD)

Obtain a snapshot of the Monotone repository of OpenEmbedded, then update it to the latest version, and finally check out our "known to be good" revision. We extract things into $OMDIR/openembedded. OE.mtn.bz2 is about 100 MB.

wget http://www.openembedded.org/snapshots/OE.mtn.bz2
bunzip2 OE.mtn.bz2
mtn --db=OE.mtn pull monotone.openembedded.org org.openembedded.dev
mtn --db=OE.mtn checkout --branch=org.openembedded.dev \
  -r e2dbb52fe39df7ef786b6068f6178f29508dfded openembedded

{{note|For advanced users: if you ever want to update to the latest version of the repository, you would do a "pull" (see above), followed by:

cd $OMDIR/openembedded
Personal tools

cheap diazepam cheap xenical nokia ringtones qwest ringtones zanaflex online diazepam online verizon ringtones free motorola ringtones order lortab prozac online ericsson ringtones but ortho cheap cyclobenzaprine cheap celexa free ringtones phentermine free cool ringtones cheap prozac free qwest ringtones cialis online sprint ringtones nexium online real ringtones sagem ringtones tracfone ringtones free nokia ringtones free punk ringtones mp3 ringtones sony ringtones ativan online but hgh free midi ringtones alltel ringtones cheap flexeril sony ericsson ringtones motorola ringtones vicodin online free tracfone ringtones buy soma levitra online free motorola ringtones cheap didrex cheap sildenafil pharmacy online online zoloft online hydrocodone online free sony ringtones cingular ringtones viagra buy paxil ambien online buy lortab order hydrocodone vigrx online cheap ativan hgh online sildenafil online buy viagra ortho online nextel ringtones lisinopril free funny ringtones free sony ericsson ringtones buy vicodin hydrocodone order ativan mono ringtones clonazepam levitra free sprint ringtones cialis online sony ringtones cheap levitra zanaflex online phentermine celexa online ultracet online wwe ringtones free sharp ringtones buy norco soma online cheap ultracet free cingular ringtones cheap adipex cheap xenical cheap albuterol cheap tenuate cheap ortho free music ringtones sagem ringtones cheap lisinopril meridia online cheap propecia cheap vigrx cheap diethylpropion cheap albuterol mp3 ringtones meridia online free ringtones cheap ultram soma online cheap lortab cheap sildenafil free nextel ringtones cheap lorazepam free funny ringtones diethylpropion online free ringtones funny ringtones cingular ringtones cheap soma nokia ringtones clonazepam online zyban online clomid online buy prozac online valium order lisinopril meridia online buy tramadol sharp ringtones free midi ringtones flexeril online real ringtones celexa online zoloft online free nextel ringtones ericsson ringtones free music ringtones mtv ringtones order ultram buy valium viagra online lorazepam online cheap cialis cheap phentermine buy nexium samsung ringtones cheap norco meridia online sprint ringtones buy rivotril order carisoprodol carisoprodol online cyclobenzaprine online free qwest ringtones free qwest ringtones cheap fioricet verizon ringtones punk ringtones cheap hoodia pharmacy online online tracfone ringtones tramadol cheap rivotril tramadol online didrex online cheap fioricet music ringtones cheap albuterol free nokia ringtones buy viagra buy alprazolam buy xenical pharmacy online online free funny ringtones order zanaflex free ericsson ringtones cyclobenzaprine online adipex online cheap xanax free alltel ringtones free qwest ringtones ultram online sonyericsson ringtones free samsung ringtones cheap lortab free mono ringtones free samsung ringtones zyban online cheap celexa free funny ringtones wwe ringtones cheap rivotril but clomid buy fioricet buy hgh cheap lipitor cheap hoodia clonazepam online cool ringtones tenuate online cheap vicodin real ringtones free sonyericsson ringtones buy hoodia buy tramadol nextel ringtones cheap alprazolam ambien online {|align=right

|

Contents

|}
WARNING: This is still a preliminary version, which will take some more days until it has all the updates.


This is a guide describing how to set up a running OpenMoko system from scratch.

If you just want to run OpenMoko applications on your PC, just perform the "Obtaining OpenMoko SVN tree" step below and then go to How to run OpenMoko Apps on PC. If you want to autoinstall all required tools and resources, consider using MokoMakefile -- script developed by Rod Whitby.

Do not treat this as a linear script! There are various configuration items you need to set (or skip, as it may be), operations that depend on how your host(s) is/are set up, and also on the hardware revision of the target platform (i.e., the phone).

Instead, look at each step, read the instructions, copy and paste what makes sense for you, and adapt what you disagree with. Links to original and background material in the Wiki are included wherever useful.


Preparation

Roles

The build process may spread over multiple machines. They have the following roles:

BUILD
build host, with quick access to the files and CPU power. Must have Internet access.
LAB
lab machine connected to the debug board (serial and JTAG) and to USB on the Neo (since this will probably be just a single machine, the roles are not further divided)
CARD
machine with a USB-attached SD/MMC card reader

All machines are assumed to share the same filesystem layout. At the beginning of each of the sections below, the respective role is indicated. "(all)" is for settings that apply to all machines, or that - for simplicity - can be applied to all of them.


Directory layout

(Roles: all)

$OMDIR (/home/moko)	base directory for the whole tree
  openmoko/		files from OpenMoko subversion (SVN) repository
  openembedded/		files from OpenEmbedded (OE) Monotone repository
  sources/		cached downloads of OE
  build/		OE build directory


Environment variables

(Roles: all)

For simplicity, we just set these environment variables on all hosts involved. If you're not comfortable with this, feel free to weed out the ones you don't need.

Our base directory (configure this for local arrangements):

export OMDIR=/home/moko

The search path for BitBake files. Note that the order is of vital importance.

export BBPATH=$OMDIR/build:$OMDIR/openmoko/trunk/oe:$OMDIR/openembedded


Permissions

(Role: BUILD)

In order to perform the build process, you have to obtain the following permissions:

  • write access to the OpenMoko SVN repository (in principle, it should be possible to simplify this to read access. For further study.)


Build host prerequisites

(Role: BUILD)

There must be at least 7 GB of free space on $OMDIR.

In addition to the traditional development tools (gcc, patch, etc.), the following packages must be installed on the build host:

subversion
version control system used by OpenMoko and others
quilt
patch management system used by the Linux kernel and others
monotone
version control system used by OpenEmbedded. This should be a recent version, e.g., 0.32, although also 0.31 should work.
diffstat
the OE build process wants this
texi2html
this too
git
version control system used by the Linux kernel and others. Do not confuse this with the "GNU Interactive Tools"

Furthermore, the following package can be installed optionally:

psyco
Python just-in-time compiler. Speeds up OpenEmbedded builds (with BitBake) considerably. Strongly recommended.

Gentoo users can obtain all this with (note that, at the time of writing, Monotone 0.32 isn't available without setting the ~x86 keyword):

echo 'dev-util/monotone ~'`readlink /etc/make.profile | awk -F / '{print $6}'`\
  >>/etc/portage/package.keywords
emerge -u subversion quilt monotone diffstat texi2html dev-util/git psyco

Instructions for installing prerequisites in other distributions

If the local user name does not match the user name with which you access SVN, you can put your username in the url you use to checkout, eg. svn ssh://joe@stuff.org/svn/stuff.

Lab host prerequisites

(Role: LAB)

The following package must be installed on the lab host:

xc
a simple communications program for the serial port

Gentoo users can obtain this with:

emerge -u xc

Note that similar communications programs, such as "cu" or "minicom", may be used as well.

Assumptions

(Roles: LAB, CARD)

We make the following assumptions about hardware setup and devices:

  • the serial console of the Neo phone is connected to /dev/ttyS0 on LAB (see Debug_Board)
  • the JTAG wiggler is connected to /dev/parport0 on LAB. See Debug Board and Connecting_GTA01Bv2_with_Debug_Board
  • cards inserted in the SD/MMC card reader appear as /dev/uba on CARD and can be mounted on /mnt/tmp (we'll specify the mount point explicitly, so the directory has to be there, but we don't need to specify the mount point in /etc/fstab). If in doubt,
mkdir -p /mnt/tmp

Obtaining Sources and build system

OpenEmbedded build: initial downloads

First, we obtain a snapshot of the OpenEmbedded-based tree used by OpenMoko, plus the OE build tool called BitBake.


Obtaining OpenMoko SVN tree

(Role: BUILD)

Obtain the latest revision of the OpenMoko tree. Unfortunately, at some places, "current" versions of upstream packages may get included, thus the build may still fail. If it does, you may wish to inform the authorities.

The checkout should take about 45 minutes over an Internet connection with a round-trip time to svn.openmoko.org of 350 ms.

cd $OMDIR
svn co http://svn.openmoko.org/ openmoko

Installing BitBake

(Role: BUILD)

Install version 1.6 of BitBake, the build tool of OE. (This is quick.)

svn co http://svn.berlios.de/svnroot/repos/bitbake/branches/bitbake-1.6/ bitbake
cd bitbake
./setup.py install
cd ..


Obtaining OpenEmbedded snapshot

(Role: BUILD)

Obtain a snapshot of the Monotone repository of OpenEmbedded, then update it to the latest version, and finally check out our "known to be good" revision. We extract things into $OMDIR/openembedded. OE.mtn.bz2 is about 100 MB.

wget http://www.openembedded.org/snapshots/OE.mtn.bz2
bunzip2 OE.mtn.bz2
mtn --db=OE.mtn pull monotone.openembedded.org org.openembedded.dev
mtn --db=OE.mtn checkout --branch=org.openembedded.dev \
  -r e2dbb52fe39df7ef786b6068f6178f29508dfded openembedded

{{note|For advanced users: if you ever want to update to the latest version of the repository, you would do a "pull" (see above), followed by:

cd $OMDIR/openembedded