The Kernel on the GTA01 is based on a vanilla 2.6.17.7 Linux kernel from kernel.org.
Some additional patches are required for
The latest patchset against the abovementioned vanilla kernel can be found at [1]. This is a so-called "quilt patchset". In order to apply it, you have to untar it into a "patches" directory below the "linux-2.6.x" directory, and then call "quilt push -a", which pushes all patches onto the kernel.
The latest kernel configuration can be found at [2]. Just copy it to the linux-2.6.x/.config file.
The kernel build is executed as normal. We actually only need the "vmlinux" target, not the "zImage".
A bootable kernel image called uImage is available from [3]
u-boot needs all images (such as kernel, initrd, ...) in the form of an uImage. This is basically just a special header adding CRC protection, version information, etc. Pleaes see u-boot for details.
The kernel image (once http://people.gta01.hmw-consulting.de/laforge/tmp/qt2410-biglcd.patch is integrated) has a new boot parameter "tft".
If you boot without any tft= parameter, the 'stock' qt2410 240x320 TFT panel is assumed.
If you boot with "tft=b" ('b' for big), the timings for the SHARP 640x480 TFT panel are used.
In this section we will outline a couple of the GTA01 specific kernel drivers / features / subsystems
The GTA01 audio subsystem is fairly simple, therefore the high-level requirements for the sound driver are simple, too. The features we need to support
The asound driver will be using the Alsa SoC layer (http://www.rpsys.net/openzaurus/patches/alsa/info.html).
Asoc provides us with
Since Asoc is currently lacking both a S3C2410 platform driver and a WM8976 codec driver, we will need to implement both. The codec driver is expected to be easy, since WM8971 and WM8974 are already supported, and the changes are expected to be not too big.
At the time of this writing, asoc-v0.12 (http://www.rpsys.net/openzaurus/patches/alsa/asoc-v0.12.patch) is current. It was written against a 2.6.17 kernel and therefore matches perfectly with our GTA01 kernel.
The 911 button is supported via the "gta01kbd" driver in the kernel (drivers/input/keyboard/gta01kbd.c).
It creates an input event device that only issues "KEY_PHONE" press/unpress events.
The PMU is supported via the "pcf50606" driver in the kernel (drivers/i2c/chips/pcf50606.c).
This driver provides a number of userspace interfaces for the various bits and pieces of the PMU
The real-time clock, including the alarm feature, is implemented as standard RTC (/dev/rtc).
The PMU-integrated watchdog is implemented using the standard watchdog character device.
The voltage regulators are exported to userspace using sysfs, much like lm_sensors.
Every regulator can be read (and written!). The format is ASCII in millivolts.
root@fic-gta01:/sys/devices/platform/s3c2410-i2c/i2c-0/0-0008$ ls -l /sys/bus/i2c/devices/0-0008/voltage_* -rw-r--r-- 1 root root 4096 Sep 3 11:55 /sys/bus/i2c/devices/0-0008/voltage_d1reg -rw-r--r-- 1 root root 4096 Sep 3 11:55 /sys/bus/i2c/devices/0-0008/voltage_d2reg -rw-r--r-- 1 root root 4096 Sep 3 11:55 /sys/bus/i2c/devices/0-0008/voltage_d3reg -rw-r--r-- 1 root root 4096 Sep 3 11:55 /sys/bus/i2c/devices/0-0008/voltage_dcd -rw-r--r-- 1 root root 4096 Sep 3 11:55 /sys/bus/i2c/devices/0-0008/voltage_dcde -rw-r--r-- 1 root root 4096 Sep 3 11:55 /sys/bus/i2c/devices/0-0008/voltage_dcud -rw-r--r-- 1 root root 4096 Sep 3 11:55 /sys/bus/i2c/devices/0-0008/voltage_lpreg root@fic-gta01:/sys/devices/platform/s3c2410-i2c/i2c-0/0-0008$ cat voltage_dcd 1300
The battery voltage (in millivolts) can be read via sysfs
root@fic-gta01:~$ cat /sys/bus/i2c/devices/0-0008/battvolt 3767
The battery charging current (in milliamperes) can be read via sysfs
root@fic-gta01:~$ cat /sys/bus/i2c/devices/0-0008/chgcur 0
The battery temperature (in centigrades) can be read via sysfs
root@fic-gta01:~$ cat /sys/bus/i2c/devices/0-0008/battemp 25
The following GPIO's need to be accessed from userspace: