Manual Debian

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m (fixed chroot)
(clean up)
Line 131: Line 131:
 
  chroot /media/card /debootstrap/debootstrap --second-stage
 
  chroot /media/card /debootstrap/debootstrap --second-stage
 
execute the following commands (just copypaste everything below)
 
execute the following commands (just copypaste everything below)
echo "nameserver 192.168.0.200" > /media/card/etc/resolv.conf
 
 
  echo "neo1973-debian" > /media/card/etc/hostname
 
  echo "neo1973-debian" > /media/card/etc/hostname
echo "127.0.0.1 localhost.localdomain localhost neo1973-debian" > /media/card/etc/hosts
 
 
  echo -e "auto lo\n\
 
  echo -e "auto lo\n\
 
  iface lo inet loopback\n\
 
  iface lo inet loopback\n\
Line 150: Line 148:
 
  tmpfs  /var/run        tmpfs  defaults,noatime                  0 0\n\
 
  tmpfs  /var/run        tmpfs  defaults,noatime                  0 0\n\
 
  tmpfs  /var/tmp        tmpfs  defaults,noatime                  0 0" > /media/card/etc/fstab
 
  tmpfs  /var/tmp        tmpfs  defaults,noatime                  0 0" > /media/card/etc/fstab
  echo 'root:' | chroot /media/card/ chpasswd
+
  echo 'root:openmoko' | chroot /media/card/ chpasswd
echo "deb http://ftp.de.debian.org/debian sid main" > /media/card/etc/apt/sources.list
+
chroot /media/card apt-get update
+
chroot /media/card apt-get -y upgrade
+
 
make sure your internal clock is set to the correct date because apt-get and tar will complain if otherwise (does not work on the gta02 at the moment: "Cannot access the Hardware Clock via any known method.")
 
make sure your internal clock is set to the correct date because apt-get and tar will complain if otherwise (does not work on the gta02 at the moment: "Cannot access the Hardware Clock via any known method.")
 
  hwclock --set --date="MM/DD/YY hh:mm:ss"
 
  hwclock --set --date="MM/DD/YY hh:mm:ss"

Revision as of 15:13, 25 December 2008


Contents of this page is probably old and superceded by this new pae : Debian.

Debian on neo1973

This page is to explain how to run Debian armel port on Openmoko devices. You can do this from scratch, or download a prebuilt file system. The former will take some time, perhaps 2 hours, depending on your internet connection

Contents

Prebuilt Filesystem

Download and extract to an ext2/ext3 formatted filesystem on your SD card:

wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2

Note that the above is just a bit too big to fit on a 512MB SD card. A smaller image will soon be provided.

Access via SSH is much the same as under other images using USB Networking, with the user accounts below:

  • root password: openmoko
  • First user and password: openmoko

Note: If you upgrade your your debian and your touchscreen doesn't work any more, you most likely have to adjust /etc/udev/rules.d/50-udev.rules by applying the settings described later in this document for /etc/udev/udev.rules

(Optional) Install Known Good Kernel

This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols and build-in ext3 support.

wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin
./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin

This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good. http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin

(Optional) Recompiling Kernel to Add Drivers

(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)

Steps to build the kernel standalone with the "moredrivers" config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).

 ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6
 ~ - cd linux-2.6
 ~ - git checkout origin/stable
 ~ - edit ./build to point to your compiler path
 ~ - cp defconfig-2.6.24 .config
 ~ - ./build

That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.

Configure booting from SD/SDHC

Do as proposed here: Booting_from_SD

Note that these instructions are in need a rewrite.

Build your own armel filesystem

(Option 1) debootstrap your rootfs on Debian or Ubuntu host

debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/

(option 2) download ready to use armel rootfs

If you don't have debootstrap on your system you can download the results here:

wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz

(option 3) debootstrap on the neo

you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the "prepare sd card" steps beforehand and make sure your sd card is mounted in /media/card/. you also dont have to execute the second stage after doing cdebootstrap

wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb
ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz
tar -xz -C / -f data.tar.gz
rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb
wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb
ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz
tar -xz -C / -f data.tar.gz
cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/

Prepare SD card

ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.

NOTE: it might be a good idea not to use ext3. This is because ext3 is a heavily journalising file system and on the freerunner (sd card) might cause premature death of the card. It is recommened you use ext2 or another similar file system. One also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner. On which to place the kernel to boot off. See the Booting_from_SD If you have not done so already.
fdisk /dev/mmcblk0
We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   
remaining space.
 Command (m for help): d
 Selected partition 1
 Command (m for help): n
 Command action
    e   extended
    p   primary partition (1-4)
 p
 Partition number (1-4): 1
 First cylinder (1-983, default 1):
 Using default value 1
 Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M
 Command (m for help): n
 Command action
    e   extended
    p   primary partition (1-4)
 p
 Partition number (1-4): 2
 First cylinder (18-983, default 18):
 Using default value 18
 Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):
 Using default value 983
 Command (m for help): w
 The partition table has been altered!
 Calling ioctl() to re-read partition table.
 Syncing disks.

Consider a swap partition.

mkfs.vfat /dev/mmcblk0p1

mkfs.ext3 /dev/mmcblk0p2
mount /dev/mmcblk0p2 /media/card

copy the armel chroot to your device by tar'ing it to circumvent symbolic link cycles (https://bugzilla.mindrot.org/show_bug.cgi?id=1059 <= WONTFIX)

tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv

or if you downloaded the archive

cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -

Complete debootstrap Process

if you build the first stage on your host, finish the install with the second stage on the device

chroot /media/card /debootstrap/debootstrap --second-stage

execute the following commands (just copypaste everything below)

echo "neo1973-debian" > /media/card/etc/hostname
echo -e "auto lo\n\
iface lo inet loopback\n\
auto usb0\n\
iface usb0 inet static\n\
    address 192.168.0.202\n\
    netmask 255.255.255.0\n\
    network 192.168.0.0\n\
    gateway 192.168.0.200\n\
    up echo nameserver 192.168.0.200 >/etc/resolv.conf" > /media/card/etc/network/interfaces
echo -e "rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\
proc    /proc            proc    defaults                           0 0\n\
tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\
tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0" > /media/card/etc/fstab
echo 'root:openmoko' | chroot /media/card/ chpasswd

make sure your internal clock is set to the correct date because apt-get and tar will complain if otherwise (does not work on the gta02 at the moment: "Cannot access the Hardware Clock via any known method.")

hwclock --set --date="MM/DD/YY hh:mm:ss"

install openssh so you can login remotely

apt-get install openssh-server

install and configure locales

apt-get install locales
dpkg-reconfigure locales

install udev to dynamically create /dev

apt-get install udev

Get X Running

Now reboot and start Debian. Login with ssh and start configuring xorg:

apt-get install xorg

configure /etc/X11/xorg.conf so that it looks like this:

Section "InputDevice"
       Identifier      "Configured Mouse"
       Driver          "mouse"
       Option          "Device" "/dev/input/mice"
EndSection
Section "Device"
       Identifier      "Configured Video Device"
       Driver          "fbdev"
EndSection
Section "Monitor"
       Identifier      "Configured Monitor"
EndSection
Section "Screen"
       Identifier      "Default Screen"
       Monitor         "Configured Monitor"
EndSection
Section "ServerLayout"
       Identifier      "Default Layout"
       Screen          "Default Screen"
       InputDevice     "Configured Mouse"
EndSection

Start X in the first vt:

startx -- vt1

Get touchscreen working

Install the tslib driver:

apt-get install xserver-xorg-input-tslib

and edit the InputDevice section in your xorg.conf

Section "InputDevice"
       Identifier "Configured Mouse"
       Driver "tslib"
       Option "CorePointer"
       Option "TslibDevice" "/dev/input/event1"
       Option "Protocol" "Auto"
EndSection

calibrate your touchscreen for gta01:

echo -67 36365 -2733100 -48253 -310 45219816 65536 > /etc/pointercal

calibration for the gta02

echo  -67 38667 -4954632 -51172 121 46965312 65536 > /etc/pointercal

Note from Tkrahn:

First the above calibration for gta02 worked fine for me, but after a apt-get update && apt-get upgrade the pointer didn't follow the stylo anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with /etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it moving again. But then the pointer was very far off from the tip of the stylo. Obviously the mode how the calculation of the position worked has changed with the upgrade. I changed the calibration empirically. The following /etc/pointercal parameters worked for me:

0 80000 -8000000 -80500 0 74500000 65536

(On GATA02v5 after the upgrade!)


Start X and enjoy!

startx -- vt1

Install GDM and xfce4

apt-get install gdm xfce4 xvkbd

Configure gdm so xkvbd will allow you to put in your username and password. simply add this to the end of /etc/gdm/Init/Default before exit 0 so that the three last lines look like this:

fi
sleep 20 && /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &
exit 0

Simply click on the focus button of xvkbd and then on the input box of GDM to input your user name and password there. On each boot gdm should start automatically now.

If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:

wget http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png -O /usr/share/images/desktop-base/desktop-background

Clean Up

apt-get clean

Load Additional Kernel Modules

These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.

wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /
depmod -a
echo -e "hci_usb\n\
hidp\n\
ohci-hcd\n\
rfcomm\n\
snd-mixer-oss\n\
snd-pcm-oss\n\
snd-soc-neo1973-wm8753" > /etc/modules

Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753 Sonata on neo1973

Enable Sound

Now we turn our Debian into a jukebox!

apt-get install alsa-base
wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz
tar -xf alsa_state_files-working.tar.gz -C /etc
alsactl -f /etc/alsa_state_files-working/stereoout.state restore
addgroup openmoko audio

I currently use mpd+sonata - let me know if you know another nice lightweight gtk player. Unfortunately RhythmBox is way too much for the Neo to handle - the MP3 playing stops after 20secs.

Enable Modem

Here comes the phone functionality - just add this line into the "serial devices" section in your /etc/udev/rules.d/50-udev.rules

# serial devices
KERNEL=="s3c2410_serial[0-9]",  NAME="ttySAC%n"

Miscellaneous

Chroot installation

If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:

on desktop:

sudo debootstrap --arch armel --foreign sid sid
sudo tar cjf sid.tar.bz2 sid
nc -w3 -lp1234 < sid-arm.tar.bz2

on neo:

cd /media/card
nc 192.168.0.200 1234 | tar -x -j -f -
mount -t none -o bind /dev /media/card/sid/dev
mount -t none -o bind /proc /media/card/sid/proc
mount -t none -o bind /sys /media/card/sid/sys
mount -t none -o bind /tmp /media/card/sid/tmp
chroot /media/card/sid /deboostrap/deboostrap --second-stage
cp /etc/resolv.conf /media/card/sid
chroot /media/card/sid apt-get update
chroot /media/card/sid apt-get install mplayer
chroot /media/card/sid mplayer http://relay.slayradio.org:8000/


Using Xglamo on the FreeRunner

Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to /usr/bin in Debian from FSO/ASU/2007.2/2008.8.

Add this to your .bashrc (to tell tslib to use the correct input device):

export TSLIB_TSDEVICE=/dev/input/event1

The X server binaries are linked against version 1 of tslib, for some reason Debian calls its version 0, even though it actually is version 1. Symlink the library to the alternative name by running (as root):

ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0

We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):

cd /usr/bin && mv X X.orig && ln -s Xfbdev X

(replace Xfbdev by Xglamo if you want to use that, Xglamo is faster, but rotation still does not work correctly as of 2008-08-12).

Rotating screen to landscape

add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode

Option          "Rotate"                "CCW"

Hiding the cursor

To make the cursor invisible create a file called empty.cursor with this content:

#define empty.cursor_width 16
#define empty.cursor_height 16
static unsigned char empty.cursor_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

add

xsetroot -cursor empty.cursor empty.cursor

to your ~/.xinitrc

Official Debian Port

An official Debian port based on the FSO image is being created. First information can be found at http://wiki.debian.org/DebianOnFreeRunner. Early adopters are welcome.

Personal tools


Contents of this page is probably old and superceded by this new pae : Debian.

Debian on neo1973

This page is to explain how to run Debian armel port on Openmoko devices. You can do this from scratch, or download a prebuilt file system. The former will take some time, perhaps 2 hours, depending on your internet connection

Prebuilt Filesystem

Download and extract to an ext2/ext3 formatted filesystem on your SD card:

wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2

Note that the above is just a bit too big to fit on a 512MB SD card. A smaller image will soon be provided.

Access via SSH is much the same as under other images using USB Networking, with the user accounts below:

  • root password: openmoko
  • First user and password: openmoko

Note: If you upgrade your your debian and your touchscreen doesn't work any more, you most likely have to adjust /etc/udev/rules.d/50-udev.rules by applying the settings described later in this document for /etc/udev/udev.rules

(Optional) Install Known Good Kernel

This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols and build-in ext3 support.

wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin
./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin

This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good. http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin

(Optional) Recompiling Kernel to Add Drivers

(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)

Steps to build the kernel standalone with the "moredrivers" config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).

 ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6
 ~ - cd linux-2.6
 ~ - git checkout origin/stable
 ~ - edit ./build to point to your compiler path
 ~ - cp defconfig-2.6.24 .config
 ~ - ./build

That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.

Configure booting from SD/SDHC

Do as proposed here: Booting_from_SD

Note that these instructions are in need a rewrite.

Build your own armel filesystem

(Option 1) debootstrap your rootfs on Debian or Ubuntu host

debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/

(option 2) download ready to use armel rootfs

If you don't have debootstrap on your system you can download the results here:

wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz

(option 3) debootstrap on the neo

you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the "prepare sd card" steps beforehand and make sure your sd card is mounted in /media/card/. you also dont have to execute the second stage after doing cdebootstrap

wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb
ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz
tar -xz -C / -f data.tar.gz
rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb
wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb
ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz
tar -xz -C / -f data.tar.gz
cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/

Prepare SD card

ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.

NOTE: it might be a good idea not to use ext3. This is because ext3 is a heavily journalising file system and on the freerunner (sd card) might cause premature death of the card. It is recommened you use ext2 or another similar file system. One also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner. On which to place the kernel to boot off. See the Booting_from_SD If you have not done so already.
fdisk /dev/mmcblk0
We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   
remaining space.
 Command (m for help): d
 Selected partition 1
 Command (m for help): n
 Command action
    e   extended
    p   primary partition (1-4)
 p
 Partition number (1-4): 1
 First cylinder (1-983, default 1):
 Using default value 1
 Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M
 Command (m for help): n
 Command action
    e   extended
    p   primary partition (1-4)
 p
 Partition number (1-4): 2
 First cylinder (18-983, default 18):
 Using default value 18
 Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):
 Using default value 983
 Command (m for help): w
 The partition table has been altered!
 Calling ioctl() to re-read partition table.
 Syncing disks.

Consider a swap partition.

mkfs.vfat /dev/mmcblk0p1

mkfs.ext3 /dev/mmcblk0p2
mount /dev/mmcblk0p2 /media/card

copy the armel chroot to your device by tar'ing it to circumvent symbolic link cycles (https://bugzilla.mindrot.org/show_bug.cgi?id=1059 <= WONTFIX)

tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv

or if you downloaded the archive

cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -

Complete debootstrap Process

if you build the first stage on your host, finish the install with the second stage on the device

chroot /media/card /debootstrap/debootstrap --second-stage

execute the following commands (just copypaste everything below)

echo "neo1973-debian" > /media/card/etc/hostname
echo -e "auto lo\n\
iface lo inet loopback\n\
auto usb0\n\
iface usb0 inet static\n\
    address 192.168.0.202\n\
    netmask 255.255.255.0\n\
    network 192.168.0.0\n\
    gateway 192.168.0.200\n\
    up echo nameserver 192.168.0.200 >/etc/resolv.conf" > /media/card/etc/network/interfaces
echo -e "rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\
proc    /proc            proc    defaults                           0 0\n\
tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\
tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0" > /media/card/etc/fstab
echo 'root:openmoko' | chroot /media/card/ chpasswd

make sure your internal clock is set to the correct date because apt-get and tar will complain if otherwise (does not work on the gta02 at the moment: "Cannot access the Hardware Clock via any known method.")

hwclock --set --date="MM/DD/YY hh:mm:ss"

install openssh so you can login remotely

apt-get install openssh-server

install and configure locales

apt-get install locales
dpkg-reconfigure locales

install udev to dynamically create /dev

apt-get install udev

Get X Running

Now reboot and start Debian. Login with ssh and start configuring xorg:

apt-get install xorg

configure /etc/X11/xorg.conf so that it looks like this:

Section "InputDevice"
       Identifier      "Configured Mouse"
       Driver          "mouse"
       Option          "Device" "/dev/input/mice"
EndSection
Section "Device"
       Identifier      "Configured Video Device"
       Driver          "fbdev"
EndSection
Section "Monitor"
       Identifier      "Configured Monitor"
EndSection
Section "Screen"
       Identifier      "Default Screen"
       Monitor         "Configured Monitor"
EndSection
Section "ServerLayout"
       Identifier      "Default Layout"
       Screen          "Default Screen"
       InputDevice     "Configured Mouse"
EndSection

Start X in the first vt:

startx -- vt1

Get touchscreen working

Install the tslib driver:

apt-get install xserver-xorg-input-tslib

and edit the InputDevice section in your xorg.conf

Section "InputDevice"
       Identifier "Configured Mouse"
       Driver "tslib"
       Option "CorePointer"
       Option "TslibDevice" "/dev/input/event1"
       Option "Protocol" "Auto"
EndSection

calibrate your touchscreen for gta01:

echo -67 36365 -2733100 -48253 -310 45219816 65536 > /etc/pointercal

calibration for the gta02

echo  -67 38667 -4954632 -51172 121 46965312 65536 > /etc/pointercal

Note from Tkrahn:

First the above calibration for gta02 worked fine for me, but after a apt-get update && apt-get upgrade the pointer didn't follow the stylo anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with /etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it moving again. But then the pointer was very far off from the tip of the stylo. Obviously the mode how the calculation of the position worked has changed with the upgrade. I changed the calibration empirically. The following /etc/pointercal parameters worked for me:

0 80000 -8000000 -80500 0 74500000 65536

(On GATA02v5 after the upgrade!)


Start X and enjoy!

startx -- vt1

Install GDM and xfce4

apt-get install gdm xfce4 xvkbd

Configure gdm so xkvbd will allow you to put in your username and password. simply add this to the end of /etc/gdm/Init/Default before exit 0 so that the three last lines look like this:

fi
sleep 20 && /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &
exit 0

Simply click on the focus button of xvkbd and then on the input box of GDM to input your user name and password there. On each boot gdm should start automatically now.

If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:

wget http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png -O /usr/share/images/desktop-base/desktop-background

Clean Up

apt-get clean

Load Additional Kernel Modules

These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.

wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /
depmod -a
echo -e "hci_usb\n\
hidp\n\
ohci-hcd\n\
rfcomm\n\
snd-mixer-oss\n\
snd-pcm-oss\n\
snd-soc-neo1973-wm8753" > /etc/modules

Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753 Sonata on neo1973

Enable Sound

Now we turn our Debian into a jukebox!

apt-get install alsa-base
wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz
tar -xf alsa_state_files-working.tar.gz -C /etc
alsactl -f /etc/alsa_state_files-working/stereoout.state restore
addgroup openmoko audio

I currently use mpd+sonata - let me know if you know another nice lightweight gtk player. Unfortunately RhythmBox is way too much for the Neo to handle - the MP3 playing stops after 20secs.

Enable Modem

Here comes the phone functionality - just add this line into the "serial devices" section in your /etc/udev/rules.d/50-udev.rules

# serial devices
KERNEL=="s3c2410_serial[0-9]",  NAME="ttySAC%n"

Miscellaneous

Chroot installation

If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:

on desktop:

sudo debootstrap --arch armel --foreign sid sid
sudo tar cjf sid.tar.bz2 sid
nc -w3 -lp1234 < sid-arm.tar.bz2

on neo:

cd /media/card
nc 192.168.0.200 1234 | tar -x -j -f -
mount -t none -o bind /dev /media/card/sid/dev
mount -t none -o bind /proc /media/card/sid/proc
mount -t none -o bind /sys /media/card/sid/sys
mount -t none -o bind /tmp /media/card/sid/tmp
chroot /media/card/sid /deboostrap/deboostrap --second-stage
cp /etc/resolv.conf /media/card/sid
chroot /media/card/sid apt-get update
chroot /media/card/sid apt-get install mplayer
chroot /media/card/sid mplayer http://relay.slayradio.org:8000/


Using Xglamo on the FreeRunner

Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to /usr/bin in Debian from FSO/ASU/2007.2/2008.8.

Add this to your .bashrc (to tell tslib to use the correct input device):

export TSLIB_TSDEVICE=/dev/input/event1

The X server binaries are linked against version 1 of tslib, for some reason Debian calls its version 0, even though it actually is version 1. Symlink the library to the alternative name by running (as root):

ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0

We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):

cd /usr/bin && mv X X.orig && ln -s Xfbdev X

(replace Xfbdev by Xglamo if you want to use that, Xglamo is faster, but rotation still does not work correctly as of 2008-08-12).

Rotating screen to landscape

add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode

Option          "Rotate"                "CCW"

Hiding the cursor

To make the cursor invisible create a file called empty.cursor with this content:

#define empty.cursor_width 16
#define empty.cursor_height 16
static unsigned char empty.cursor_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

add

xsetroot -cursor empty.cursor empty.cursor

to your ~/.xinitrc

Official Debian Port

An official Debian port based on the FSO image is being created. First information can be found at http://wiki.debian.org/DebianOnFreeRunner. Early adopters are welcome.