H2 image

Home | Up

H2 - Software
The default software for the H2 is made up of several interlocking shell scripts, backed up by a compiled C program and a custom kernel. This software is all in userspace, except for the kernel, and may be modified to develop other applications (or improve upon the very rough sketch of an ebook that this software represents).

Since the H2 system uses the LCD port of the xscale to run the display, a framebuffer must be set up in main memory and the LCD peripheral DMA controller pointed to its base. This is accomplished by the kernel at boot time, and consequently the kernel must be modified to make the block of memory mapped to /dev/fb0 the right dimensions. In the 2.6 kernel tree, fb support for the ARM architecture is much improved and simplified. We are using an unmodified build of the gumstix buildroot source tree, with display support turned on and boot command display configuration enabled (using a make menuconfig). With this setup, we can use one kernel for all display configurations, since we can edit the kernel command line in the bootloader.

The Apollo model does not require the fb to be setup since the fb is effectively built into the Apollo PCB.

Probably much about the system could be improved with some judicious writing of kernel level drivers, but we have not had time to do this yet.

Display Control Utilities
Several userspace programs are used to directly control the display. The most important one is a compiled C program which takes a bitmap file as input and takes care of updating the framebufer and initiating an update. It can also take input from stdin, so in scripted operation putput from bzcat is usually redirected to this command.

There is also a compiled C program to scan the GPIO pins for a button press. It can be called in either blocking or non-blocking mode.

Shell Scripts
A series of shell scripts are what ties all these elements together and implements the application level functionality.

/root/ebook_def.sh and /mmc/ebook.sh This script controls operation in ebook mode. If /mmc/ebook.sh exists, that script is used, if not then /root/ebook_def.sh is used.

/root/slides_def.sh and /mmc/slides.sh This script controls operation in slidewhow mode. If /mmc/slides.sh exists, that script is used, if not then /root/slides_def.sh is used.

Design partially original and partially ripped off from other websites
by Holly Gates