Web Browser

From Chumby Wiki
Jump to: navigation, search

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
  • extract tslib
tar zxvf kergoth-tslib-1.0-0-*.tar.gz
cd kergoth-tslib-*/
  • run autoconf
./autogen.sh
  • configure tslib
./configure --prefix=/mnt/usb --host=arm-linux
  • vi config.h and comment out the line that refers to rpl_malloc
  • build and install to /mnt/usb
make
make install
  • 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
  • configure and build
cd openssl-0.9.7l
./Configure --prefix=/mnt/usb -no-dso linux-elf-arm shared
PATH=/usr/arm-linux/bin:$PATH make && make install

build Qt 4.6.3

cd ~/dev
wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.3.tar.gz
  • extract Qt
tar zxvf qt-everywhere-opensource-src-4.6.3.tar.gz
cd qt-everywhere-opensource-src-4.6.3
  • configure, build and install to /mnt/usb
./configure -embedded arm -pch -prefix /mnt/usb -qt-mouse-tslib -L/mnt/usb/lib/ -I/mnt/usb/include/ -webkit -openssl
make && make install

client setup

  • create the following /mnt/usb/debugchumby script
#!/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
  • download the latest Silvermoon touch screen driver that supports scaled coordinates to /mnt/usb
wget http://files.chumby.com/browser/silvermoon-tsb.ko -O /mnt/usb/silvermoon-tsb.ko
  • 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:
#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?