Difference between revisions of "Building Orbiter for the Nokia 770"

From LinuxMCE
Jump to: navigation, search
(External references)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
These are the instructions to build a version of [[Orbiter]] for the Nokia 770 internet platform. Nokia 770 has an ARM family processor, therefore you will need to cross-compile if your build machine is an Intel.
+
#redirect [[Nokia 770]]
 
+
[[Image:Nokia-orbiter-small-400.jpg]]
+
 
+
==Requirements==
+
You will need:
+
* an Ubuntu box to host the build
+
* the Maemo 1.1 SDK for ARM ( http://repository.maemo.org/stable/1.1/arm/Maemo_Dev_Platform_RS_v1.1_arm.tgz )
+
* Scratchbox cross-compilation toolkit 0.9.8.5 (http://www.scratchbox.org/download/files/sbox-releases/0.9.8/deb/ )
+
  scratchbox-core_0.9.8.5_i386.deb                             
+
  scratchbox-devkit-debian_0.9.8.5_i386.deb                   
+
  scratchbox-doctools_0.9.8.5_i386.deb                         
+
  scratchbox-libs_0.9.8.5_i386.deb                             
+
  scratchbox-toolchain-arm-glibc_0.9.8.5_i386.deb             
+
  scratchbox-toolchain-i686-glibc_0.9.8.5_i386.deb             
+
 
+
==Preparing the Nokia tablet==
+
# Make sure it is connected to the network - check the Connection manager for a WiFi connection
+
# Open an X terminal on the tablet; make a directory in your home dir to hold the Orbiter binaries, say <tt>/home/user/orbiter</tt>
+
# You'll need a way to transfer files from the build machine to the tablet. Either have an HTTP server somewhere on your network, or install OpenSSH on the tablet. If you install OpenSSH, remember to also start it, by doing <tt>/etc/init.d/ssh start</tt>. To get a root prompt, use <tt>sudo gainroot</tt>.
+
 
+
==Preparing the build machine==
+
# Install Scratchbox debs on the build machine
+
# Add yourself as a Scratchbox user: <tt>'''/scratchbox/sbin/sbox_adduser ''username'''''</tt>
+
# Check out a fresh working copy of LinuxMCE from http://svn.plutohome.com/pluto/trunk/src/ into <tt>/scratchbox/users/username/pluto/trunk/src</tt> (username is assumed to be your user name on the build machine)
+
# Copy or symlink the Maemo SDK into <tt>/scratchbox/packages</tt>
+
# Log in to Scratchbox by typing <tt>'''scratchbox'''</tt>
+
# Configure Scratchbox cross-compile target:
+
> '''sbox-config -ct Nokia770'''
+
+
Available compilers:
+
        0) arm-linux-gcc-3.3_3.3.4-glibc-2.3.2.ds1
+
        1) host-gcc
+
        2) i686-linux-gcc-3.3_3.3.4-glibc-2.3.2.ds1
+
+
Enter compiler number: '''0'''
+
+
Available CPU-transparency methods:
+
        sbrsh
+
        qemu-arm
+
        qemu-ppc
+
+
Enter method name (qemu-arm): '''qemu-arm'''
+
+
Available devkits:
+
        debian
+
+
Enter list of devkit names (none): '''debian'''
+
# Select the new cross-compile target: <tt>'''sbox-config -st Nokia770'''</tt>
+
# Unpack the Maemo rootstrap: <tt>'''sbox-config -er /scratchbox/packages/Maemo_Dev_Platform_RS_v1.1_arm.tgz'''</tt>
+
# <tt>'''sbox-config -cc'''</tt>
+
# <tt>'''sbox-config -cf'''</tt>
+
# Update the package list inside Scratchbox by typing <tt>apt-get update</tt>
+
# Install the following build-time dependencies (with <tt>apt-get install</tt>)
+
#* libmysqlclient12-dev
+
#* libid3-dev
+
#* xlibmesa-gl-dev
+
# Before starting to compile Orbiter and its dependencies, type: export SNR_CPPFLAGS="-DMAEMO_NOKIA770" (add there -DDEBUG if you want to see all debug messages) and export SNR_LDFLAGS="". Also, apply that patch to Orbiter Makefile to remove GL and HID dependences:
+
 
+
<pre>
+
--- src-2.0.0.44/src/Orbiter/Makefile  2007-03-05 13:44:44.000000000 -0800
+
+++ tmp/Makefile        2007-06-07 08:02:09.000000000 -0700
+
@@ -23,9 +23,9 @@
+
 
+
 
+
CXXFLAGS += -g -O0
+
-CPPFLAGS += -I/usr/include/SDL -DORBITER -DCACHE_IMAGES -DENABLE_MOUSE_BEHAVIOR -I$(ROOT)/Splitter -I$(ROOT)/OrbiterGen -I$(ROOT)/SDL_Helpers -DHID_REMOTE
+
+CPPFLAGS += -I/usr/include/SDL -DORBITER -DCACHE_IMAGES -DENABLE_MOUSE_BEHAVIOR -I$(ROOT)/Splitter -I$(ROOT)/OrbiterGen -I$(ROOT)/SDL_Helpers
+
LDFLAGS += -L/usr/X11R6/lib
+
-XTRALDLIBS += -lDCECommon -lSDL -lSDL_ttf -lSDL_image -lSGE -lSDL_gfx -lXtst -lXext -lGL -lXrender -lGLU -lSDL_Helpers -lhid
+
+XTRALDLIBS += -lDCECommon -lSDL -lSDL_ttf -lSDL_image -lSGE -lSDL_gfx -lXtst -lXext -lXrender -lSDL_Helpers -lhid
+
 
+
# wmctrl wrapper
+
CPPFLAGS += -I/usr/X11R6/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
+
@@ -38,7 +38,6 @@
+
        ../utilities/linux/wrapper/wrapper_x11.cpp \
+
        ../utilities/linux/wrapper/image_file.cpp \
+
        Linux/win_list_manager.cpp \
+
-      Linux/HIDInterface.cpp \
+
        Linux/OrbiterRenderer_Linux.cpp \
+
        Linux/WindowContext.cpp \
+
        DesignObj_Data.cpp \
+
</pre>
+
 
+
==Building Orbiter==
+
# While inside Scratchbox, go into /pluto/trunk/src/SerializeClass and type <tt>'''make'''</tt>
+
# Go into /pluto/trunk/src/PlutoUtils and type <tt>'''make'''</tt>
+
# Go into /pluto/trunk/src/DCE and type <tt>'''make'''</tt>
+
# Go into /pluto/trunk/src/SDL_Helpers and type <tt>'''make'''</tt>
+
# Go into /pluto/trunk/src/Orbiter and type <tt>'''make bin'''</tt>
+
# After a while, the following files will result in /pluto/trunk/src
+
#* lib/libDCECommon.so
+
#* lib/libSerializeClass.so
+
#* lib/libPlutoUtils.so
+
#* lib/libSDL_Helpers.so
+
#* bin/Orbiter
+
# Copy these files over to the tablet, in /home/user/orbiter
+
# Don't forget strip Orbiter binaries to save space:
+
#* strip lib/*
+
#* strip bin/*
+
 
+
==Running Orbiter==
+
 
+
Before starting Orbiter following applications and libraries should be installed:
+
 
+
* mysql-common
+
* libmysqlclient
+
* libhttpfetcher
+
* libhid (should be removed soon)
+
* libsdl-sge
+
* libsdl-gfx
+
* libsdl
+
* libgle
+
* libxmu
+
* libsdl-ttf
+
* libsdl-image
+
* libsm
+
* libice
+
* libxt
+
* xterm
+
* ssh
+
 
+
To do that just add additional repository repository.maemo.org and activate [http://wiki.snc.sapmi.net/doku.php?id=snc:nokia#red_pill_mode Red Pill Mode]. Additionally, you should [http://maemo.org/community/wiki/howdoibecomeroot/ became a root] on your device.
+
 
+
 
+
In an X terminal On the tablet itself (NOT via ssh) do this:
+
cd /home/user/orbiter
+
export LD_LIBRARY_PATH=.
+
./Orbiter -r xxx.xxx.xxx.xxx -d yy -l orbiter.log
+
where xxx.xxx.xxx.xxx is the IP address of the DCE Router, and yy is the device number assigned to your new Orbiter.
+
 
+
If it complains about missing .so files, copy them over from your Scratchbox on the build machine into /home/user/orbiter on the tablet.
+
 
+
'''Notice:''' you need true type fonts on your Nokia770. The orbiter searches them here - '''/usr/share/truetype/msttcorefonts'''. Just copy this directory from your core to Nokia770 (the Debian package for Nokia is coming soon).
+
 
+
==Building Debian packages==
+
# Dependencies can be found [https://garage.maemo.org/frs/?group_id=162 here]
+
# The latest Orbiter binaries get [https://garage.maemo.org/frs/?group_id=162 here]
+
# Orbiter package - Coming soon
+
 
+
==External references==
+
 
+
* [https://garage.maemo.org/frs/?group_id=162 Plutohome Nokia Orbiter on maemo garage]
+
* [http://smart-home-blog.com/writes/howto-build-plutohome-orbiter-for-nokia770/ Howto Build Plutohome Orbiter for Nokia770]
+
* [http://smart-home-blog.com/writes/nokia770-as-plutohome-orbiter-os2006/ Using Nokia770/N800 as Plutohome Orbiter]
+
* [http://www.maemo.org/platform/docs/tutorials/Maemo_tutorial.html#settingup Maemo Tutorial]
+

Latest revision as of 02:50, 7 December 2007

Redirect to: