Mobile/Build/cs2007q3: Difference between revisions

no edit summary
No edit summary
 
(39 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<code><pre>
== Introduction ==
 
These are instructions for building [[Fennec]] for Nokia Maemo using the Scratchbox cross-compilation environment on Linux.
 
== Maemo 5 (Fremantle) ==
 
We currently use the Maemo 4 SDK for our official Firefox for Maemo 1.x builds, because Maemo 5 is not compatible with the Nokia N800/N810.  If you want to build with the Maemo 5 SDK, see the instructions at [[/Fremantle]].
 
== Maemo 4 (Chinook) ==
 
<pre>
sudo su
sudo su
echo "deb http://scratchbox.org/debian/ stable main" >> /etc/apt/sources.list
echo "deb http://scratchbox.org/debian/ stable main" >> /etc/apt/sources.list
Line 7: Line 17:


##############
##############
# do the secion below if on ubuntu 8.04, skip for Ubuntu 7.1
# do the section below if on ubuntu 8.04, skip for Ubuntu 7.1.  Other OS may
# also have this problem.  If you see a problem when running nsinstall that
# says something "mmap - permission denied", come back here an try this.
# Ubuntu 8.10 sets vm.mmap_min_addr /etc/sysctl.d/10-process-security.conf
# So it is probably better to set the following variables in
# /etc/sysctl.d/40-scratchbox
# and then run 'sudo invoke-rc.d procps restart'
##############
##############
add the following to /etc/sysctl.conf
# add the following to /etc/sysctl.conf


vm.vdso_enabled = 0
vm.vdso_enabled = 0
Line 18: Line 34:


##############
##############
# if on Ubuntu 7.1 continue from here
# Continue from here for all versions of Ubuntu, including 7.10
##############
##############


Line 39: Line 55:
   -d cputransp:debian-etch:doctools:maemo3-tools:perl \
   -d cputransp:debian-etch:doctools:maemo3-tools:perl \
   -t /scratchbox/devkits/cputransp/bin/qemu-arm-cvs-m
   -t /scratchbox/devkits/cputransp/bin/qemu-arm-cvs-m
sb-conf rootstrap CHINOOK-ARMEL-2007 http://repository.maemo.org/stable/4.0.1/armel/maemo-sdk-rootstrap_4.0.1_armel.tgz
sb-conf rootstrap CHINOOK-ARMEL-2007 \
  http://repository.maemo.org/stable/4.0.1/armel/maemo-sdk-rootstrap_4.0.1_armel.tgz
sb-conf install CHINOOK-ARMEL-2007 -cedFGS
sb-conf install CHINOOK-ARMEL-2007 -cedFGS
sb-conf select CHINOOK-ARMEL-2007
sb-conf select CHINOOK-ARMEL-2007
Line 50: Line 67:
fakeroot echo "deb http://repository.maemo.org/extras-devel chinook free non-free" >> /etc/apt/sources.list
fakeroot echo "deb http://repository.maemo.org/extras-devel chinook free non-free" >> /etc/apt/sources.list
fakeroot echo "deb file:/home/$USER/maemo-sdk-nokia-binaries_4.0.1 chinook explicit" >> /etc/apt/sources.list
fakeroot echo "deb file:/home/$USER/maemo-sdk-nokia-binaries_4.0.1 chinook explicit" >> /etc/apt/sources.list
fakeroot yes | apt-get update
yes | fakeroot apt-get update
fakeroot apt-get install libgtk2.0-dev libxaw7-dev libfreetype6-dev libxi-dev libhildonmime-dev libosso-dev libidl-dev liblocation-dev libasound2-dev
yes | fakeroot apt-get install \
  libgtk2.0-dev libxaw7-dev libfreetype6-dev libxi-dev \
  libhildonmime-dev libosso-dev libidl-dev liblocation-dev \
  libasound2-dev libhildon1-dev libiw-dev
 
 
#these packages are needed as of March 3, 2009 for a plugins fix
yes | fakeroot apt-get install libxdamage-dev libxcomposite-dev
 
#this package is needed as of May, 2009 for an alerts service feature in toolkit
yes | fakeroot apt-get install libnotify-dev
 
#this package is needed as of Oct, 2009 for using native hildon file picker in toolkit
yes | fakeroot apt-get install libhildonfm2-dev
 
#this package is needed as of Nov, 2009 for using conic for auto network connections
yes | fakeroot apt-get install libconic0-dev
 
#you now need Python 2.4 to build also
yes | fakeroot apt-get install python2.4


exit
exit
</pre>


</pre></code>
Now continue to [[Mobile/Build/Fennec]] to check out and build the Fennec source code.


= Upgrading a centos ref vm with scratchbox installed =
== Electrolysis ==
<code><pre>
su -
wget http://scratchbox.org/download/files/sbox-releases/stable/tarball/scratchbox-toolchain-cs2007q3-glibc2.5-arm6-1.0.7-3-i386.tar.gz
wget http://scratchbox.org/download/files/sbox-releases/stable/tarball/scratchbox-devkit-cputransp-1.0.7-i386.tar.gz
cd /
tar zxvf ~/scratchbox-toolchain-cs2007q3-glibc2.5-arm6-1.0.7-3-i386.tar.gz
tar zxvf ~/scratchbox-devkit-cputransp-1.0.7-i386.tar.gz


cd /scratchbox/etc
To build the [[Electrolysis]] branch, see [[Mobile/e10s]].
rm resolv.conf
ln /etc/resolv.conf


# exit from running as root, now back to cltbld account.
== Qt ==
/scratchbox/login


sb-conf setup CHINOOK-ARMEL-2007 -c cs2007q3-glibc2.5-arm6 \
Future versions of Maemo will be based primarily on Qt instead of GTK. To build with Qt see [[User:Pjohnsen/MozillaQtBuild]].
  -d cputransp:debian-etch:doctools:maemo3-tools:perl \
  -t /scratchbox/devkits/cputransp/bin/qemu-arm-cvs-m
sb-conf rootstrap CHINOOK-ARMEL-2007 http://repository.maemo.org/stable/4.0.1/armel/maemo-sdk-rootstrap_4.0.1_armel.tgz
sb-conf install CHINOOK-ARMEL-2007 -cedFGS
sb-conf select CHINOOK-ARMEL-2007


exit
== Notes on 64 Bit Ubuntu Ibex ==


wget http://repository.maemo.org/stable/chinook/maemo-sdk-nokia-binaries_4.0.1.sh
Scratchbox contains 32 bit binaries which must be accommodated on a 64 bit system. The easiest way to do this is with a 32 bit chroot. Scratchbox also uses a chroot - so they will be executing 2 deep when the build is done.
chmod +x maemo-sdk-nokia-binaries_4.0.1.sh
sh ./maemo-sdk-nokia-binaries_4.0.1.sh
# you'll have to type 'I agree'


/scratchbox/login
Steps 1 through 4 in http://danielkitta.org/howto/maemo-amd64 provide a guide to setting up a 32 bit chroot under ubuntu. Use "hardy" or "intrepid" instead of "dapper" in the instructions in order to have a glibc current enough to run scratchbox.


wget http://people.mozilla.com/~vladimir/misc/execstack.armel
When that is complete, change to the chroot (linux32 dchroot -c hardy-i386 -d) and you can install scratchbox largely based on the instructions above, with a few modifications:
chmod a+x execstack.armel
fakeroot mv execstack.armel /usr/bin/execstack
execstack -c `find /lib/ -name \*.so.\* -type f`
execstack -c `find /usr/lib/ -name \*.so.\* -type f`
fakeroot echo "deb http://repository.maemo.org/extras-devel chinook free non-free" >> /etc/apt/sources.list
fakeroot echo "deb file:/home/$USER/maemo-sdk-nokia-binaries_4.0.1 chinook explicit" >> /etc/apt/sources.list
fakeroot apt-get update
fakeroot apt-get install libgtk2.0-dev libxaw7-dev libfreetype6-dev libxi-dev libhildonmime-dev libosso-dev libidl-dev liblocation-dev libasound2-dev


exit
* change `uname -m` in maemo-scratchbox-install to be `linux32 uname -m`
</pre></code>
* in sysctl.conf, instead of vm.vdso_enabled =0 , use abi.vsyscall32 = 0 (do this in the real root, not the chroot), Indeed this is needed for either 32 or 64 bit Ibex.
* make certain binfmt_misc is loaded (modprobe -a binfmt_misc)
* inside chroot make sure /proc is mounted (mount /proc)
canmove, Confirmed users
1,584

edits