Building OpenMoko 2007.1 from scratch

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m
m (revert vandalism)
Line 1: Line 1:
[http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=18 cheap diazepam] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=312 cheap xenical] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=45 nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=285 qwest ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=79 zanaflex online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=247 diazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=305 verizon ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226682379944.html free motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/318.html order lortab] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=62 prozac online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=21 ericsson ringtones] [http://climate.msrc.sunysb.edu/1984/messages/330.html but ortho] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,19 cheap cyclobenzaprine] [http://climate.msrc.sunysb.edu/1984/messages/295.html cheap celexa] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=253 free ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=49 phentermine] [http://climate.msrc.sunysb.edu/1984/messages/300.html free cool ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=52 cheap prozac] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,44 free qwest ringtones] [http://climate.msrc.sunysb.edu/1984/messages/296.html cialis online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=297 sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=60 nexium online] [http://climate.msrc.sunysb.edu/1984/messages/339.html real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/341.html sagem ringtones] [http://climate.msrc.sunysb.edu/1984/messages/351.html tracfone ringtones] [http://climate.msrc.sunysb.edu/1984/messages/328.html free nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=284 free punk ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226172687200.html mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=295 sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,12 ativan online] [http://climate.msrc.sunysb.edu/1984/messages/309.html but hgh] [http://climate.msrc.sunysb.edu/1984/messages/320.html free midi ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=7 alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=23 cheap flexeril] [http://climate.msrc.sunysb.edu/1984/messages/346.html sony ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=39 motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/359.html vicodin online] [http://www.bc.edu/apps/bookstore/cards/jun7-226062830562.html free tracfone ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=42 buy soma] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=260 levitra online] [http://climate.msrc.sunysb.edu/1984/messages/322.html free motorola ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=19 cheap didrex] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=84 cheap sildenafil] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=48 pharmacy online online] [http://climate.msrc.sunysb.edu/1984/messages/366.html zoloft online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=257 hydrocodone online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=63 free sony ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=82 cingular ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=306 viagra] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=47 buy paxil] [http://climate.msrc.sunysb.edu/1984/messages/292.html ambien online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=264 buy lortab] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=28 order hydrocodone] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=85 vigrx online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=10 cheap ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=26 hgh online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=63 sildenafil online] [http://climate.msrc.sunysb.edu/1984/messages/358.html buy viagra] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=71 ortho online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=44 nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/316.html lisinopril] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,24 free funny ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,46 free sony ericsson ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=307 buy vicodin] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,25 hydrocodone] [http://climate.msrc.sunysb.edu/1984/messages/293.html order ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=38 mono ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,18 clonazepam] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=31 levitra] [http://climate.msrc.sunysb.edu/1984/messages/349.html free sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=49 cialis online] [http://climate.msrc.sunysb.edu/1984/messages/347.html sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,26 cheap levitra] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=313 zanaflex online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=44 phentermine] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=12 celexa online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=69 ultracet online] [http://climate.msrc.sunysb.edu/1984/messages/362.html wwe ringtones] [http://climate.msrc.sunysb.edu/1984/messages/343.html free sharp ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,36 buy norco] [http://climate.msrc.sunysb.edu/1984/messages/345.html soma online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=61 cheap ultracet] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=242 free cingular ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=232 cheap adipex] [http://climate.msrc.sunysb.edu/1984/messages/364.html cheap xenical] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=6 cheap albuterol] [http://climate.msrc.sunysb.edu/1984/messages/350.html cheap tenuate] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=83 cheap ortho] [http://climate.msrc.sunysb.edu/1984/messages/325.html free music ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=288 sagem ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=262 cheap lisinopril] [http://climate.msrc.sunysb.edu/1984/messages/319.html meridia online] [http://climate.msrc.sunysb.edu/1984/messages/335.html cheap propecia] [http://climate.msrc.sunysb.edu/1984/messages/360.html cheap vigrx] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=20 cheap diethylpropion] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=233 cheap albuterol] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=40 mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=265 meridia online] [http://climate.msrc.sunysb.edu/1984/messages/307.html free ringtones] [http://climate.msrc.sunysb.edu/1984/messages/354.html cheap ultram] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=61 soma online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=35 cheap lortab] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=292 cheap sildenafil] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,34 free nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/317.html cheap lorazepam] [http://climate.msrc.sunysb.edu/1984/messages/308.html free funny ringtones] [http://climate.msrc.sunysb.edu/1984/messages/368.html diethylpropion online] [http://www.bc.edu/apps/bookstore/cards/jun7-226002359520.html free ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=76 funny ringtones] [http://climate.msrc.sunysb.edu/1984/messages/297.html cingular ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-224302380012.html cheap soma] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=274 nokia ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=55 clonazepam online] [http://climate.msrc.sunysb.edu/1984/messages/367.html zyban online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=64 clomid online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=283 buy prozac] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,53 online valium] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=33 order lisinopril] [http://www.bc.edu/apps/bookstore/cards/jun7-225692379850.html meridia online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=41 buy tramadol] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=60 sharp ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=266 free midi ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=252 flexeril online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=55 real ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=240 celexa online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=314 zoloft online] [http://climate.msrc.sunysb.edu/1984/messages/327.html free nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/304.html ericsson ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,32 free music ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=41 mtv ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,52 order ultram] [http://climate.msrc.sunysb.edu/1984/messages/356.html buy valium] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,55 viagra online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=58 lorazepam online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=13 cheap cialis] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,38 cheap phentermine] [http://climate.msrc.sunysb.edu/1984/messages/326.html buy nexium] [http://www.bc.edu/apps/bookstore/cards/jun7-226732674842.html samsung ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-225822801712.html cheap norco] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=52 meridia online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,48 sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=74 buy rivotril] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,15 order carisoprodol] [http://climate.msrc.sunysb.edu/1984/messages/294.html carisoprodol online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=246 cyclobenzaprine online] [http://climate.msrc.sunysb.edu/1984/messages/369.html free qwest ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226472592872.html free qwest ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=47 cheap fioricet] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=72 verizon ringtones] [http://climate.msrc.sunysb.edu/1984/messages/337.html punk ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=256 cheap hoodia] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=279 pharmacy online online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=300 tracfone ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=301 tramadol] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=287 cheap rivotril] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=68 tramadol online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,21 didrex online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,22 cheap fioricet] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=271 music ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=65 cheap albuterol] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,35 free nokia ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-225582064618.html buy viagra] [http://climate.msrc.sunysb.edu/1984/messages/291.html buy alprazolam] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,59 buy xenical] [http://climate.msrc.sunysb.edu/1984/messages/332.html pharmacy online online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=254 free funny ringtones] [http://climate.msrc.sunysb.edu/1984/messages/365.html order zanaflex] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=250 free ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=17 cyclobenzaprine online] [http://www.bc.edu/apps/bookstore/cards/jun7-225772801698.html adipex online] [http://www.bc.edu/apps/bookstore/cards/jun7-224662404428.html cheap xanax] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,9 free alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=54 free qwest ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=303 ultram online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=296 sonyericsson ringtones] [http://climate.msrc.sunysb.edu/1984/messages/342.html free samsung ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=73 cheap lortab] [http://climate.msrc.sunysb.edu/1984/messages/321.html free mono ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=59 free samsung ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=315 zyban online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=69 cheap celexa] [http://www.bc.edu/apps/bookstore/cards/jun7-226122830578.html free funny ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=310 wwe ringtones] [http://climate.msrc.sunysb.edu/1984/messages/340.html cheap rivotril] [http://climate.msrc.sunysb.edu/1984/messages/298.html but clomid] [http://climate.msrc.sunysb.edu/1984/messages/305.html buy fioricet] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=255 buy hgh] [http://climate.msrc.sunysb.edu/1984/messages/315.html cheap lipitor] [http://climate.msrc.sunysb.edu/1984/messages/310.html cheap hoodia] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=15 clonazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=245 cool ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=66 tenuate online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=53 cheap vicodin] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=77 real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/348.html free sonyericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=27 buy hoodia] [http://climate.msrc.sunysb.edu/1984/messages/352.html buy tramadol] [http://www.bc.edu/apps/bookstore/cards/jun7-226422592864.html nextel ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=54 cheap alprazolam] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,11 ambien online] {|align=right
+
{|align=right
 
  |__TOC__
 
  |__TOC__
 
  |}
 
  |}
Line 105: Line 105:
 
[http://www.openembedded.org/wiki/OEandYourDistro  Instructions for installing prerequisites in other distributions]
 
[http://www.openembedded.org/wiki/OEandYourDistro  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.
+
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  ===
 
===  Lab host prerequisites  ===
Line 176: Line 176:
  
 
{{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:
 
{{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
+
  cd $OMDIR/openembedded && mtn update}}
 +
 
 +
 
 +
Set up the directories for the cache of upstream files and all material
 +
related to local builds, then put our configuration file there (see also
 +
[[OpenMoko#Setting_up_an_OpenMoko_SDK]]):
 +
 
 +
<pre>
 +
mkdir -p sources build/conf
 +
cat <<EOF >build/conf/local.conf
 +
MACHINE = "fic-gta01"
 +
DISTRO = "openmoko"
 +
BUILD_ARCH = "`uname -m`"
 +
EOF
 +
</pre>
 +
 
 +
=== OpenEmbedded build: fixes ===
 +
'''(Role: BUILD)'''
 +
 
 +
There are unfortunately some problems in the build process.
 +
The following fixes work around them:
 +
 
 +
cd $OMDIR/sources
 +
mkdir -p ../build/tmp/stamps/armv4t-linux
 +
 
 +
* upstream moves old packages away, gratuitously breaking downstreams
 +
 
 +
wget http://ftp.mozilla.org/pub/mozilla.org/js/older-packages/js-1.5.tar.gz
 +
touch ../build/tmp/stamps/armv4t-linux/js-1.5-r0.do_fetch
 +
 
 +
* us2.samba.org mirror has vanished
 +
 
 +
wget http://us4.samba.org/samba/ftp/stable/samba-3.0.14a.tar.gz
 +
touch ../build/tmp/stamps/armv4t-linux/samba-3.0.14a-r15.do_fetch
 +
 
 +
* ghastly patch with CRLF and trailing blanks
 +
 
 +
perl -pi.orig -e 's/ *$//;s/\r//g' \
 +
  ../openembedded/packages/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch
 +
 
 +
 
 +
== Building ==
 +
 
 +
=== OpenEmbedded build ===
 +
'''(Role: BUILD)'''
 +
 
 +
openmoko/trunk/oe/conf/site.conf expects the OpenMoko-specific OE packages in $OMDIR/oe
 +
 
 +
cd $OMDIR
 +
ln -s openmoko/trunk/oe .
 +
 
 +
We're now ready to run the build. This will take a while.
 +
 
 +
cd $OMDIR/build
 +
bitbake openmoko-devel-image
 +
 
 +
Note that the build will stop several times to ask for SVN access and whether
 +
to accept certificates. If you're not quick enough to respond, the underlying
 +
session may time out. In this case, just restart "bitbake
 +
openmoko-devel-image" and it will pick up from where it left off.
 +
 
 +
The whole build process involves numerous downloads, takes about 7 hours
 +
on an Athlon 64 3200+ (about 1.5h of delays were caused by ftp.debian.org not
 +
working properly during this test run), and ends with a message like this:
 +
 
 +
Build statistics:
 +
  Attempted builds: 4
 +
 
 +
 
 +
== Installation ==
 +
 
 +
=== Flash boot loader into NAND ===
 +
'''(Role: LAB)'''
 +
 
 +
As a first step, we transfer the u-boot bootloader into NAND Flash, through
 +
the JTAG interface. We use JTAG, since this is the most basic way for doing
 +
this, ensuring that we only depend on as little to work on the Neo as
 +
possible.
 +
 
 +
For this, the u-boot image for the right board version and the desired
 +
build date must be chosen. E.g., an image built for a gta01bv2 board on
 +
February 3, 2007 at 13:40:41 would be called
 +
u-boot_nand-gta01bv2-20070203134041.bin
 +
 
 +
The name is composed as follows:
 +
;u-boot: the name of the component
 +
;nand: it is it be loaded from NAND (not directly from RAM, see also [[Bootloader#Using_JTAG_to_boot_from_RAM]])
 +
;gta01bv2: the hardware revision of the board
 +
;20070203134041: the build date and time
 +
;.bin: this is a binary suitable for flashing/loading
 +
 
 +
If this is the first build, there will only be one image for each board
 +
version, thus we can use wildcards. Change the gta01bv2 below to gta01v3 or
 +
gta01v4, if necessary.
 +
 
 +
See also: [[Sjf2410-linux]]
 +
 
 +
<pre>
 +
cd $OMDIR/build/tmp/deploy/images
 +
 
 +
( echo 0; echo 0; echo 0; echo 3; ) |
 +
  ./sjf2410 -b -f `echo u-boot_nand-gta01bv2-*.bin`
 +
</pre>
 +
 
 +
This will take approximately 12 minutes.
 +
 
 +
 
 +
=== Copy kernel and root FS to microSD card ===
 +
'''(Role: CARD)'''
 +
 
 +
There are several ways to provide the Neo with its kernel and the root file
 +
system. (See [[Bootloader]] for some of them.)
 +
The most self-contained way is to put everything into NAND Flash.
 +
To transfer the files to the Neo, we first place them on the microSD card.
 +
 
 +
Memory cards, including microSD, usually come pre-formatted with VFAT. We
 +
prefer ext2 (e.g., because we may want to store a real Linux file system on the
 +
card as well). The following steps are needed to convert the card from VFAT to
 +
ext2:
 +
<pre>
 +
sfdisk -c /dev/uba 1 83
 +
mke2fs -m0 /dev/uba1
 +
tune2fs -c0 -i0 /dev/uba1
 +
</pre>
 +
 
 +
Next, we copy the kernel uImage and the root file system image to the card.
 +
As discussed in the previous section, we can use wildcards if this is our
 +
first build.
 +
<pre>
 +
cd $OMDIR/build/tmp/deploy/images
 +
mount /dev/uba1 /mnt/tmp
 +
cp uImage-2.6-moko7-r1-fic-gta01-*.bin /mnt/tmp/uImage
 +
cp openmoko-devel-image-fic-gta01-*.rootfs.jffs2 /mnt/tmp/rootfs.jffs2
 +
umount /mnt/tmp
 +
</pre>
 +
 
 +
Now, insert the microSD card into the Neo, but don't power it on yet.
 +
(If you did anyway, don't worry. We'll power cycle it later.)
 +
 
 +
 
 +
=== Serial console ===
 +
'''(Role: LAB)'''
 +
 
 +
We use a serial console connecting through the debug board. This example uses
 +
"xc", which is a small and simple communications program. Many people prefer
 +
"cu" or the considerably more bloated "minicom", which will work as well.
 +
 
 +
* Prepare xc configuration
 +
<pre>
 +
cat <<EOF >$HOME/xc.init
 +
set bps 115200
 +
terminal
 +
EOF
 +
</pre>
 +
 
 +
* Connect to the target
 +
xc -l /dev/ttyS0 -t
 +
 
 +
 
 +
=== Start the Neo and enter the boot prompt ===
 +
'''(Role: LAB)'''
 +
 
 +
Our first interaction with the target. If this doesn't work, please check
 +
that the debug board is connected properly to the serial port.
 +
 
 +
Disconnect power and USB from the phone, wait a couple of minutes, then connect power.
 +
You may have to press and hold the power button on the Neo for a few seconds to turn it on.
 +
The power button is located next to the USB port.
 +
 
 +
Some people have observed stability issues if the device was reset without
 +
power cycling or if USB was not disconnected when power cycling, yet details of what is really happening aren't very clear yet.
 +
 
 +
On the serial console, a message like this should appear:
 +
<pre>
 +
U-Boot 1.2.0 (Feb  3 2007 - 13:07:21)
 +
Press any key to enter the boot prompt:
 +
GTA01Bv2 #
 +
</pre>
 +
 
 +
Note that the boot prompt changes with the hardware revision you have. If the
 +
message does not appear after a few seconds, try power cycling again.
 +
 
 +
If xc responds to pressing a button with
 +
"Verify that you are trying to use a valid and operational tty port."
 +
the port may be stuck, waiting for DCD to be asserted. The quickest way to
 +
get out of this situation is to disconnect the serial cable from the debug
 +
board, run the following command
 +
while ! stty -F /dev/ttyS0 clocal; do : ; done
 +
 
 +
stick something metallic, e.g., a paper clip or a screwdriver, into the plug on the cable,
 +
and keep on fumbling with
 +
it until DCD gets set and the loop above stops spitting out error messages.
 +
 
 +
=== Flash kernel and root FS into NAND ===
 +
'''(Role: LAB)'''
 +
 
 +
We now load the kernel and the root FS from the microSD card into memory and
 +
subsequently transfer them to NAND Flash. All this is done by entering
 +
commands at the boot prompt.
 +
 
 +
Each time we want to write new data to the NAND Flash, we first have to erase
 +
the previous content. We do this individually for each partition. While it would
 +
also be possible to erase some or all relevant partitions in one step, this would
 +
require the user to look up addresses from the partition table and to perform
 +
calculations which are inconvenient at best.
 +
 
 +
See also: [[U-boot]]
 +
 
 +
* Initialize the SD/MMC interface. The "Product Name" shown will be just binary garbage. This is expected behaviour.
 +
 
 +
GTA01Bv2 # mmc
 +
 
 +
* Load the uImage file into memory. "ext2load" stores the number of bytes read as a hexadecimal number in the environment variable "filesize".
 +
 
 +
GTA01Bv2 # ext2load mmc 0 0x32000000 uImage
 +
 
 +
* Erase the kernel partition and write the uImage from memory to NAND Flash
 +
 
 +
GTA01Bv2 # nand erase kernel
 +
GTA01Bv2 # nand write.e 0x32000000 kernel ${filesize}
 +
 
 +
* The root file system is next. We need to specify the correct size, which is shown at the end of "ext2load", e.g., "0x1608000)" in this case:
 +
 
 +
GTA01Bv2 # ext2load mmc 0 0x32000000 rootfs.jffs2
 +
23101440 (0x1608000) bytes read
 +
GTA01Bv2 # nand erase rootfs
 +
GTA01Bv2 # nand write.e 0x32000000 rootfs ${filesize}
 +
 
 +
=== Configure the boot loader ===
 +
'''(Role: LAB)'''
 +
 
 +
Last but not least, we have to set up the boot loader to automatically boot
 +
from Flash. For this, we use the default environment settings, which we obtain
 +
by erasing the old content of the environment, and letting u-boot restore the
 +
settings after a restart.
 +
 
 +
Before touching the environment, you may have to update the environment offset.
 +
Please see [[Migration_to_bad_block_tolerant_builds#Partition_sizing]] for details.
 +
(We may simplify this particularly awkward and error-prone procedure in the
 +
future.)
 +
 
 +
* First, remove erase the old environment:
 +
GTA01Bv2 # nand erase env
 +
 
 +
* We reset to force the boot loader to use the default settings.
 +
GTA01Bv2 # reset
 +
 
 +
Wait until the "U-Boot [...]" message, then hit a key. It will display
 +
*** Warning - bad CRC or NAND, using default environment
 +
 
 +
* Re-generate the partition information in the environment variable "mtdparts":
 +
 
 +
GTA01Bv2 # dynpart
 +
 
 +
* Save the restored settings in NAND
 +
GTA01Bv2 # saveenv
 +
 
 +
* Power cycle to boot the Neo (see remarks above)
 +
 
 +
==  END ==
 +
 
 +
'''Congratulations !''' You've just completed level 1 of the OpenMoko adventure.

Revision as of 16:36, 10 June 2007

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 && mtn update



Set up the directories for the cache of upstream files and all material related to local builds, then put our configuration file there (see also OpenMoko#Setting_up_an_OpenMoko_SDK):

mkdir -p sources build/conf
cat <<EOF >build/conf/local.conf
MACHINE = "fic-gta01"
DISTRO = "openmoko"
BUILD_ARCH = "`uname -m`"
EOF

OpenEmbedded build: fixes

(Role: BUILD)

There are unfortunately some problems in the build process. The following fixes work around them:

cd $OMDIR/sources
mkdir -p ../build/tmp/stamps/armv4t-linux
  • upstream moves old packages away, gratuitously breaking downstreams
wget http://ftp.mozilla.org/pub/mozilla.org/js/older-packages/js-1.5.tar.gz
touch ../build/tmp/stamps/armv4t-linux/js-1.5-r0.do_fetch
  • us2.samba.org mirror has vanished
wget http://us4.samba.org/samba/ftp/stable/samba-3.0.14a.tar.gz
touch ../build/tmp/stamps/armv4t-linux/samba-3.0.14a-r15.do_fetch
  • ghastly patch with CRLF and trailing blanks
perl -pi.orig -e 's/ *$//;s/\r//g' \
  ../openembedded/packages/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch


Building

OpenEmbedded build

(Role: BUILD)

openmoko/trunk/oe/conf/site.conf expects the OpenMoko-specific OE packages in $OMDIR/oe

cd $OMDIR
ln -s openmoko/trunk/oe .

We're now ready to run the build. This will take a while.

cd $OMDIR/build
bitbake openmoko-devel-image

Note that the build will stop several times to ask for SVN access and whether to accept certificates. If you're not quick enough to respond, the underlying session may time out. In this case, just restart "bitbake openmoko-devel-image" and it will pick up from where it left off.

The whole build process involves numerous downloads, takes about 7 hours on an Athlon 64 3200+ (about 1.5h of delays were caused by ftp.debian.org not working properly during this test run), and ends with a message like this:

Build statistics:
  Attempted builds: 4


Installation

Flash boot loader into NAND

(Role: LAB)

As a first step, we transfer the u-boot bootloader into NAND Flash, through the JTAG interface. We use JTAG, since this is the most basic way for doing this, ensuring that we only depend on as little to work on the Neo as possible.

For this, the u-boot image for the right board version and the desired build date must be chosen. E.g., an image built for a gta01bv2 board on February 3, 2007 at 13:40:41 would be called u-boot_nand-gta01bv2-20070203134041.bin

The name is composed as follows:

u-boot
the name of the component
nand
it is it be loaded from NAND (not directly from RAM, see also Bootloader#Using_JTAG_to_boot_from_RAM)
gta01bv2
the hardware revision of the board
20070203134041
the build date and time
.bin
this is a binary suitable for flashing/loading

If this is the first build, there will only be one image for each board version, thus we can use wildcards. Change the gta01bv2 below to gta01v3 or gta01v4, if necessary.

See also: Sjf2410-linux

cd $OMDIR/build/tmp/deploy/images

( echo 0; echo 0; echo 0; echo 3; ) |
  ./sjf2410 -b -f `echo u-boot_nand-gta01bv2-*.bin`

This will take approximately 12 minutes.


Copy kernel and root FS to microSD card

(Role: CARD)

There are several ways to provide the Neo with its kernel and the root file system. (See Bootloader for some of them.) The most self-contained way is to put everything into NAND Flash. To transfer the files to the Neo, we first place them on the microSD card.

Memory cards, including microSD, usually come pre-formatted with VFAT. We prefer ext2 (e.g., because we may want to store a real Linux file system on the card as well). The following steps are needed to convert the card from VFAT to ext2:

sfdisk -c /dev/uba 1 83
mke2fs -m0 /dev/uba1
tune2fs -c0 -i0 /dev/uba1

Next, we copy the kernel uImage and the root file system image to the card. As discussed in the previous section, we can use wildcards if this is our first build.

cd $OMDIR/build/tmp/deploy/images
mount /dev/uba1 /mnt/tmp
cp uImage-2.6-moko7-r1-fic-gta01-*.bin /mnt/tmp/uImage
cp openmoko-devel-image-fic-gta01-*.rootfs.jffs2 /mnt/tmp/rootfs.jffs2
umount /mnt/tmp

Now, insert the microSD card into the Neo, but don't power it on yet. (If you did anyway, don't worry. We'll power cycle it later.)


Serial console

(Role: LAB)

We use a serial console connecting through the debug board. This example uses "xc", which is a small and simple communications program. Many people prefer "cu" or the considerably more bloated "minicom", which will work as well.

  • Prepare xc configuration
cat <<EOF >$HOME/xc.init
set bps 115200
terminal
EOF
  • Connect to the target
xc -l /dev/ttyS0 -t


Start the Neo and enter the boot prompt

(Role: LAB)

Our first interaction with the target. If this doesn't work, please check that the debug board is connected properly to the serial port.

Disconnect power and USB from the phone, wait a couple of minutes, then connect power. You may have to press and hold the power button on the Neo for a few seconds to turn it on. The power button is located next to the USB port.

Some people have observed stability issues if the device was reset without power cycling or if USB was not disconnected when power cycling, yet details of what is really happening aren't very clear yet.

On the serial console, a message like this should appear:

U-Boot 1.2.0 (Feb  3 2007 - 13:07:21)
Press any key to enter the boot prompt:
GTA01Bv2 #

Note that the boot prompt changes with the hardware revision you have. If the message does not appear after a few seconds, try power cycling again.

If xc responds to pressing a button with "Verify that you are trying to use a valid and operational tty port." the port may be stuck, waiting for DCD to be asserted. The quickest way to get out of this situation is to disconnect the serial cable from the debug board, run the following command

while ! stty -F /dev/ttyS0 clocal; do : ; done

stick something metallic, e.g., a paper clip or a screwdriver, into the plug on the cable, and keep on fumbling with it until DCD gets set and the loop above stops spitting out error messages.

Flash kernel and root FS into NAND

(Role: LAB)

We now load the kernel and the root FS from the microSD card into memory and subsequently transfer them to NAND Flash. All this is done by entering commands at the boot prompt.

Each time we want to write new data to the NAND Flash, we first have to erase the previous content. We do this individually for each partition. While it would also be possible to erase some or all relevant partitions in one step, this would require the user to look up addresses from the partition table and to perform calculations which are inconvenient at best.

See also: U-boot

  • Initialize the SD/MMC interface. The "Product Name" shown will be just binary garbage. This is expected behaviour.
GTA01Bv2 # mmc
  • Load the uImage file into memory. "ext2load" stores the number of bytes read as a hexadecimal number in the environment variable "filesize".
GTA01Bv2 # ext2load mmc 0 0x32000000 uImage
  • Erase the kernel partition and write the uImage from memory to NAND Flash
GTA01Bv2 # nand erase kernel
GTA01Bv2 # nand write.e 0x32000000 kernel ${filesize}
  • The root file system is next. We need to specify the correct size, which is shown at the end of "ext2load", e.g., "0x1608000)" in this case:
GTA01Bv2 # ext2load mmc 0 0x32000000 rootfs.jffs2
23101440 (0x1608000) bytes read
GTA01Bv2 # nand erase rootfs
GTA01Bv2 # nand write.e 0x32000000 rootfs ${filesize}

Configure the boot loader

(Role: LAB)

Last but not least, we have to set up the boot loader to automatically boot from Flash. For this, we use the default environment settings, which we obtain by erasing the old content of the environment, and letting u-boot restore the settings after a restart.

Before touching the environment, you may have to update the environment offset. Please see Migration_to_bad_block_tolerant_builds#Partition_sizing for details. (We may simplify this particularly awkward and error-prone procedure in the future.)

  • First, remove erase the old environment:
GTA01Bv2 # nand erase env
  • We reset to force the boot loader to use the default settings.
GTA01Bv2 # reset

Wait until the "U-Boot [...]" message, then hit a key. It will display

*** Warning - bad CRC or NAND, using default environment
  • Re-generate the partition information in the environment variable "mtdparts":
GTA01Bv2 # dynpart
  • Save the restored settings in NAND
GTA01Bv2 # saveenv
  • Power cycle to boot the Neo (see remarks above)

END

Congratulations ! You've just completed level 1 of the OpenMoko adventure.

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