sudo su
echo "deb http://scratchbox.org/debian/ stable main" >> /etc/apt/sources.list
apt-get update
apt-get install scratchbox-toolchain-cs2007q3-glibc2.5-arm6
exit
##############
# 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.
##############
add the following to /etc/sysctl.conf
vm.vdso_enabled = 0
vm.mmap_min_addr = 4096
Then run
sudo sysctl -p
##############
# if on Ubuntu 7.1 continue from here
##############
wget http://repository.maemo.org/stable/chinook/maemo-scratchbox-install_4.0.1.sh
sudo chmod a+x ./maemo-scratchbox-install_4.0.1.sh
sudo ./maemo-scratchbox-install_4.0.1.sh -s /scratchbox
sudo /scratchbox/sbin/sbox_adduser $USER yes
# you may need to relog into your machine here.
sudo /scratchbox/sbin/sbox_ctl start
wget http://tablets-dev.nokia.com/4.0.1/maemo-sdk-install_4.0.1.sh
chmod +x maemo-sdk-install_4.0.1.sh
bash maemo-sdk-install_4.0.1.sh
/scratchbox/login
sb-conf setup CHINOOK-ARMEL-2007 -c cs2007q3-glibc2.5-arm6 \
-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
wget http://people.mozilla.com/~vladimir/misc/execstack.armel
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 yes | 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
Upgrading a centos ref vm with scratchbox installed
On Centos5, need to make the following changes to sysctl.conf
$ su
# vi sysctl.conf
...and append
vm.vdso_enabled = 0
vm.mmap_min_addr = 4096
#
# /sbin/sysctl -p
...
vm.vdso_enabled = 0
vm.mmap_min_addr = 4096
# exit
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
rm resolv.conf
ln -s /etc/resolv.conf .
# exit from running as root, now back to cltbld account.
/scratchbox/login
sb-conf setup CHINOOK-ARMEL-2007 -c cs2007q3-glibc2.5-arm6 -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
wget http://repository.maemo.org/stable/chinook/maemo-sdk-nokia-binaries_4.0.1.sh
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'
# you'll have to space/more to the end of the EULA, and then enter 'I accept'
/scratchbox/login
wget http://people.mozilla.com/~vladimir/misc/execstack.armel
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
Also, need to do https://wiki.mozilla.org/ReferencePlatforms/Linux-CentOS-5.0#Move_Scratchbox to avoid filling root partition.