Notes for current Angstrom build

Audio

enable speakers with toggle in alsamixer (to the right)
export SDL_AUDIO_DRIVER=alsa in case SDL apps aren't defaulting to it.

Larger onscreen keyboard

cd /usr/share/xkbd
lrwxrwxrwx 1 root root 26 Dec 21 18:06 en_US.qwerty.xkbd -> en_GB.qwerty.tabletpc.xkbd
lrwxrwxrwx 1 root root 26 Dec 21 18:06 en_GB.qwerty.xkbd -> en_GB.qwerty.tabletpc.xkbd

USB networking

/etc/network/interfaces
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
pre-up rmmod musb_hdrc
pre-up modprobe musb_hdrc mode_default=2
pre-up modprobe g_ether
address 192.168.0.202
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.200

First bring up tablet usb0 interface, then pc/laptop should appear.  Before disconnecting cable, ifdown usb0 on tablet.

Control tablet with PC keyboard and mouse

install synergy client on tablet with: opkg install synergy
install synergy server on PC/laptop
set -use_cursor to yes in /etc/matchbox/session
configure synergy on server: http://synergy2.sourceforge.net/configuration.html
start synergys on PC/laptop
ssh to archos and start synergy client with synergyc -f [your.server.ip.addr]

CPU scaling

echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

(throttle mhz back from 1ghz when not needed - be kind to your CPU) ondemand governor raises frequency to maximum at once. And conservative one raises by steps, hence conservative suits better for battery-powered devices.

Backlight control

echo 100 > /sys/devices/platform/omap_pwm_led.0/leds/lcd-backlight/brightness
(values from 0-255 are accepted)

PowerVR SGX OpenGLES 3D

The Android kernel that is used with the SDE already contains a pvrsvrkm module. This module is incompatible with the driver this guide installs. In order to use 3D in Angstrom (or any other X11 Linux) you'll need to remove it. To do that, simply recompile the kernel without the module. You can do this be either disabling the module in the kernel config, or by removing it from the source.

Next you'll need to download the SGX driver from TI. You can find the driver on  http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html At the time of writing, the latest version is Graphics_SDK_setuplinux_4_03_00_02.bin

Run the .bin file on a x86 (or x86-64) machine. This will run a setup which will extract the required files to a directory of your choosing. In the new directory, you'll find some files and folders. Two of these folders are important:

  • gfx_rel_es5.x - This folder contains the user space libraries that we'll be using
  • GFX_Linux_KM - This folder contains the sources for the kernel module

The kernel module requires two changes to be able to build with the Archos .29 kernel.

In services4/3rdparty/bufferclass_ti/bc_cat.c around line 606. Make sure the 'width_align' variable always gets a value of 8. The 'cpu_is_omap3530()' function isn't defined in the Archos kernel, so this line will fail to compile. Simply statically defining 'width_align' to 8 works fine.

In services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c correct the includes for the display.h file. This file should be included as and not as

You'll probably also need to make some changes to the build scripts to get the module to build. I hard coded my kernel directory in the Makefile. I also made sure that the CORE variable is always the one for revision 125 (the revision in the Archos Gen8). In Kbuild I replaced the occurrences of TI_PLATFORM with 'omap3630'. These two hacks might not be required. If someone finds a cleaner way, please add to this page.

The module should now build and you'll end up with three .ko files (one in the root directory, two in other directories)

The gfx_rel_es5.x folder contains a nice install.sh script that can be used to install the graphics libraries. Without modification the script will also try to install the build modules. I just wanted it to copy the required library files so I made some small changes. I removed lines 194 to 224 and lines 247 to 250 (basically the lines that deal with the kernel module installation). I then created a new directory 'root' and ran "sudo ./install.sh --root root --no-x --no-display --no-bcdevice". This will copy and install the required libraries and user space programs.

Copy both sets of files, the modules and the user space libs, to the device (or to the rootfs image). The modules should be in /lib/modules/2.6.29-omap1/kernel/drivers/gpu (you'll need to create the gpu directory). Make sure to run 'depmod -a' after you placed them there.

The user space libs can be copied to their place on the device filesystem. Most of the binaries in '/usr/local/bin' aren't required, copying only 'pvrsrvinit' is enough. All files in '/usr/lib' and the rc.pvr init script are required though. While you're copying stuff to the device, also copy a OpenGLES demo from the SDK directory. For example OGLES2Coverflow in GFX_Linux_SDK/OGLES2/SDKPackage/Binaries/X11/Demos/Coverflow/ can be nice as a demo, but you're free to pick any others. As long as they're for X11.

Now, reboot the device in text-only mode (for example by removing the symlink to the startup script of your DM, but changing run-level should also work :) Run the following two commands:

  • fbset -nonstd 0 -depth 16
  • /etc/init.d/rc.pvr start

If fbset isn't installed, first install it. Make sure you have the real version of fbset. The busybox version could cause problems.

After you run the fbset command, the text in the console should change from blue to white. The rc.pvr should not display any errors. You can now check with 'lsmod' if the pvr module is inserted.

If everything so far is OK, start X (for example by starting you DM). In X, open up a terminal and start the demo application you copied to the device. It should now show a window with 3D graphics.

Patch file http://dev.openaos.org/attachment/wiki/Gen8Resources/GFX_Linux_KM_Archos_Gen8.patch

Compiling

working cflags: -O3 -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ffast-math -fsingle-precision-constant 

On screen kernel messages at boot up

- Remove or comment out the 'gunzip -c $BOOT_IMAGE > /dev/fb0' line in init.sh of the initramfs.
- Set the 'console' kernel command line option to 'console=tty1'. (See CONFIG_CMDLINE* kernel config)
NOTE: Kernel messages will disappear after the initramfs is done since bootsplash starts.

TODOs (help wanted!)

- mount /mnt_data writeable by user
- wifi module and configuration
- fix gpe Mini Web Browser
- fix gpe applet for setting screen brightness
- get hardware-scaled framebuffer (overlay) on lcd
- switch to conservative speed governor and shorter dimming timeout when running off battery
- opkg repository for archos-gen8
- fix microphone input 
- get oprofile running with debug / symbol info
- FunAndGames: PocketSNES
- FunAndGames: pcsx-rearmed
- FunAndGames: picodrive
- FunAndGames: dosbox (dynamic recompiler) with improved mouse support

Also take a look at Gen8 developer Notes