Kernel

From Openmoko

Revision as of 23:16, 22 December 2006 by HaraldWelte (Talk | contribs)

Jump to: navigation, search

Contents

General

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

  • S3C2410 Usb Device Controller
    • We use the driver from iPaq H1409 linux project
  • S3C2410 SD Card Controller
  • QT2410 machine support
    • This is just some glue that puts all pieces together
  • S3C2410 touch screen driver
    • Again from iPaq H1409 linux project
  • GTA01 machine support
    • Some glue/configuration to pull all pieces together
  • GSM Communication Infrastructure
    • The kernel-level part (TS07.10 line discipline, GPRS line discipline)


Kernel Patchset

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.

Kernel Configuration

The latest kernel configuration can be found at [2]. Just copy it to the linux-2.6.x/.config file.

Kernel building

The kernel build is executed as normal. We actually only need the "vmlinux" target, not the "zImage".

bootable Kernel image

A bootable kernel image called uImage is available from [3]

creating a bootable kernel image

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.


Kernel Boot Parameters

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.

Kernel Subsystems

In this section we will outline a couple of the GTA01 specific kernel drivers / features / subsystems

Asound driver

high-level requirements

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

  • voice call support
    • passing through the microphone signal to the GSM Modem
    • passing through the GSM Modem audio output to the integrated speaker(s)
    • the microphone input mixer gain will be statically configured according to the dynamic requirements
    • the audio volume that is sent to the GSM modem can be adjusted via line out level
    • the audio volume incoming (from GSM modem -> codec) can be adjusted via speaker out level
  • voice call recording support
    • the user is able to record phone conversations on digital storage inside the phone. Format will be ogg (not important to driver)
    • ideally, the user can choose between recording only incoming or outgoing signal, or both.
    • for both, we'd need to mix both microphone and line-in signals before recording. is this possible?
  • voice call playback support
    • the user is able to playback recorded files during a conversation. this means that PCM playback needs to be mixed with mic input before being passed to line-out (and to the GSM modem)
  • media playback support
    • an audio player can play back mp3/ogg/flac/... files and output sound via integrated speakers or headphone
  • headphone jack switch
    • this is connected to a GPIO of the S3C2410. How to best integrate this with the sound driver? It should just be handled like any other headphone jack reporting of e.g. laptop computers.

implementation

The asound driver will be using the Alsa SoC layer (http://www.rpsys.net/openzaurus/patches/alsa/info.html).

Asoc provides us with

  • modular interface to various codecs (e.g. easy migration to different codecs)
  • advanced power-management and power-saving features
  • orthogonal integration of our machine specific volume control (audio amplifier)

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.


Kernel Todo

  • use bigger font as default
  • speed up in-kernel boot process
    • delay calibration
    • sd-card driver as module
    • framebuffer takes ages
  • check GPIO initialization with regard to GTA01v4 changes

TS07.10 multiplex

PCF50606

  • fix conversion problems when setting alarm time/date
  • add conversion chart for temperature, once battery type NTC data sheet is known
  • add some intelligent shutdown handler when POWER key is pressed for more then 3/5 seconds (input device KEY_POWER?)

backlight

  • first, get a working backlight on/off driver
  • later: implement smooth fade-in, fade-out

vibrator

  • implement it as LED driver
  • test it once prototype with case is available
  • later: implement PWM

USB device driver

  • make sure usb-net works stable with GTA01v4
  • test switching between usb host and usb device

Sound

  • waiting for S3C2410 host asoc support by Wolfson
Personal tools

General

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

  • S3C2410 Usb Device Controller
    • We use the driver from iPaq H1409 linux project
  • S3C2410 SD Card Controller
  • QT2410 machine support
    • This is just some glue that puts all pieces together
  • S3C2410 touch screen driver
    • Again from iPaq H1409 linux project
  • GTA01 machine support
    • Some glue/configuration to pull all pieces together
  • GSM Communication Infrastructure
    • The kernel-level part (TS07.10 line discipline, GPRS line discipline)


Kernel Patchset

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.

Kernel Configuration

The latest kernel configuration can be found at [2]. Just copy it to the linux-2.6.x/.config file.

Kernel building

The kernel build is executed as normal. We actually only need the "vmlinux" target, not the "zImage".

bootable Kernel image

A bootable kernel image called uImage is available from [3]

creating a bootable kernel image

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.


Kernel Boot Parameters

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.

Kernel Subsystems

In this section we will outline a couple of the GTA01 specific kernel drivers / features / subsystems

Asound driver

high-level requirements

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

  • voice call support
    • passing through the microphone signal to the GSM Modem
    • passing through the GSM Modem audio output to the integrated speaker(s)
    • the microphone input mixer gain will be statically configured according to the dynamic requirements
    • the audio volume that is sent to the GSM modem can be adjusted via line out level
    • the audio volume incoming (from GSM modem -> codec) can be adjusted via speaker out level
  • voice call recording support
    • the user is able to record phone conversations on digital storage inside the phone. Format will be ogg (not important to driver)
    • ideally, the user can choose between recording only incoming or outgoing signal, or both.
    • for both, we'd need to mix both microphone and line-in signals before recording. is this possible?
  • voice call playback support
    • the user is able to playback recorded files during a conversation. this means that PCM playback needs to be mixed with mic input before being passed to line-out (and to the GSM modem)
  • media playback support
    • an audio player can play back mp3/ogg/flac/... files and output sound via integrated speakers or headphone
  • headphone jack switch
    • this is connected to a GPIO of the S3C2410. How to best integrate this with the sound driver? It should just be handled like any other headphone jack reporting of e.g. laptop computers.

implementation

The asound driver will be using the Alsa SoC layer (http://www.rpsys.net/openzaurus/patches/alsa/info.html).

Asoc provides us with

  • modular interface to various codecs (e.g. easy migration to different codecs)
  • advanced power-management and power-saving features
  • orthogonal integration of our machine specific volume control (audio amplifier)

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.


Kernel Todo

  • use bigger font as default
  • speed up in-kernel boot process
    • delay calibration
    • sd-card driver as module
    • framebuffer takes ages
  • check GPIO initialization with regard to GTA01v4 changes

TS07.10 multiplex

PCF50606

  • fix conversion problems when setting alarm time/date
  • add conversion chart for temperature, once battery type NTC data sheet is known
  • add some intelligent shutdown handler when POWER key is pressed for more then 3/5 seconds (input device KEY_POWER?)

backlight

  • first, get a working backlight on/off driver
  • later: implement smooth fade-in, fade-out

vibrator

  • implement it as LED driver
  • test it once prototype with case is available
  • later: implement PWM

USB device driver

  • make sure usb-net works stable with GTA01v4
  • test switching between usb host and usb device

Sound

  • waiting for S3C2410 host asoc support by Wolfson