N900 scratch box
configuring scratch box on Ubuntu Lucid
To begin with edit the file /etc/sysctl.conf and add following( :~$ denotes /home/user directory)
:~$vm.vdso_enabled = 0
make the changes visible by
:~$sudo sysctl -p
Now install Xephyr
:~$sudo apt-get install xserver-xephyr
one should have proper proxy setting to download from terminal
Scratchbox is a cross compilation toolkit.
we will install Maemo SDK and Nokia binaries in the Scratchbox.
Scratchbox
download installation script http://repository.maemo.org/unstable/5.0beta2/maemo-scratchbox-install_5.0beta2.sh or get it from attached file below.
and run as root
:~$sudo ./maemo-scratchbox-install_5.0beta2.sh ?u YOUR_USER_NAME
or optionally install as
:~$sudo apt-get install scratchbox-core scratchbox-libs scratchbox-devkit-qemu scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-perl scratchbox-toolchain-host-gcc scratchbox-toolchain-cs2007q3-glibc2.5-arm7 scratchbox-toolchain-cs2007q3-glibc2.5-i486 scratchbox-devkit-svn scratchbox-devkit-git scratchbox-devkit-apt-https
after a heavy download scratchbox will be installed.
Now close the terminal.
If one wish to add a new user , it can be done as following
:~$sudo /scratchbox/sbin/sbox_adduser NEW_USER_NAME
Maemo 5 SDK
Now open a new terminal and
download installation script http://repository.maemo.org/stable/5.0/maemo-sdk-install_5.0.sh or get it from attached file below.
and run it as user
:~$ ./maemo-sdk-install_5.0.sh
Now accept the SDK agreement and Choose option 3 Runtime Environment + All Dev Packages.
One may get error at this step like
ERROR: Scratchbox is not properly set up!
try following
:~$sudo /scratchbox/sbin/sbox_ctl restart
Now one can login in Scratchbox
:~$/scratchbox/login
and get prompt like
[sbox->:~] >
Nokia binaries
Its time to configure the two targets FREMANTLE_X86 and FREMANTLE_ARMEL.
[sbox->:~] > sb-conf st FREMANTLE_X86 -c cs2007q3-glibc2.5-i486 -d perl:debian-etch:doctools:svn:git -t none
[sbox->:~] > sb-conf st FREMANTLE_ARMEL -c cs2007q3-glibc2.5-arm7 -d qemu:perl:debian-etch:doctools:svn:git -t qemu-arm-sb
download the minimal rootstraps
[sbox->:~] > wget http://repository.maemo.org/stable/5.0/armel/maemo-sdk-rootstrap_5.0_armel.tgz http://repository.maemo.org/stable/5.0/i386/maemo-sdk-rootstrap_5.0_i386.tgz
X86
[sbox->:~] >sb-conf se FREMANTLE_X86
[sbox-FREMANTLE_X86: ~] > sb-conf rs maemo-sdk-rootstrap_5.0_10.2010.19-1_i386.tgz
[sbox-FREMANTLE_X86: ~] > sb-conf in -edFL
[sbox-FREMANTLE_X86: ~] > apt-get update
[sbox-FREMANTLE_X86: ~] > fakeroot apt-get install maemo-sdk-debug
for Nokia binaries add a repository at /etc/apt/source.list from here
and your /etc/apt/source.list or /targets/FREMANTLE_X86/etc/apt/sources.list should look like following
deb http://repository.maemo.org/ fremantle/sdk free non-free
deb-src http://repository.maemo.org/ fremantle/sdk free
deb http://repository.maemo.org/ fremantle/tools free non-free
deb-src http://repository.maemo.org/ fremantle/tools free
deb http://repository.maemo.org/ fremantle/XXXXXXXXXXXXXXXXXXXXXXXXX nokia-binaries
Install as
[sbox-FREMANTLE_X86: ~] >fakeroot apt-get install nokia-binaries
ARM
[sbox-FREMANTLE_X86: ~]> sb-conf se FREMANTLE_ARMEL
[sbox-FREMANTLE_ARMEL: ~] > sb-conf rs maemo-sdk-rootstrap_5.0_10.2010.19-1_armel.tgz
[sbox-FREMANTLE_ARMEL: ~] > sb-conf in -edFL
[sbox-FREMANTLE_ARMEL: ~] > apt-get update
[sbox-FREMANTLE_ARMEL: ~] > fakeroot apt-get install maemo-sdk-debug
for Nokia binaries add a repository at /etc/apt/source.list from here
and your /etc/apt/source.list
Install as
[sbox-FREMANTLE_ARMEL: ~] > fakeroot apt-get install nokia-binaries nokia-apps
Installing fakeroot version : 1.4.2.1