Difference between revisions of "Nokia N810"

From ThorstensHome
Jump to: navigation, search
m (1 revision(s))
Line 1: Line 1:
 
This article describes how to compile software for the ARM-based Nokia N810 tablet PC. We use mainly scratchbox on an Intel-based computer. Scratchbox is a cross-compiling environment.  
 
This article describes how to compile software for the ARM-based Nokia N810 tablet PC. We use mainly scratchbox on an Intel-based computer. Scratchbox is a cross-compiling environment.  
 +
 +
Better see http://techbase.kde.org/Projects/Maemo/kdepim
 +
Also look at Xephyr.
  
 
= On the Nokia itself =
 
= On the Nokia itself =
 
== install subversion ==
 
* to install openssh on a nokia 810
 
* activate the maemo repository in the package manager
 
** settings->application manager
 
** tools -> application catalog
 
** memo extras -> edit -> un-tag "disabled"
 
** close
 
** browse installable applications
 
** all
 
** openssh
 
** install
 
ssh root@localhost
 
apt-get install subversion
 
 
= In scratchbox =
 
You cannot install scratchbox on an X64 computer, so, install an i386 into a VMWare virtual machine. This example uses SUSE 11, but it might work on any distribution. The following describes how to install scratchbox into that SUSE 11 32bit.
 
 
== Hello world ==
 
First, we want to compile a "hello world" program for the Nokia. Here is how.
 
* Set up scratchbox
 
root@i386 # wget http://repository.maemo.org/stable/diablo/maemo-scratchbox-install_4.1.sh
 
root@i386 # chmod 777 maemo-scratchbox-install_4.1.sh
 
root@i386 # ./maemo-scratchbox-install_4.1.sh -s /scratchbox
 
root@i386 # /scratchbox/sbin/sbox_adduser myuser
 
root@i386 # su - myuser
 
* set up the SDK
 
myuser@i386 $ wget http://repository.maemo.org/stable/diablo/maemo-sdk-install_4.1.sh
 
Start the install script and accept all choices:
 
myuser@i386 $ sh maemo-sdk-install_4.1.sh
 
* start scratchbox
 
myuser@i386 $ /scratchbox/login
 
[sbox-DIABLO_ARMEL: ~] > sb-conf select DIABLO_ARMEL
 
[sbox-DIABLO_ARMEL: ~] > gcc main.c
 
[sbox-DIABLO_ARMEL: ~] > file a.out
 
a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped
 
* copy the file to your Nokia N810 using scp
 
 
=> the file is executable on the Nokia
 
 
== Re-login ==
 
To re-login after a reboot of your virtual machine run
 
/scratchbox/sbin/sbox_ctl start
 
/scratchbox/login
 
 
== install cmake ==
 
* Here you should better make a snapshot of your virtual machine.
 
* Then create the installation repositories and install cmake:
 
cat >>/etc/apt/sources.list<<EOF
 
# repository with experimental kde packages and dependencies
 
deb http://93.157.1.37/~marijn/maemo binary/
 
deb http://repository.maemo.org/ diablo free non-free
 
deb-src http://repository.maemo.org/ diablo free
 
deb http://repository.maemo.org/extras-devel/ diablo free
 
deb-src http://repository.maemo.org/extras-devel/ diablo free
 
EOF
 
apt-get update
 
apt-get install cmake
 
 
== Install kde applications ==
 
cd
 
apt-get install shared-mime-info
 
apt-get install xsltproc
 
apt-get install kdepimlibs5-dev
 
svn co https://svn.kde.org/home/kde/trunk/kdesupport
 
cd kdesupport
 
cmake . && make && make install
 
svn co https://svn.kde.org/home/kde/branches/KDE/4.1/kdepim
 
cd kdepim
 
cmake . && make && make install
 
Here you can get to run singular applications, e.g. ktimetracker.
 
 
== re-install kdelibs ==
 
 
=== pcre ===
 
curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.7.tar.gz>pcre-7.7.tar.gz
 
tar xvzf pcre-7.7.tar.gz
 
cd pcre-7.7
 
./configure && make && make install
 
 
= Know-how =
 
== manually dpkg ==
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-qt3support_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-designer_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-script_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-dbus_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqtcore4_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqtgui4_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-xml_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-test_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-sql_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-webkit_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-svg_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-assistant_4.4.1-1maemo0_armel.deb
 
wget http://93.157.1.37/~marijn/maemo/binary/libqt4-xmlpatterns_4.4.1-1maemo0_armel.deb
 
 
== install QT ==
 
To install QT, do not use the QT packages from www.trolltech.com, but from
 
svn checkout https://garage.maemo.org/svn/qt4/trunk/qt4-x11-4.4.0
 
ln -s /usr/lib/gtk-2.0/include/gdkconfig.h /usr/include
 
cp -r /usr/include/gtk-2.0/gdk-pixbuf /usr/include
 
cp -r /usr/include/atk-1.0/atk/ /usr/include
 
  
 
=== using dpkg-buildpackage ===
 
=== using dpkg-buildpackage ===
Line 109: Line 10:
 
  cd qt4-x11-4.4.0
 
  cd qt4-x11-4.4.0
 
  dpkg-buildpackage
 
  dpkg-buildpackage
 
==== Problem ====
 
: Dependency provided by Scratchbox: quilt
 
  debian/rules clean
 
debian/rules:16: /usr/share/cdbs/1/rules/patchsys-quilt.mk: No such file or directory
 
make: *** No rule to make target `/usr/share/cdbs/1/rules/patchsys-quilt.mk'.  Stop.
 
 
= TroubleShooting =
 
 
== kernel too old ==
 
If
 
cmake
 
delivers
 
FATAL: kernel too old
 
This happened for me with SLES 10. Better use SUSE 10.3 or SUSE 11.
 
 
== unable to install maemo-sdk-dev ==
 
On SLES 10, I got
 
Processing was halted because there were too many errors.
 
E: Sub-process /scratchbox/devkits/debian-etch/bin/dpkg returned an error code (1)
 
E: Unable to install maemo-sdk-dev on DIABLO_ARMEL target.
 
E: Please check the sources.list for errors.
 
E: Scratchbox login returned error 100.
 
In this case, change your distribution and start again.
 
 
== ld terminated with signal 9 ==
 
Should you get
 
collect2: ld terminated with signal 9 [Killed]
 
Increase the amount of memory for the virtual machine, 512MB is not always enough.
 
 
 
= See also =  
 
= See also =  
 
* http://www.kdedevelopers.org/node/3624
 
* http://www.kdedevelopers.org/node/3624

Revision as of 22:16, 19 January 2009

This article describes how to compile software for the ARM-based Nokia N810 tablet PC. We use mainly scratchbox on an Intel-based computer. Scratchbox is a cross-compiling environment.

Better see http://techbase.kde.org/Projects/Maemo/kdepim Also look at Xephyr.

On the Nokia itself

using dpkg-buildpackage

svn checkout https://garage.maemo.org/svn/qt4/trunk/qt4-x11-4.4.0
cd qt4-x11-4.4.0
dpkg-buildpackage

See also