[Gta04-owner] debian armhf + linux 3.1

Johannes Schauer j.schauer at email.de
Sun Oct 23 02:22:21 CEST 2011


the stuff is not yet complete but mostly working so I thought I let you
already know of the current progress.

So one of my goals was, to get debian armhf running on the gta04. There
seems to be a problem with udev with the 2.6.32 kernel though and I
think it is this bug that I reported a few months ago:
http://bugs.debian.org/625752 But I didnt investigate more and also
didnt want to go for the old kernel but rather try out bleeding edge

So first of all, I built the 3.1 kernel and let me quickly write down
how to do that for everybody who hasnt done it before:

apt-get install emdebian-archive-keyring
echo deb http://www.emdebian.org/debian/ squeeze main >> /etc/apt/sources.list
apt-get update
apt-get install gcc-4.4-arm-linux-gnueabi
git clone git://projects.goldelico.com/gta04-kernel.git
cd gta04-kernel/
git checkout master
export ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=modules_inst
make distclean
make gta04a3_defconfig modules_install uImage -j 5

This setup uses the emdebian toolchain for crosscompiling and is
probably the easiest to setup for Debian(-based) systems. I also updated
this wiki page with the information:

The kernel will now be in arch/arm/boot/uImage and the modules in the
./modules_inst/ directory. modules.dep will also already be generated. I
uploaded both to my server:


Then I prepared my SD card using a more minimal version of the makesd
script which would only create the partitions correctly and populate the
first boot partition but leave the second empty.

#!/bin/sh -e

[ "$SERVER" ] || export SERVER=http://download.goldelico.com/gta04/unstable
[ "$DEV" ] || export DEV=/dev/sdb

## new based on http://omappedia.org/wiki/SD_Configuration#Script_to_partition.2Fformat_SDCards

if [ ! "${DEV}" = "/dev/sda" ] ; then
	if [ -b "$DRIVE" ] ; then dd if=/dev/zero of=$DRIVE bs=1024
                dd if=/dev/zero of=$DRIVE bs=1024 count=1024
                SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
                echo DISK SIZE - $SIZE bytes
                CYLINDERS=`expr $SIZE / 255 / 63 / 512`
                echo CYLINDERS - $CYLINDERS
                echo ,9,0x0C,*
                echo ,,,-
                } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
                mkdosfs -F 32 -n "boot" ${DRIVE}1
                mke2fs -j -L "rootfs" ${DRIVE}2

mkdir -p /media/P1
mount ${DEV}1 /media/P1
wget $SERVER/MLO -O /media/P1/MLO       # must come first
wget $SERVER/u-boot.bin -O/media/P1/u-boot.bin
wget $SERVER/splash.rgb16z -O/media/P1/splash.rgb16z
wget $SERVER/menu.rgb16z -O/media/P1/menu.rgb16z
wget $SERVER/boot.scr -O/media/P1/boot.scr
wget http://mister-muffin.de/gta04/uImage -O /media/P1/uImage
umount ${DEV}1
rmdir /media/P1

You can see it will be pulling the uImage from the url on my server
given above.

Now it is time to populate the second partition. To bootstrap Debian for
armhf I used a script that I cooked up for generating Debian rootfs for
a number of target devices (openmoko gta02, notionink adam, marvell
kirkwood, always innovating touchbook). You can check out the software
here if you want to try it out:


It basically wraps multistrap and its goal is to be able to bootstrap
and configure a foreign Debian rootfs without the need of superuser
priviliges. It does so by using fakeroot, fakechroot and qemu user mode
emulation. In case of questions there is the README, you have my email
address and there is a number of posts on the debian-embedded mailing

The output of the script above, when being run for the goldel-gta04
target is a tarball which I uploaded here and is ready for being
extracted on the second partition of the SD card (it already includes
the modules that I compiled above).


After you extracted this archive onto your second partition you are
ready to plugin your SD card and boot. I must admit that all of this
took me that long because I was waiting for a USB-to-Serial adapter but
today the mail finally arrived :)

To watch the boot process over serial I normally use miniterm:

/usr/share/doc/python-serial/examples/miniterm.py --lf -b 115200 /dev/ttyUSB0

The rootfs will also come with readily configured usb networking. So on
your host computer do:

ifconfig usb0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -j MASQUERADE
ssh root at

After entering your DNS server in /etc/resolv.conf on the gta04 you
should have internet there. If ssh doesnt work you can of course always
use serial to log in.

Maybe this information is of use for someone.

One of the still remaining issues is the display which seems to try to
show a 640x480 image instead of 480x640. Is this maybe a kernel bug?
Any idea how to fix it?

cheers, josch

More information about the Gta04-owner mailing list