Mobile/Build/Maemo Build Instructions: Difference between revisions

From MozillaWiki
< Mobile‎ | Build
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==set up scratchbox==
==set up scratchbox==
The maemo SDK is based around a tool called scratchbox.  This essentially let's you pretend you're not cross compiling.  To set it up, Nokia has written a very useful script
<code><pre>
<code><pre>
wget http://repository.maemo.org/stable/chinook/maemo-scratchbox-install_4.0.sh
wget http://repository.maemo.org/stable/chinook/maemo-scratchbox-install_4.0.sh
Line 9: Line 12:


==set up maemo chinook sdk==
==set up maemo chinook sdk==
you need to create a new shell so your user has the right groups.  you can just log  out and log back in
 
Once you have set up scratchbox, you will need to install the maemo tool chain.  Again, Nokia has provided a very useful script to install this for you.  Simply accept the defaults and type "I accept" at the appropriate time.
 
'''Note:''' you need to create a new login shell so your user is in the sbox group.  you can just log  out and log back in
<code><pre>
<code><pre>
wget http://tablets-dev.nokia.com/4.0/maemo-sdk-install_4.0.sh
wget http://tablets-dev.nokia.com/4.0/maemo-sdk-install_4.0.sh
Line 21: Line 27:


==Build libIDL==
==Build libIDL==
The the maemo SDK comes with just about everything required to build mozilla.  The one thing that is missing is libIDL.  The simplest thing to do is build it:
<code><pre>
<code><pre>
wget http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.9.tar.gz
wget http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.9.tar.gz
Line 32: Line 41:


==Build the the trunk (mozilla 1.9)==
==Build the the trunk (mozilla 1.9)==
Finally, you are ready to build.
<code><pre>
<code><pre>
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/
Line 45: Line 57:
make -f client.mk build_all
make -f client.mk build_all
</pre></code>
</pre></code>
==Run It!==
To run your build in scratchbox, you'll need to install xephyr.  Fortunately if you are on a debian based system, this couldn't be easier.  Just run:
<code><pre>sudo apt-get install xserver-xephyr</pre></code>
To start the xephyr server, run the following from the host machine:
<code><pre>Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite</pre></code>
once the xephyr xserver is running, you can launch your build from within scratchbox:
<code><pre>
$ scratchbox
[sbox-CHINOOK_X86:~] > export DISPLAY=:2
[sbox-CHINOOK_X86:~] > af-sb-init.sh start
[sbox-CHINOOK_X86:~] > cd moz1.9/mozilla/obj-dir-browser-chinook-armel/dist/bin
[sbox-CHINOOK_X86:~] > GRE_HOME=. ./run_mozilla.sh ./TestGtkEmbed
or
[sbox-CHINOOK_X86:~] > GRE_HOME=. ./run_mozilla.sh ./firefox
</pre></code>
==Convenient scripts==
The following scripts can help speed up the process.  You don't even have to start the scratch box shell if you run them with the following commands:
<code><pre>
cat buildlibIDL19.sh | scratchbox -s -p
cat buildmoz19.sh | scratchbox -s -p
</code></pre>
[[buildlibIDL19.sh]]
[[buildmoz19.sh]]

Revision as of 05:22, 15 November 2007

set up scratchbox

The maemo SDK is based around a tool called scratchbox. This essentially let's you pretend you're not cross compiling. To set it up, Nokia has written a very useful script

wget http://repository.maemo.org/stable/chinook/maemo-scratchbox-install_4.0.sh
sudo chmod a+x ./maemo-scratchbox-install_4.0.sh
sudo ./maemo-scratchbox-install_4.0.sh
sudo /scratchbox/sbin/sbox_adduser <your_user_name> yes

set up maemo chinook sdk

Once you have set up scratchbox, you will need to install the maemo tool chain. Again, Nokia has provided a very useful script to install this for you. Simply accept the defaults and type "I accept" at the appropriate time.

Note: you need to create a new login shell so your user is in the sbox group. you can just log out and log back in

wget http://tablets-dev.nokia.com/4.0/maemo-sdk-install_4.0.sh
sh maemo-sdk-install_4.0.sh

echo "sb-conf select CHINOOK_X86"   | scratchbox  -s -p
echo "yes | fakeroot apt-get install maemo-explicit" | scratchbox  -s -p
echo "sb-conf select CHINOOK_ARMEL" | scratchbox  -s -p
echo "yes | fakeroot apt-get install maemo-explicit" | scratchbox  -s -p

Build libIDL

The the maemo SDK comes with just about everything required to build mozilla. The one thing that is missing is libIDL. The simplest thing to do is build it:

wget http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.9.tar.gz
tar -xzvf libIDL-0.8.9.tar.gz 
cd libIDL-0.8.9
./configure 
make
fakeroot make install
cd ..

Build the the trunk (mozilla 1.9)

Finally, you are ready to build.

export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/
mkdir moz1.9
cd moz1.9/
cvs -d:pserver:anonymous@cvs-mirror.mozilla.org/cvsroot co mozilla/client.mk mozilla/browser/config
cd mozilla/
cp browser/config/mozconfig .
echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-dir-browser-chinook-armel" >> mozconfig 
make -f client.mk pull_all
wget https://bugzilla.mozilla.org/attachment.cgi?id=287745
cat attachment.cgi\?id\=287745 | patch -p1
make -f client.mk build_all

Run It!

To run your build in scratchbox, you'll need to install xephyr. Fortunately if you are on a debian based system, this couldn't be easier. Just run:

sudo apt-get install xserver-xephyr

To start the xephyr server, run the following from the host machine:

Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite

once the xephyr xserver is running, you can launch your build from within scratchbox:

$ scratchbox
[sbox-CHINOOK_X86:~] > export DISPLAY=:2
[sbox-CHINOOK_X86:~] > af-sb-init.sh start
[sbox-CHINOOK_X86:~] > cd moz1.9/mozilla/obj-dir-browser-chinook-armel/dist/bin
[sbox-CHINOOK_X86:~] > GRE_HOME=. ./run_mozilla.sh ./TestGtkEmbed 
 
or

[sbox-CHINOOK_X86:~] > GRE_HOME=. ./run_mozilla.sh ./firefox


Convenient scripts

The following scripts can help speed up the process. You don't even have to start the scratch box shell if you run them with the following commands:

cat buildlibIDL19.sh | scratchbox -s -p
cat buildmoz19.sh | scratchbox -s -p

</code>

buildlibIDL19.sh buildmoz19.sh