Web Browser

Instructions for building Qt/Webkit for Silvermoon.

=prereqs=
 * install the GCC 4.3.2 ARM toolchain
 * insert a USB drive (with at least 128M available) into your dev unit and map it to /mnt/usb, or make /mnt/usb writable by your dev user
 * ensure that you have a dev environment with automake v1.6 or better (tested on Ubuntu 8.04).
 * ensure that you also have the libtool package installed (else the tslib build will fail with message "configure.ac:25: error: possibly undefined macro: AC_DISABLE_STATIC" and more)

=build tslib= mkdir -p ~/dev cd ~/dev wget http://github.com/kergoth/tslib/tarball/1.0 tar zxvf kergoth-tslib-1.0-0-*.tar.gz cd kergoth-tslib-*/ ./autogen.sh
 * download tslib 1.0 from http://tslib.berlios.de or http://github.com/kergoth/tslib/tarball/1.0
 * extract tslib
 * run autoconf

./configure --prefix=/mnt/usb --host=arm-linux make make install
 * configure tslib
 * vi config.h and comment out the line that refers to rpl_malloc
 * build and install to /mnt/usb
 * uncomment module_raw input in /mnt/usb/etc/ts.conf

=build openssl= cd ~/dev wget http://files.chumby.com/source/falconwing/build2370/openssl-0.9.7l.tar.gz tar zxvf openssl-0.9.7l.tar.gz cd openssl-0.9.7l ./Configure --prefix=/mnt/usb -no-dso linux-elf-arm shared PATH=/usr/arm-linux/bin:$PATH make && make install
 * download and extract openssl
 * configure and build

=build Qt 4.6.3= cd ~/dev wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.3.tar.gz tar zxvf qt-everywhere-opensource-src-4.6.3.tar.gz cd qt-everywhere-opensource-src-4.6.3 ./configure -embedded arm -pch -prefix /mnt/usb -qt-mouse-tslib -L/mnt/usb/lib/ -I/mnt/usb/include/ -webkit -openssl make && make install
 * download the LGPL version of Qt libraries 4.6.3 for embedded Linux (161 MB) from http://qt.nokia.com/downloads
 * extract Qt
 * configure, build and install to /mnt/usb

=client setup=
 * create the following /mnt/usb/debugchumby script
 * 1) !/bin/sh

stop_control_panel rmmod silvermoon_tsb insmod /mnt/usb/silvermoon-tsb.ko scaled_touchscreen=1 switch_fb.sh 0

if [ ! -e /mnt/storage/browser_etc ]; then cp -rP /etc /mnt/storage/browser_etc fi mount -t loop -o bind /mnt/storage/browser_etc /etc

mkdir -p /mnt/usb/root mount -t loop -o bind /mnt/usb/root /root

export TSLIB_CONFFILE=/mnt/usb/etc/ts.conf export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_TSDEVICE=/dev/input/by-id/soc-noserial-event-ts export QWS_MOUSE_PROTO=Tslib

if [ ! -e /etc/pointercal ]; then /mnt/usb/bin/ts_calibrate sync fi while [ 1 ] ; do /mnt/usb/demos/browser/browser -qws 'www.chumby.com' done wget http://files.chumby.com/browser/silvermoon-tsb.ko -O /mnt/usb/silvermoon-tsb.ko
 * download the latest Silvermoon touch screen driver that supports scaled coordinates to /mnt/usb
 * remove the USB drive from the dev system, insert it into your Silvermoon unit and reboot

=known issues=
 * USB keyboard required for text input
 * To enable USB mouse support, you need to comment out the following line from /mnt/usb/debugchumby, but note that the touch screen will no longer function correctly:
 * 1) export QWS_MOUSE_PROTO=Tslib
 * Once the mouse support is enabled, the screen calibration is off. The current offset appears to be 2x of the current position, so that if you touch the middle of the screen, the cursor appears on the bottom right.

=too lazy?=
 * Download the chumby Silvermoon QT 4.6.3 / Webkit browser zip file, extract it to the root of your USB drive, insert it into your Silvermoon unit and reboot.
 * Alternatively, you can download the chumby Falconwing QT 4.6.3 / Webkit browser for use on chumby One.