Peters Homepage

Valid HTML 4.01!

Valid CSS!

Airgoo HMT

Linux on the Airgoo HMT


This page describes the current status of Linux on the Airgoo HMT. For hardware specs see here.

Table of Contents

Flash layout

The HMT has a 256MB Samsung NAND flash (K9F2G08U0A) with 128KB blocks, which is currently partitioned like this:

0512KBU-Boot + NAND loader
512KB256KBU-Boot environment
768KB256KBU-Boot environment (failsafe)
1MB2MBLinux Kernel
3MB253MBRoot filesystem

See mach-hmt.c in the Linux kernel for details.

Notice that WinCE on the HMT uses 4 byte hardware ECC, which it stores in byte 1..4 in the OOB data. This format confuses Linux/U-Boot as we currently use software ECC and the kernel/U-Boot will check the first 2 bytes of the OOB to check for bad blocks (because it can be used with both 8bit and 16bit NAND flashes). This means that U-Boot / Kernel will consider all blocks as bad if not patched, so it is recommended to erase the flash after loading U-Boot.


Das U-Boot has been ported to the HMT instead of the WinCE Eboot it comes shipped with. U-Boot configures the basic hardware (clocks, DDR controller, voltage regulator, GPIOs, ..) and is able to boot a Linux kernel from NAND. The needed patches to support the HMT can be found in the u-boot-hmt GIT tree:

This is currently based on the 2009.08 release. Please add it as an external of a u-boot clone instead of cloning the entire tree from there to limit bandwidth use, E.G.:

 git clone git://
 cd u-boot
 git remote add -f hmt git://
 git checkout hmt/master
Notice that U-Boot outputs on the debug serial (uart2) at 115200 bps, 8N1. The LCD isn't used. To build simply do:
make ARCH=arm CROSS_COMPILE=arm-linux- hmt_config
make ARCH=arm CROSS_COMPILE=arm-linux-
And copy u-boot-nand.bin to the HMT. Alternatively this prebuilt u-boot-nand.bin can be used.

It could maybe be interesting to enable LCD support in U-Boot for a splash screen and USB/SD card support for booting alternative kernels. With such a setup, U-Boot could boot a kernel/rootfs from USB/SD if one of the function keys were pressed during boot.

Linux Kernel

The HMT has been registered with machine ID 2254, and basic support is in the mainline kernel since 2.6.32-rc1. Additional work can be found in the linux-hmt tree:

This is currently based on the 2.6.33-rc6. Please add it as an external of a Linux clone instead of cloning the entire tree from there to limit bandwidth use, E.G.:

 git clone git://
 cd linux-2.6
 git remote add -f hmt git://
 git checkout hmt/master
A preconfigured config can be found here: hmt.config. To build simply do:
cp hmt.config .config
make ARCH=arm CROSS_COMPILE=arm-linux- oldconfig
make ARCH=arm CROSS_COMPILE=arm-linux- uImage
And copy arch/arm/boot/uImage to the HMT. Alternatively this prebuilt uImage can be used.

Currently supported hardware is:

  • Serial ports
  • NAND flash
  • LCD and backlight
  • LEDs
  • USB host and device
  • SD card slot
  • Battery charging, but not monitoring
The biggest parts missing are the AC97 audio codec with the peripherals connected to it (audio, touchscreen, battery monitoring) and the WLAN. On top of that a number of smaller items are also missing:
  • Keys
  • IR receiver (LIRC)
  • Video decoder
  • FM transmitter
And more aggresive power management. AC97 support is rumored to be on the way from Samsung.

JTAG access

I'm using OpenOCD with a Amontec JTAGkey-tiny adapter for JTAG access. You'll need the GIT version for NAND flash access and the following added to the bottom of target/samsung_s3c6410.cfg:

nand device s3c6400 s3c6400 0
To use, simply do:
openocd -f interface/jtagkey-tiny.cfg -f target/samsung_s3c6410.cfg
And telnet to 4444 to interface with it. See the User Guide for more details.

Cross compiler

Buildroot can be used to build a cross compiler for the HMT. To reproduce, simply checkout BR and use this hmt-br.config configuration:

git checkout git://
cd buildroot
cp hmt-br.config .config
make oldconfig
And the cross compiler will be located in output/staging/usr/bin.

Root Filesystem

The above Buildroot build will also create a squashfs filesystem suitable for loading onto the HMT. It is stored in output/images/rootfs.arm.squashfs.

Alternatively you can install Debian on it (In this case over NFS, but could be SD as well):