<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.openmoko.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=JoSch&amp;feedformat=atom</id>
		<title>Openmoko - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=JoSch&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Special:Contributions/JoSch"/>
		<updated>2013-05-25T11:23:57Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.6</generator>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-06-26T12:09:15Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: /* Disable Framebuffer Blanking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
or calibrate it yourself until you are happy with the result:&lt;br /&gt;
 apt-get install libts-bin&lt;br /&gt;
 TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/event1 TSLIB_CONSOLEDEVICE=none ts_calibrate&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base alsa-utils gstreamer0.10-alsa&lt;br /&gt;
 cat &amp;gt; /etc/asound.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 pcm.!default {&lt;br /&gt;
     type plug&lt;br /&gt;
     slave.pcm &amp;quot;dmixer&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 pcm.dmixer  {&lt;br /&gt;
     type dmix&lt;br /&gt;
     ipc_key 1024&lt;br /&gt;
     slave {&lt;br /&gt;
         pcm &amp;quot;hw:0,0&amp;quot;&lt;br /&gt;
         period_time 0&lt;br /&gt;
         period_size 1024&lt;br /&gt;
         buffer_size 4096&lt;br /&gt;
         rate 44100&lt;br /&gt;
     }&lt;br /&gt;
     bindings {&lt;br /&gt;
         0 0&lt;br /&gt;
         1 1&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 ctl.dmixer {&lt;br /&gt;
     type hw&lt;br /&gt;
     card 0&lt;br /&gt;
 }&lt;br /&gt;
 __END__&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Disable Framebuffer Blanking ==&lt;br /&gt;
&lt;br /&gt;
the obfuscated way:&lt;br /&gt;
 echo -e '\033[9;0]' &amp;gt; /dev/tty0&lt;br /&gt;
&lt;br /&gt;
the sys-path way:&lt;br /&gt;
 echo -n 0 &amp;gt; /sys/devices/platform/s3c2410-lcd/graphics\:fb0/blank&lt;br /&gt;
&lt;br /&gt;
the debian way:&lt;br /&gt;
 apt-get install console-tools&lt;br /&gt;
 sed -i 's/\(BLANK_TIME\)=30/\1=0/' /etc/console-tools/config&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
To enter the debian chroot environment you could use the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
chroot /media/card/sid /bin/sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-06-23T22:21:07Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: corrected fb blanking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
or calibrate it yourself until you are happy with the result:&lt;br /&gt;
 apt-get install libts-bin&lt;br /&gt;
 TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/event1 TSLIB_CONSOLEDEVICE=none ts_calibrate&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base alsa-utils gstreamer0.10-alsa&lt;br /&gt;
 cat &amp;gt; /etc/asound.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 pcm.!default {&lt;br /&gt;
     type plug&lt;br /&gt;
     slave.pcm &amp;quot;dmixer&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 pcm.dmixer  {&lt;br /&gt;
     type dmix&lt;br /&gt;
     ipc_key 1024&lt;br /&gt;
     slave {&lt;br /&gt;
         pcm &amp;quot;hw:0,0&amp;quot;&lt;br /&gt;
         period_time 0&lt;br /&gt;
         period_size 1024&lt;br /&gt;
         buffer_size 4096&lt;br /&gt;
         rate 44100&lt;br /&gt;
     }&lt;br /&gt;
     bindings {&lt;br /&gt;
         0 0&lt;br /&gt;
         1 1&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 ctl.dmixer {&lt;br /&gt;
     type hw&lt;br /&gt;
     card 0&lt;br /&gt;
 }&lt;br /&gt;
 __END__&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Disable Framebuffer Blanking ==&lt;br /&gt;
&lt;br /&gt;
the obfuscated way:&lt;br /&gt;
 echo -e '\033[9;0]' &amp;gt; /dev/tty0&lt;br /&gt;
&lt;br /&gt;
the sys-path way:&lt;br /&gt;
 echo -n 1 &amp;gt; /sys/devices/platform/s3c2410-lcd/graphics\:fb0/blank&lt;br /&gt;
&lt;br /&gt;
the debian way:&lt;br /&gt;
 apt-get install console-tools&lt;br /&gt;
 sed -i 's/\(BLANK_TIME\)=30/\1=0/' /etc/console-tools/config&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
To enter the debian chroot environment you could use the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
chroot /media/card/sid /bin/sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo1973_Robustness</id>
		<title>Neo1973 Robustness</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo1973_Robustness"/>
				<updated>2009-06-22T12:30:56Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: /* Drops */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of stuff you've done to your neo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Drops ==&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!User||Height fell || Horizontal velocity || Surface it hit || Damage?&lt;br /&gt;
|-&lt;br /&gt;
|josch||3m||bumped off the steps||stairs - fell 14 steps until it reached the basement||battery fell off - completely working afterwards&lt;br /&gt;
|-&lt;br /&gt;
|Speedevil||1m||0||carpet||none&lt;br /&gt;
|-&lt;br /&gt;
|rwhitby||1.3m||0.25m/s||pavement||Front of case separated from middle around the BT antenna (the screws inside had been previously removed), AUX button dislodged (but could be replaced easily), scratches on silver on front top and rear right.&lt;br /&gt;
|-&lt;br /&gt;
|Johan||1.2m||0||tiled floor || none&lt;br /&gt;
|-&lt;br /&gt;
|Pavel||~1m||0||carpet IIRC || Case opened where it should not open, but &amp;quot;repair&amp;quot; was as easy as clicking it back together&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Liquid Exposure ==&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!User||Amount of liquid || Type of liquid || Damage?&lt;br /&gt;
|-&lt;br /&gt;
|bradpitcher||total immersion||water||No apparent damage.  I immediately opened the case and removed the battery, tried to shake off excess water, and let sit to dry for a day before restarting it.  NOTE: this does not mean the Neo is waterproof.  Do NOT try this at home!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!User||Symptom || Circumstances || Damage?&lt;br /&gt;
|-&lt;br /&gt;
|freelock||AUX button broke||One day it just quit clicking, no tactile feedback||Took apart the front of the Neo, and the little contact had popped off the circuit board. Now I need to find a soldering iron and remember how to do this kind of thing!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Neo1973 Hardware]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-06-06T09:56:07Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added alsa-utils&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
or calibrate it yourself until you are happy with the result:&lt;br /&gt;
 apt-get install libts-bin&lt;br /&gt;
 TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/event1 TSLIB_CONSOLEDEVICE=none ts_calibrate&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base alsa-utils gstreamer0.10-alsa&lt;br /&gt;
 cat &amp;gt; /etc/asound.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 pcm.!default {&lt;br /&gt;
     type plug&lt;br /&gt;
     slave.pcm &amp;quot;dmixer&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 pcm.dmixer  {&lt;br /&gt;
     type dmix&lt;br /&gt;
     ipc_key 1024&lt;br /&gt;
     slave {&lt;br /&gt;
         pcm &amp;quot;hw:0,0&amp;quot;&lt;br /&gt;
         period_time 0&lt;br /&gt;
         period_size 1024&lt;br /&gt;
         buffer_size 4096&lt;br /&gt;
         rate 44100&lt;br /&gt;
     }&lt;br /&gt;
     bindings {&lt;br /&gt;
         0 0&lt;br /&gt;
         1 1&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 ctl.dmixer {&lt;br /&gt;
     type hw&lt;br /&gt;
     card 0&lt;br /&gt;
 }&lt;br /&gt;
 __END__&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Disable Framebuffer Blanking ==&lt;br /&gt;
&lt;br /&gt;
the obfuscated way:&lt;br /&gt;
 echo -e '\033[9;0]' &amp;gt; /dev/tty0&lt;br /&gt;
&lt;br /&gt;
the sys-path way:&lt;br /&gt;
 echo -n 0 &amp;gt; /sys/devices/platform/s3c2410-lcd/graphics/fb0/blank&lt;br /&gt;
&lt;br /&gt;
the debian way:&lt;br /&gt;
 apt-get install console-tools&lt;br /&gt;
 sed -i 's/\(BLANK_TIME\)=30/\1=0/' /etc/console-tools/config&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
To enter the debian chroot environment you could use the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
chroot /media/card/sid /bin/sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Distributions</id>
		<title>Distributions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Distributions"/>
				<updated>2009-06-05T12:43:44Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: corrected information about pyneo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Distributions}}&lt;br /&gt;
&lt;br /&gt;
{|align=left&lt;br /&gt;
|__TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== About distributions ==&lt;br /&gt;
Openmoko distributions are designed to run on various mobile devices, with the primary aim of supporting Openmoko Inc.'s [[GTA01:Neo 1973|Neo 1973]] and [[Neo FreeRunner]] phones. They are GNU/Linux distributions -- complete operating systems including user applications. You can install any of them on your phone or even have a dualboot system with two distributions installed. For downloads see [[Download]], for installation instructions see [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
Besides, Openmoko distributions also run on [[Supported devices|other]] mobile devices and some other software distributions also run on the phones of Openmoko Inc.&lt;br /&gt;
&lt;br /&gt;
=== Choosing a distribution ===&lt;br /&gt;
Currently the most used distributions are [[Om 2008]], which comes preinstalled on the Neo FreeRunner, and [[Stable Hybrid Release|SHR]].[http://spreadsheets.google.com/pub?key=p2ZQdcRSVg9XfYLwBVsZicg]&lt;br /&gt;
&lt;br /&gt;
In the future [[Om 2009]] will be the default distribution. It is currently under development and should be released in june 2009. Like SHR it will be based on the [[freesmartphone.org]] framework.&lt;br /&gt;
&lt;br /&gt;
Furthermore, there are many other distributions, like [[Qt Extended]] (for stable basic functions), Google's [[Android]], and some [[Debian]]-based distros.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float:right;width:200px;background-color:#FF6600;text-align:center;border-collapse:collapse;font-weight:bold&amp;quot;&lt;br /&gt;
|&amp;lt;font color=white&amp;gt;Distributions&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! style='background-color:#333333;color:#FFFFFF'|&lt;br /&gt;
&amp;lt;div align=left&amp;gt;&lt;br /&gt;
* &amp;lt;font color='#BBBBBB'&amp;gt;Openmoko (official)&amp;lt;/font&amp;gt;&lt;br /&gt;
** [[Om2009]]&lt;br /&gt;
** [[Om 2008.12 Update]]&lt;br /&gt;
** [[Om 2008.9 Update]]&lt;br /&gt;
** [[Om 2008.8]]&lt;br /&gt;
** [[Om 2007.2]]&lt;br /&gt;
** [[OpenmokoFramework|FSO]]&lt;br /&gt;
* &amp;lt;font color='#BBBBBB'&amp;gt;Om Community&amp;lt;/font&amp;gt;&lt;br /&gt;
** [[SHR]]&lt;br /&gt;
** [[FDOM]]&lt;br /&gt;
* &amp;lt;font color='#BBBBBB'&amp;gt;Other&amp;lt;/font&amp;gt;&lt;br /&gt;
** [[Qtopia]]&lt;br /&gt;
** [[Debian]]&lt;br /&gt;
** [[Gentoo]]&lt;br /&gt;
** [[Android]]&lt;br /&gt;
** [[Hackable:1]]&lt;br /&gt;
** [[neovento]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Please note ===&lt;br /&gt;
&lt;br /&gt;
* Stable in the FreeRunner world does not mean the same thing as stable in the Debian world.&lt;br /&gt;
* Most distributions use the same bootloader, kernel, drivers and hardware. Therefore, the same low level bugs are commonly found in all distributions. The latest and greatest software usually has most bug fixes, plus a whole set of new fresh bugs.&lt;br /&gt;
* Most of these distributions also have package repositories. It is a BAD idea to feed from another distribution's repository.&lt;br /&gt;
* Upgrade path between these distributions are mostly not tested, thus updating by changing the feeds will most likely end in broken packages or even an unbootable system. It is advisable to reflash the whole filesystem with [[dfu-util]] to switch between the different distributions, with the reminder that a dual-boot setup (e.g. via sdcard or NFS) can be used.&lt;br /&gt;
&lt;br /&gt;
== Official Openmoko releases ==&lt;br /&gt;
&lt;br /&gt;
'Release targets' offered by Openmoko Inc. are built out of different branches of the [[OpenEmbedded]] metadistribution source tree.&lt;br /&gt;
&lt;br /&gt;
=== Om series ===&lt;br /&gt;
&lt;br /&gt;
* '''[[Om2009]]''' is intended to be the new distro; it is not a simple follow-on from [[Om 2008.12 Update]].  '''It is still very much in development and by no means ready for production use'''  and is based on the [http://freesmartphone.org freesmartphone.org] milestone 5.5 framework.&lt;br /&gt;
&lt;br /&gt;
{{Main|Om2009}}&lt;br /&gt;
&lt;br /&gt;
* '''[[Om 2008.12 Update]]''' is the second point release after the initial ''Om 2008.9'' release.&lt;br /&gt;
&lt;br /&gt;
{{Main|Om 2008.12 Update}}&lt;br /&gt;
&lt;br /&gt;
* '''[[Om 2008.9 Update]]''' is the first point release after the initial ''Om 2008.8'' release. Openmoko recommends that all existing installations of Om 2008.8 should be updated to that version. Quality-wise, we are still far from the goal, but this version includes general stability enhancing operating system improvements and a new splash screen. No applications were added or removed. Users with basic telephony needs will find it tolerable as an everyday phone.&lt;br /&gt;
&lt;br /&gt;
{{Main|Om 2008.9 Update}}&lt;br /&gt;
&lt;br /&gt;
* '''[[Om 2008.8]]''' was released on August 8, 2008, to replace 2007.2. Prior to that, its codename was ASU (April/August Software Update). This is still the name of the branch in the version control system. This distribution integrates the [http://trolltech.com/products/qtopia Qtopia] phone stack with a set of new Openmoko applications based on the Enlightenment Foundation Libraries ([[EFL_Documentation|EFL]]). Qtopia being a more mature product than the GNOME Mobile stack, the standard phone applications (dialer, contacts, calculator, calendar) work better than in 2007.2. The Qtopia used in 2008.8 was ported to run on X11, contrary to standard Qtopia which uses the framebuffer. This allows non-Qt applications to safely share the screen with Qt applications. This is a .0 release, many unresolved issues remain in the lower layers (kernel power management, sound, wifi drivers...).&lt;br /&gt;
&lt;br /&gt;
{{Main|Om 2008.8}}&lt;br /&gt;
&lt;br /&gt;
* '''[[Om 2007.2]]''' was the first distribution created by Openmoko. The interface was totally finger-oriented,  optimized for 285ppi, and very orange. It used the GTK+ stack, which is part of the [http://www.gnome.org/mobile/ GNOME Mobile] platform. This distribution is now considered obsolete and not being worked on by Openmoko Inc or by OpenedHand. &lt;br /&gt;
&lt;br /&gt;
{{Main|Om 2007.2}}&lt;br /&gt;
&lt;br /&gt;
=== FSO series ===&lt;br /&gt;
&lt;br /&gt;
'''FSO''' is an abbreviation for FreeSmartphone.Org. Openmoko is working on a stable system services back-end. Focus is on stable highlevel services that you can access from whatever language or UI that supports [http://dbus.freesmartphone.org/ dbus]. The framework will be used in forthcoming Openmoko distributions. FSO is all about middleware, but if one stacks a bootloader+kernel under it and telephony applications on top, one gets a functional distribution. These are made available as FSO-image milestones. &lt;br /&gt;
&lt;br /&gt;
* '''FSO Milestone V''' was released and named 'Calling All Stations'. The telephony application on top of it is Zhone. This is a basic Python dialer/homescreen designed as scaffolding to test the FSO functionalities (even if Zhone is pretty, code path coverage is more critical to it than user-friendliness). More details at &lt;br /&gt;
[http://wiki.openmoko.org/wiki/OpenmokoFramework/Status_Update_6 Status Update 6]. You can grab it from http://downloads.freesmartphone.org/fso-stable/milestone5.1/ . &lt;br /&gt;
&lt;br /&gt;
{{Main|FSO}}&lt;br /&gt;
&lt;br /&gt;
== Openmoko community releases ==&lt;br /&gt;
&lt;br /&gt;
=== SHR - Stable Hybrid Release ===&lt;br /&gt;
&lt;br /&gt;
SHR is a community driven distribution. It contains some basic EFL based applications which make use of the FSO. There currently is an [[EFL_Documentation|EFL]] (with elementary) dialer, messages and contacts application programmed in C, as well as a nice Settings-GUI in Python. As of April 12th, 2009, there is no stable release of this distribution yet, as the SHR team doesn't feel it to be good enough. You can find images though on the [http://shr.bearstech.com/shr-testing SHR buildhost].&lt;br /&gt;
&lt;br /&gt;
{{Main|Stable Hybrid Release}}&lt;br /&gt;
&lt;br /&gt;
=== FDOM (FAT and Dirty Openmoko) ===&lt;br /&gt;
&lt;br /&gt;
[[FDOM]] is a distribution based on Openmoko's currently supported image, updated with many ready-to-use applications and with fixes posted in the mailing lists. A combination of applications (everything goes) and fixes to demonstrate the capabilities of the Freerunner and to have a functional phone (sort of). This all while retaining the ability to update through the official feeds.&lt;br /&gt;
&lt;br /&gt;
{{Main|FDOM}}&lt;br /&gt;
&lt;br /&gt;
=== Non-Openmoko distributions ===&lt;br /&gt;
&lt;br /&gt;
These are not Openmoko (and OE) based distributions. These are alternatives you can run on your Openmoko phones.&lt;br /&gt;
&lt;br /&gt;
==== Qt Extended ====&lt;br /&gt;
Qt Extended has had several names. The current name is &amp;lt;b&amp;gt;Qt Extended Improved&amp;lt;/b&amp;gt;. An Openmoko-based community develops Qt Extended Improved as a Free Software project. Qt Extended Improved builds on the foundation of Qt Extended/Qtopia/Qt by Qt Software/Trolltech. Qt Extended Improved provides a robust telephony stack, a webkit based browser and other smartphone features.&lt;br /&gt;
&lt;br /&gt;
On 5th March 2009 Qt Software released Qt Extended 4.4.3. On 3rd March 2009 Qt Software announced that Qt Extended would 4.4.3 would be the last release of the Qt Extended product. Prior to version 4.3, Qt Extended was known as Qtopia.&lt;br /&gt;
&lt;br /&gt;
{{Main|Qtopia / Qt Extended on FreeRunner}}&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
Debian is &amp;quot;the universal operating system&amp;quot;. It comes with thousands and thousands of packages (most of them designed for desktops or servers so far). So in the words of Joachim &amp;quot;nomeata&amp;quot; Breitner from the [http://wiki.debian.org/Teams/DebianFSO pkg-fso] team, this is not really a distribution in the Openmoko sense of the word, but rather a different underlying system for Openmoko distributions. At the moment, we ship the software from the FSO stack, but hopefully we’ll also have, for example, the Stable Hybrid Release software in our archive. So for now, Debian is a different way of installing FSO, which takes more space and provides more programs :-)&lt;br /&gt;
&lt;br /&gt;
{{Main|Debian}}&lt;br /&gt;
&lt;br /&gt;
==== [[Gentoo ]]====&lt;br /&gt;
Gentoo is all about choices. When installing Gentoo, this is made clear to you several times -- you can choose how much you want to compile yourself, how to install Gentoo, what system logger you want, etc. Gentoo is a fast, modern metadistribution with a clean and flexible design. Gentoo is built around free software and doesn't hide from its users what is beneath the hood. Portage, the package maintenance system which Gentoo uses, is written in Python, meaning you can easily view and modify the source code. Gentoo's packaging system uses source code (although support for precompiled packages is included too) and configuring Gentoo happens through regular textfiles. In other words, openness everywhere.&lt;br /&gt;
&lt;br /&gt;
{{Main|Gentoo}}&lt;br /&gt;
&lt;br /&gt;
==== Android ====&lt;br /&gt;
[http://code.google.com/android/ Android] is a software stack for mobile devices developed by the [http://www.openhandsetalliance.com/ The Open Handset Alliance.] Openmoko is fully supporting Android running on the Freerunner.&lt;br /&gt;
&lt;br /&gt;
Android has now reached a point where it is usable on the FreeRunner as an everyday phone, there are, however, still some caveats. Check out the main Android section of the wiki for more info.&lt;br /&gt;
&lt;br /&gt;
{{Main|Android}}You can also visit the user web page for [http://wiki.openmoko.org/wiki/User:Seanmcneil3 Sean McNeil] for some more info.&lt;br /&gt;
&lt;br /&gt;
====Slackware====&lt;br /&gt;
As of release 12.2, Slackware is now officially supported on the Neo Freerunner&lt;br /&gt;
[http://armedslack.org/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Hackable:1====&lt;br /&gt;
Hackable1 is a community distribution for hackable devices like the Neo Freerunner. It is based on Debian and 2007.2 userland which has been abandoned by Openmoko. It follows the GNOME mobile platform. &lt;br /&gt;
{{Main|Hackable:1}}&lt;br /&gt;
&lt;br /&gt;
====[[neovento]]====&lt;br /&gt;
neovento (ex FYP) is a [[Debian|Debian on Freerunner]] based [[Distributions|distribution]] which uses [http://lxde.org/ LXDE] and [[Zhone]] on top. It is a [http://freeyourphone.de FreeYourPhone.de] community project. &lt;br /&gt;
&lt;br /&gt;
{{Main|neovento}}&lt;br /&gt;
&lt;br /&gt;
====[[OpenWRT]]====&lt;br /&gt;
The OpenWRT Development Trunk supports Freerunner, too. [http://www.openwrt.org/] &lt;br /&gt;
&lt;br /&gt;
==== Others / unreleased ====&lt;br /&gt;
* The [http://www.neopwn.com/software.php NeoPwn] network auditng system's core is a modified Linux 2.6.24 kernel, with cross-compiled module driver support for the numerous compatible addon devices running on a FULL Debian (ARMEL) operating system. The filesystem has been optimized for performance and size and includes the NeoPwn menu system and several GUI dialogs for hardware control and attack automation. ''Status: Unknown, the GPL requires source code to be distributed only to customers''.&lt;br /&gt;
* [http://runningbear.org/trac RunningBear] is an innovative, yet free and open-source Operating System for hackable devices driven by Bearstech. Lightweight, Portable, Secure, Friendly and Useful. ''Status: In development''.&lt;br /&gt;
* [http://pokylinux.org/ Poky] and Sato, by OpenedHand/Intel. An open source platform build tool derived from OE. It is a complete software development environment for the creation of Linux devices. It enables you to design, develop, build, debug, and test a complete, modern, software stack using Linux, the X Window System and GNOME Mobile based application frameworks for both ARM and x86 based platforms. ''Status: The &amp;quot;Nightly Build&amp;quot; Image works fine on Neo Freerunner, but phone functionality doesn't.''&lt;br /&gt;
* [http://pyneo.org/ PyNeo] pyneo is a stack for mobile devices excessivly using dbus, glib and evas. Pyneo is NO distribution but a middleware or framework like FSO which itself developed from a very early version of pyneo. Current pyneo images are entirely based on debian instead of oe. ''Status: still active and in development! ask around on #pyneo.org ''&lt;br /&gt;
* [http://www.quantum-step.com/ mySTEP] by Openmoko distributor Golden Delicious Computers is based on GNUstep and brings a Objective-C API to the Neo. Core GUI frameworks are &amp;quot;Foundation&amp;quot; &amp;amp; &amp;quot;AppKit&amp;quot;. It has been shown on FOSDEM 2008, LinuxTag 2008 and SYSTEMS 2008 to run on the Neo 1973. If someone reengineers UIKit, (open) source code compatibility to iPhone apps appears achievable. ''Status: it does not have its own kernel so a Freerunner distribution waits for a solid basis and an arm-linux-gnueabi toolchain that runs natively on Mac OS X is currently lacking.''&lt;br /&gt;
&lt;br /&gt;
== Features by distribution/release target ==&lt;br /&gt;
&lt;br /&gt;
Generally, distributions can differ on one or more of the following components:&lt;br /&gt;
* The bootsplash screen image. This is purely decorative.&lt;br /&gt;
* The bootloader. Theoretically, any version of ''uboot'' could be used with any distribution. In the future ''Qi'' will replace ''uboot''.&lt;br /&gt;
* The kernel. GNU/Linux kernels versions 2.6.24, 2.6.26 or 2.6.28 can be found. Some have modules compiled in, others have modules compiled separately. If compiled separately, modules can be distributed in the same package file as the kernel or separately.&lt;br /&gt;
* Middleware: daemons to handle GSM calls or GPS, sound system, personal information storage and so on. Qt and Android have their own subsystems, FreeSmartphone.Org (FSO) is working towards a standard-based Free Software one.&lt;br /&gt;
* Display driver. The original ''Qt Extended'' uses the framebuffer, most other distributions today use ''X11''.&lt;br /&gt;
* Libraries and application framework (widget toolkit and  and graphical environment) : EFL, Qt, Gtk+ or Java ?&lt;br /&gt;
* Basic telephony applications: voice calls, SMS, alarm clock...&lt;br /&gt;
* Smartphone applications: GPS, media player, simple games, web browser...&lt;br /&gt;
* Open source applications: more games, scientific, you name it...&lt;br /&gt;
&lt;br /&gt;
=== Hardware Support ===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=100%&lt;br /&gt;
! width=10%| !! width=8%|[[Om 2008.8]] !! width=8%|Om 2007.2 !! width=8%|FSO !! width=8%|SHR !! width=8%|FDOM !! width=8%|Qt Extended !! width=8%|Debian !! width=8%|Gentoo !! width=8%|Android&lt;br /&gt;
|-&lt;br /&gt;
| GTA01 || ??        || ??       || ??        || {{Yes}}       || ??         || {{Yes}}    || {{Yes}} || ??         || ??&lt;br /&gt;
|-&lt;br /&gt;
| GTA02 || {{Yes}}        || {{Yes}}       || {{Yes}}        || {{Yes}}        || {{Yes}}         || {{Yes}}     || {{Yes}}  || {{Yes}}         || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Connectivity ===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=100%&lt;br /&gt;
! width=10%| !! width=8%|[[Om 2008.8]] !! width=8%|Om 2007.2 !! width=8%|FSO !! width=8%|SHR !! width=8%|FDOM !! width=8%|Qt Extended !! width=8%|Debian !! width=8%|Gentoo !! width=8%|Android&lt;br /&gt;
|-&lt;br /&gt;
| Telephony || {{Yes}}        || {{Yes}}       || {{Yes}}        || {{Yes}}        || {{Yes}}         || {{Yes}}     || {{Yes}} (1) || ??         || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| SMS       || {{Yes}}        || {{Yes}}       || {{Yes}}        || {{Yes}}        || {{Yes}}         || {{Yes}}     || {{Yes}} (1) || ??         || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GPRS]]  || Not through UI || Not through UI|| Not through UI || {{Yes}} || {{Yes}}         || {{Yes}}     || {{Yes}} (1) || Not through UI    || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[WiFi]]      || {{Yes}} (*)    || {{Yes}}       || Not through UI || {{Yes}}        || {{Yes}}         || {{Yes}}     || {{Yes}}     || Not through UI    || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| VoIP      || ??             || ??            || ??             || ??             || {{Yes}}         || {{Yes}} (1)          || {{Yes}}     || ??         || {{no}}&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth || {{Yes}}        || {{Yes}}       || {{No}}         || {{Yes}}            || {{Yes}}         || {{Yes}}     || {{Yes}}     || ??         || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| GPS (1)   || {{Yes}} (1)    || {{Yes}}       || {{Yes}}        || {{Yes}}        || {{Yes}}         || {{Yes}} || {{Yes}} (1) || {{Yes}} (1) || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Power ===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=100%&lt;br /&gt;
! width=10%| !! width=8%|[[Om 2008.8]] !! width=8%|Om 2007.2 !! width=8%|FSO !! width=8%|SHR !! width=8%|FDOM !! width=8%|Qt Extended !! width=8%|Debian !! width=8%|Gentoo !! width=8%|Android&lt;br /&gt;
|-&lt;br /&gt;
| Suspend || {{Yes}} || ?? || ?? || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| Resumes on Event       || ?? || ?? || ?? || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || ??&lt;br /&gt;
|-&lt;br /&gt;
| Functions after Resume  || {{Yes}} || ?? || ?? || {{Yes}} || {{No}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===  User Interaction ===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=100%&lt;br /&gt;
! width=10%| !! width=8%|Om2008.8        !! width=8%|2007.2 !! width=8%|FSO !! width=8%|SHR !! width=8%|FDOM !! width=8%|Qt Extended !! width=8%|Debian !! width=8%|Gentoo !! width=8%|Android&lt;br /&gt;
|-&lt;br /&gt;
| Stylus friendly || {{Yes}}                  || {{Yes}}         || {{Yes}}      || {{Yes}}      || {{Yes}} || {{Yes}}              || {{Yes}} || {{Yes}}  || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| Finger friendly || Partially                || Partially       || Partially    || {{Yes}}      || {{Yes}} || {{Yes}}              || {{No}} || {{Yes}} || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer   || {{Yes}} [[Rotate|(1)]][[Gestures|(1)]] || {{No}}          || {{No}}       ||  {{yes}} (1)  || {{Yes}} || {{No}}               || {{Yes}} || ?? || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Applications ===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=100%&lt;br /&gt;
! width=10%| !! width=8%|[[Om 2008.8]] !! width=8%|2007.2 !! width=8%|FSO !! width=8%|SHR !! width=8%|FDOM !! width=8%|Qt Extended !! width=8%|Debian !! width=8%|Gentoo !! width=8%|Android&lt;br /&gt;
|-&lt;br /&gt;
| Terminal     || {{Yes}} (1)                       || Basic (2)   || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}}          || {{Yes}} (1) || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| PIM          || {{Yes}}                           || {{Yes}}     || {{No}}  || N/A     || {{Yes}} || {{Yes}} || {{Yes}} (1)      || ?? || ??&lt;br /&gt;
|-&lt;br /&gt;
| Phonebook    || {{Yes}}                           || {{Yes}}     || {{Yes}} || {{Yes}}     || {{Yes}} || {{Yes}} || {{Yes}} (1)      || ?? || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| Dialer       || {{Yes}}                           || {{Yes}}     || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} (1)      || ?? || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| Web Browser  || {{Yes}} (1)                       || {{Yes}} (1) || ?       || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} (1) || ?? || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| Mail Client  || {{Yes}}                           || ?           || ?       || ?       || {{Yes}} || {{Yes}} || {{Yes}} (1)      || ?? || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| XMPP Client  || {{Yes}} [[Instant Messaging|(1)]] || {{Yes}} (1) || ?       || {{Yes}} || {{Yes}} || {{Yes}}  || {{Yes}} (1)      ||  || ??&lt;br /&gt;
|-&lt;br /&gt;
| Media Player || {{Yes}} (1)                       || {{Yes}}     || ?       || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} (1)      || ?? || {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Toolkits / Runtimes ===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! width=10%| !! width=8%|[[Om 2008.8]] !! width=8%|2007.2 !! width=8%|FSO !! width=8%|SHR !! width=8%|FDOM !! width=8%|Qt Extended !! width=8%|Debian !! width=8%|Gentoo !! width=8%|Android&lt;br /&gt;
|-&lt;br /&gt;
| GTK+           || {{Yes}}        || {{Yes}}        || {{Yes}}        || {{Yes}}  || {{Yes}} || {{No}}      || {{Yes}}                || {{Yes}} || ??&lt;br /&gt;
|-&lt;br /&gt;
| Qt/Qt Extended || {{Yes}}        || {{No}}         || {{Yes}} ?      || {{Yes}}? || {{Yes}} || {{Yes}}     || {{Yes}}                || {{Yes}} || ??&lt;br /&gt;
|-&lt;br /&gt;
| Middleware     || qtopia-x11     || gsmd/neod      || FSO            || FSO      || qtopia-x11 || Qt Extended || FSO                    || FSO || ??&lt;br /&gt;
|-&lt;br /&gt;
| [[Java]]       || {{Yes|Jalimo}} || {{Yes|Jalimo}} || {{Yes|Jalimo}} || {{Yes|Jalimo}}  || {{Yes}} || ??          || {{Yes|CacaoVM, JamVM}} || ?? || ??&lt;br /&gt;
|-&lt;br /&gt;
| [[Python]]     || {{Yes}}        || {{Yes}}        || {{Yes}}        || {{yes}}  || {{Yes}} || {{Yes}}     || {{Yes}}                || {{Yes}} || ??&lt;br /&gt;
|-&lt;br /&gt;
| [[Mono]]       || {{Yes}} (1)    || {{Yes}} (1)    || ??             || {{no}}   || ?? || ??          || {{Yes}} (1)            || ?? || ??&lt;br /&gt;
|-&lt;br /&gt;
| [[Ruby]]       || {{Yes}}  || ??  || ??  || ?? || ?? || ??  || {{Yes}} (1)   || {{Yes}} (1) || ??&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
Latest and stable combinations for Neo FreeRunner gta02&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
| || OM || FDOM || Qt Extended || Android&lt;br /&gt;
|-&lt;br /&gt;
| current bootloader || [[U-boot|U-Boot]] from [http://downloads.openmoko.org/distro/releases/Om2008.9/ OM daily] version [http://downloads.openmoko.org/] || [[U-boot|U-Boot]] from [http://downloads.openmoko.org/repository/experimental/ OM daily] version [http://downloads.openmoko.org/daily/gta02v5_and_up-u-boot.bin gta02v5_and_up] || [[U-boot|U-Boot]] from [http://downloads.openmoko.org/repository/experimental/ OM daily] version [http://downloads.openmoko.org/daily/gta02v5_and_up-u-boot.bin gta02v5_and_up] ||&lt;br /&gt;
|-&lt;br /&gt;
| future bootloader || [[Qi]] from [http://people.openmoko.org/andy/ Andy] latest qi-andy.udfu || [[Qi]] from [http://people.openmoko.org/andy/ Andy] latest qi-andy.udfu || [[Qi]] from [http://people.openmoko.org/andy/ Andy] latest qi-andy.udfu ||&lt;br /&gt;
|-&lt;br /&gt;
| splash || [[Configuring_the_boot_splash_screens|U-Boot]] from [http://downloads.openmoko.org/releases/ OM releases] or [http://downloads.openmoko.org/daily/ OM daily] latest splash.gz || [[Configuring_the_boot_splash_screens|U-Boot]] from [http://downloads.openmoko.org/releases/ OM releases] or [http://downloads.openmoko.org/daily/ OM daily] latest splash.gz || [[Configuring_the_boot_splash_screens|U-Boot]] from [http://downloads.openmoko.org/releases/ OM releases] or [http://downloads.openmoko.org/daily/ OM daily] latest splash.gz ||&lt;br /&gt;
|-&lt;br /&gt;
| kernel || [[Linux]] from [http://downloads.openmoko.org/releases/ OM releases] or [http://downloads.openmoko.org/daily/ OM daily] latest uImage.bin || [[Linux]] from [http://moko.mwester.net/download/ mwester] latest uImage-gta02-mwester-stable.bin or from [http://downloads.tuxfamily.org/3v1deb/openmoko/ treviño] latest uImage-gta02-stable-3v1n0.bin || [[Linux]] see [[Qt_Extended]] page for latest version || [[Linux]] from [http://koolu.org/releases/ koolu]&lt;br /&gt;
|-&lt;br /&gt;
| modules || ? || [[Linux]] from [http://moko.mwester.net/download/ mwester] latest modules-min-gta02-mwester-stable.tgz or modules-all-gta02-mwester-stable.tgz || [[Linux]] from [http://moko.mwester.net/download/ mwester] latest modules-min-gta02-mwester-stable.tgz or modules-all-gta02-mwester-stable.tgz ||&lt;br /&gt;
|-&lt;br /&gt;
| rootfs || [[Main_Page|OM]] from [http://downloads.openmoko.org/releases/ OM releases] or [http://downloads.openmoko.org/daily/ OM daily] latest rootfs.jffs2 || [[FDOM]] from [ftp://ftp.tuxbrain.com/openmoko/fdom/releases/ TuxBrain] version [ftp://ftp.tuxbrain.com/openmoko/fdom/releases/Fat_and_Dirty_OM.200809_20081023.rootfs.jff2 200809_20081023] || See [[Qt_Extended]] for latest rootfs || [[Android]] from [http://koolu.org/releases/ koolu]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Footnotes:&lt;br /&gt;
&lt;br /&gt;
(1) works, but need additional software to be installed&lt;br /&gt;
&lt;br /&gt;
(2) unusable due to lack of certain keyboard characters. [[Switching_Keyboards#Matchbox_keyboard|Various fixes available.]]&lt;br /&gt;
&lt;br /&gt;
(*) unstable&lt;br /&gt;
&lt;br /&gt;
==Quick download page==&lt;br /&gt;
&lt;br /&gt;
[[Download]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* Mickey Lauer's post &amp;quot;[http://www.vanille-media.de/site/index.php/2008/06/28/gtk-asu-fso-tmtla/ GTK, ASU, FSO, TMTLA!]&amp;quot; describes the differences between distributions 2007.2, ASU and FSO.&lt;br /&gt;
&lt;br /&gt;
* Latest news and tips are in [[Community Updates]]&lt;br /&gt;
&lt;br /&gt;
* [[Kustomizer]] is a script to change your 2008.12 to a usable phone&lt;br /&gt;
&lt;br /&gt;
[[Category:Distributions| ]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-03-21T11:34:13Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added gstreamer0.10-alsa dependency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
or calibrate it yourself until you are happy with the result:&lt;br /&gt;
 apt-get install libts-bin&lt;br /&gt;
 TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/event1 TSLIB_CONSOLEDEVICE=none ts_calibrate&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base gstreamer0.10-alsa&lt;br /&gt;
 cat &amp;gt; /etc/asound.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 pcm.!default {&lt;br /&gt;
     type plug&lt;br /&gt;
     slave.pcm &amp;quot;dmixer&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 pcm.dmixer  {&lt;br /&gt;
     type dmix&lt;br /&gt;
     ipc_key 1024&lt;br /&gt;
     slave {&lt;br /&gt;
         pcm &amp;quot;hw:0,0&amp;quot;&lt;br /&gt;
         period_time 0&lt;br /&gt;
         period_size 1024&lt;br /&gt;
         buffer_size 4096&lt;br /&gt;
         rate 44100&lt;br /&gt;
     }&lt;br /&gt;
     bindings {&lt;br /&gt;
         0 0&lt;br /&gt;
         1 1&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 ctl.dmixer {&lt;br /&gt;
     type hw&lt;br /&gt;
     card 0&lt;br /&gt;
 }&lt;br /&gt;
 __END__&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Disable Framebuffer Blanking ==&lt;br /&gt;
&lt;br /&gt;
the obfuscated way:&lt;br /&gt;
 echo -e '\033[9;0]' &amp;gt; /dev/tty0&lt;br /&gt;
&lt;br /&gt;
the sys-path way:&lt;br /&gt;
 echo -n 0 &amp;gt; /sys/devices/platform/s3c2410-lcd/graphics/fb0/blank&lt;br /&gt;
&lt;br /&gt;
the debian way:&lt;br /&gt;
 apt-get install console-tools&lt;br /&gt;
 sed -i 's/\(BLANK_TIME\)=30/\1=0/' /etc/console-tools/config&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
To enter the debian chroot environment you could use the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
chroot /media/card/sid /bin/sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-03-21T11:16:21Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added dmix as default device&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
or calibrate it yourself until you are happy with the result:&lt;br /&gt;
 apt-get install libts-bin&lt;br /&gt;
 TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/event1 TSLIB_CONSOLEDEVICE=none ts_calibrate&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 cat &amp;gt; /etc/asound.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 pcm.!default {&lt;br /&gt;
 	type plug&lt;br /&gt;
 	slave.pcm &amp;quot;dmixer&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 pcm.dmixer  {&lt;br /&gt;
  	type dmix&lt;br /&gt;
  	ipc_key 1024&lt;br /&gt;
  	slave {&lt;br /&gt;
 		pcm &amp;quot;hw:1,0&amp;quot;&lt;br /&gt;
 		period_time 0&lt;br /&gt;
 		period_size 1024&lt;br /&gt;
 		buffer_size 4096&lt;br /&gt;
 		rate 44100&lt;br /&gt;
 	}&lt;br /&gt;
 	bindings {&lt;br /&gt;
 		0 0&lt;br /&gt;
 		1 1&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 ctl.dmixer {&lt;br /&gt;
 	type hw&lt;br /&gt;
 	card 0&lt;br /&gt;
 }&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Disable Framebuffer Blanking ==&lt;br /&gt;
&lt;br /&gt;
the obfuscated way:&lt;br /&gt;
 echo -e '\033[9;0]' &amp;gt; /dev/tty0&lt;br /&gt;
&lt;br /&gt;
the sys-path way:&lt;br /&gt;
 echo -n 0 &amp;gt; /sys/devices/platform/s3c2410-lcd/graphics/fb0/blank&lt;br /&gt;
&lt;br /&gt;
the debian way:&lt;br /&gt;
 apt-get install console-tools&lt;br /&gt;
 sed -i 's/\(BLANK_TIME\)=30/\1=0/' /etc/console-tools/config&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
To enter the debian chroot environment you could use the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
chroot /media/card/sid /bin/sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-27T22:09:13Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: framebuffer blanking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
or calibrate it yourself until you are happy with the result:&lt;br /&gt;
 apt-get install libts-bin&lt;br /&gt;
 TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/event1 TSLIB_CONSOLEDEVICE=none ts_calibrate&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Disable Framebuffer Blanking ==&lt;br /&gt;
&lt;br /&gt;
the obfuscated way:&lt;br /&gt;
 echo -e '\033[9;0]' &amp;gt; /dev/tty0&lt;br /&gt;
&lt;br /&gt;
the sys-path way:&lt;br /&gt;
 echo -n 0 &amp;gt; /sys/devices/platform/s3c2410-lcd/graphics/fb0/blank&lt;br /&gt;
&lt;br /&gt;
the debian way:&lt;br /&gt;
 apt-get install console-tools&lt;br /&gt;
 sed -i 's/\(BLANK_TIME\)=30/\1=0/' /etc/console-tools/config&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-27T20:46:28Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added manual calibration&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
or calibrate it yourself until you are happy with the result:&lt;br /&gt;
 apt-get install libts-bin&lt;br /&gt;
 TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/event1 TSLIB_CONSOLEDEVICE=none ts_calibrate&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-27T20:22:16Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added mtd-utils&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
* mtd-utils (flash_eraseall, nandwrite, mkfs.jffs2)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-27T19:40:47Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: now pully &amp;quot;stable&amp;quot; yeah! updated package list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd stable /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-27T19:32:32Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: no-install-recommends&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* vim (instead of vim-tiny)&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* curl (instead of wget)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/apt/apt.conf.d/99no-install-recommends &amp;lt;&amp;lt; __END__&lt;br /&gt;
 APT::Install-Recommends &amp;quot;0&amp;quot;;&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-25T20:11:09Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added ping, curl&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* curl - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
* iputils-ping - ping&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* vim (instead of vim-tiny)&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* curl (instead of wget)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-25T17:01:08Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: /* Load Additional Kernel Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* wget - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* vim (instead of vim-tiny)&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* curl (instead of wget)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 cat &amp;gt; /etc/modules &amp;lt;&amp;lt; __END__&lt;br /&gt;
 hci_usb&lt;br /&gt;
 hidp&lt;br /&gt;
 ohci-hcd&lt;br /&gt;
 rfcomm&lt;br /&gt;
 snd-mixer-oss&lt;br /&gt;
 snd-pcm-oss&lt;br /&gt;
 snd-soc-neo1973-wm8753&lt;br /&gt;
 __END__&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-19T21:57:04Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added console-tools&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* wget - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* vim (instead of vim-tiny)&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* curl (instead of wget)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
* console-tools (chvt)&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-19T20:50:35Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added a few useful packages for everyday use&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* wget - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* vim (instead of vim-tiny)&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* curl (instead of wget)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
* psmisc (killall, fuser)&lt;br /&gt;
* rsync&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-18T19:30:27Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: removed apt-get update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* wget - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* vim (instead of vim-tiny)&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* curl (instead of wget)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-18T17:33:14Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: bullet points&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
* ifupdown - contains ifup, ifdown&lt;br /&gt;
* udev - necessary to fill /dev&lt;br /&gt;
* procps - contains watch, ps, kill, free, top, uptime... (otherwise this is a openssh-server dependency)&lt;br /&gt;
* netbase - /etc/init.d/networking&lt;br /&gt;
* vim-tiny - we want to edit files&lt;br /&gt;
* module-init-tools - modprobe, lsmod, rmmod, depmod (otherwise this is a apmd dependency)&lt;br /&gt;
* wget - we want to download stuff&lt;br /&gt;
* openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
* screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
* apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
* vim (instead of vim-tiny)&lt;br /&gt;
* locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
* less (better than more)&lt;br /&gt;
* curl (instead of wget)&lt;br /&gt;
* man-db&lt;br /&gt;
* rsyslog&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-18T17:14:26Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: explained choice of base packages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-server,screen,apmd lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
justifying the included packages&lt;br /&gt;
 * ifupdown - contains ifup, ifdown&lt;br /&gt;
 * udev - necessary to fill /dev&lt;br /&gt;
 * procps - contains watch, ps, kill, free, top, uptime...&lt;br /&gt;
 * netbase - /etc/init.d/networking&lt;br /&gt;
 * vim-tiny - we want to edit files&lt;br /&gt;
 * module-init-tools - modprobe, lsmod, rmmod, depmod&lt;br /&gt;
 * wget - we want to download stuff&lt;br /&gt;
 * openssh-server - we want to connect to our device and we have enough power to not need to use dropbear&lt;br /&gt;
 * screen - we want to operate within screen sessions so that we can disconnect or detach without problems&lt;br /&gt;
 * apmd - suspending via apm -s&lt;br /&gt;
&lt;br /&gt;
additionally interesting packages:&lt;br /&gt;
 * nano (instead of vim-tiny) or vim&lt;br /&gt;
 * locale (use dpkg-reconfigure afterwards)&lt;br /&gt;
 * less&lt;br /&gt;
 * curl (instead of wget)&lt;br /&gt;
 * man-db&lt;br /&gt;
 * rsyslog, hal, pm-utils&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-02-17T21:53:16Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: updated package versions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/distro/releases/Om2008.9/Om2008.9-gta02-20081106.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2009-01-30T09:24:08Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: reverted stupid long tar arguments by Christz&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
On desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar czf sid.tar.gz sid&lt;br /&gt;
 nc -w 10 -l -p 1234 &amp;lt; sid.tar.gz&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar xzf -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/debootstrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid/etc&lt;br /&gt;
&lt;br /&gt;
On neo edit the file &amp;lt;tt&amp;gt;/media/card/sid/etc/apt/sources.list&amp;lt;/tt&amp;gt; and add the following line:&lt;br /&gt;
&lt;br /&gt;
 deb http://ftp.de.debian.org/debian/ sid main non-free contrib&lt;br /&gt;
&lt;br /&gt;
On neo:&lt;br /&gt;
&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User_talk:Christz</id>
		<title>User talk:Christz</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User_talk:Christz"/>
				<updated>2009-01-30T09:16:11Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: rant about your edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you edit things like: 'tar xzf' to 'tar --extract --gzip --file' in [[Manual_Debian]] use your head and think how often you rather want to type 27 letters instead of 7 in your terminal....&lt;br /&gt;
it is absolutely useless to write these arguments out because '''EVERYBODY''' knows what the tar arguments xzf and czf mean - oh and btw in recent versions of tar you can leave out the f parameter.&lt;br /&gt;
--[[User:JoSch|JoSch]] 09:16, 30 January 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-29T09:33:10Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: remove temporary files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T10:10:25Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: fixed flavour&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Manual_Debian</id>
		<title>Talk:Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Manual_Debian"/>
				<updated>2008-12-28T09:51:19Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: cleaned and answered&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Booting ==&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
&lt;br /&gt;
Why don't we boot from NAND?&lt;br /&gt;
:I do - works fine--[[User:JoSch|JoSch]] 09:51, 28 December 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
What's the reason for two partitions?  Is it because ext2load was broken?  Can we just upgrade u-boot and use one partition?&lt;br /&gt;
:yes, it's a uboot thingy and only valid for gta02 - just use what works for you--[[User:JoSch|JoSch]] 09:51, 28 December 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
Is there any need for a swap partition?&lt;br /&gt;
&lt;br /&gt;
--[[User:Brian 252|Brian 252]] 15:22, 8 August 2008 (UTC)&lt;br /&gt;
: [http://lists.openmoko.org/pipermail/community/2008-September/031106.html Some say] it helped. [[User:Jidanni|Jidanni]] 02:38, 3 December 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Touch screen calibration ==&lt;br /&gt;
&lt;br /&gt;
Few days ago there was added calibration for gta02. It doesn't work correctly on my freerunnuer (the mouse pointer doesn't move where I click ant the touchscreen area is about 1/3 smaller then the screen). I tried /etc/pointercal from qtopia and openmoko but it is the same as with parameters from this wiki. Has somebody a tip how to fix this?&lt;br /&gt;
&lt;br /&gt;
--[[User:Jakubzeman|Jakubzeman]] 07:42, 8 August 2008 (UTC)&lt;br /&gt;
:works with tslib from experimental--[[User:JoSch|JoSch]] 09:51, 28 December 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
http://tehinterweb.com/freerunner/alsa.state.tgz --[[User:Dbmoodb|Dbmoodb]] 13:55, 21 August 2008 (UTC) (if it doesn't work for you... try these alsa states or the ones posted below from openmoko.org...)&lt;br /&gt;
&lt;br /&gt;
If the sound card is configured properly but there's no sound coming out of the Freerunner, it most likely helps to restore an appropriate statefile from the tgz above which are also available on the [[Openmoko svn]] (/trunk/src/target/audio/om-gta0*).&lt;br /&gt;
&lt;br /&gt;
For simple sound output to the internal stereo speakers, do:&lt;br /&gt;
 alsactl -f /path/to/statefiles/stereoout.state restore&lt;br /&gt;
--[[User:Tanuva|Tanuva]] 12:59, 21 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Problems Making This Work ==&lt;br /&gt;
&lt;br /&gt;
I tried the instructions for loading Debian on my Freerunning and was disappointed to find it didnt work for me. I tried it twice, once with an Ext2 partition on the SDCARD and once with out, about a week ago, both gave exactly the same result. Its a very slow process too. The result when booting is that the phone brings up the openmoko logo , then a completly white screen and then goes back to the openmoko logo, it continues doing this ad-infinitum. It seems like the uboot image is wrong (=invalid) but I cant see how to fix this. Its still possible to boot original OS but via NOR screen. (Boot from card is the default now.)  &lt;br /&gt;
&lt;br /&gt;
Is there no chance of a binary debian image or starter image that can go into flash? I have flashed my phone many times with kernel and jffs2 images and although described as a &amp;quot;major&amp;quot; thing to do, it has always worked so far. Ive looked everywhere for a Debian image and cannot find. &lt;br /&gt;
&lt;br /&gt;
Any comments appreciated.&lt;br /&gt;
&lt;br /&gt;
== The above problem can be resolved as follows ==&lt;br /&gt;
&lt;br /&gt;
I had the same problem, and got the hint from Julian Köpke, who suggested the following and it works. &lt;br /&gt;
&lt;br /&gt;
Your uboot version is too old. You can get the newest &lt;br /&gt;
[http://downloads.openmoko.org/daily/gta02v5_and_up-u-boot.bin uboot image]&lt;br /&gt;
and then follow  [http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner#Flashing_the_boot_loader_to_the_NAND these instructions]&lt;br /&gt;
--[[User:Nagarjuna|Nagarjuna]] 10:14, 13 September 2008 (UTC)&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T09:04:11Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: the content of this page is now up to date&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T08:55:24Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: cleaned up touchscreen config with cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt;&amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
         Identifier      &amp;quot;Configured Touchscreen&amp;quot;&lt;br /&gt;
         Driver          &amp;quot;tslib&amp;quot;&lt;br /&gt;
         Option          &amp;quot;CorePointer&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;SendCoreEvents&amp;quot;        &amp;quot;true&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
         Option          &amp;quot;Protocol&amp;quot;              &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T08:50:40Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: minimal xorg.conf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/X11/xorg.conf &amp;lt;&amp;lt; __END__&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 __END__&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;Device&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T08:48:14Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: cleaned up with cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 cat &amp;gt; /media/card/etc/network/interfaces &amp;lt;&amp;lt;__END__&lt;br /&gt;
 auto lo&lt;br /&gt;
 iface lo inet loopback&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
     address 192.168.0.202&lt;br /&gt;
     netmask 255.255.255.0&lt;br /&gt;
     network 192.168.0.0&lt;br /&gt;
     gateway 192.168.0.200&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&lt;br /&gt;
 __END__&lt;br /&gt;
 cat &amp;gt; /media/card/etc/fstab &amp;lt;&amp;lt; __END__&lt;br /&gt;
 rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&lt;br /&gt;
 __END__&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
 chroot /media/card /bin/sh -e &amp;lt;&amp;lt;__END_CHROOT__&lt;br /&gt;
 echo root: | chpasswd&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get --yes --purge remove cdebootstrap-helper-rc.d&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 __END_CHROOT__&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;Device&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T08:21:33Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: make thumb&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo root: | chroot /media/card/ chpasswd&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;Device&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|thumb|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T08:13:24Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: permit empty passwords&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo root: | chroot /media/card/ chpasswd&lt;br /&gt;
 sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;Device&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T07:39:09Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: dont forget apt-get update....&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:openmoko' | chroot /media/card/ chpasswd&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;Device&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-28T07:37:11Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: finally touchscreen working!! \o/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html]&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:openmoko' | chroot /media/card/ chpasswd&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver from debian experimental:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian experimental main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib/experimental&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;Device&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
for gta02:&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T15:34:54Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: pointercal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:openmoko' | chroot /media/card/ chpasswd&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
same goes for gta01. these parameters work at least better then nothing - plz help improving these by doing your own tests:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -78000 0 72000000 65536&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T15:28:41Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added empirical pointercal for gta01&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:openmoko' | chroot /media/card/ chpasswd&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
same goes for gta01. these parameters work at least better then nothing - plz help improving these by doing your own tests:&lt;br /&gt;
&lt;br /&gt;
 0 76000 -3700000 -78000 0 72000000 65536&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T14:54:50Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: simplify install with cdebootstrap-static&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
== debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static.&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static --variant=minbase --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server lenny /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:openmoko' | chroot /media/card/ chpasswd&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T14:20:00Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: changed ext3 to ext2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
This kernel was build by Marcel_M and has some important patches in it such as removed sd debug symbols.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02, but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''NOTE: On the Freerunner one also will need a vfat or ext2 (only vfat worked for me with the stock u-boot for the freerunner) partition on which to place the kernel to boot off. See the [[Booting_from_SD]] If you have not done so already.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext2 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
if you build the first stage on your host, finish the install with the second stage on the device&lt;br /&gt;
 chroot /media/card /debootstrap/debootstrap --second-stage&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext2    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:openmoko' | chroot /media/card/ chpasswd&lt;br /&gt;
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: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 apt-get install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 apt-get install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 apt-get install udev&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T14:13:06Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: clean up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
if you build the first stage on your host, finish the install with the second stage on the device&lt;br /&gt;
 chroot /media/card /debootstrap/debootstrap --second-stage&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:openmoko' | chroot /media/card/ chpasswd&lt;br /&gt;
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: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 apt-get install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 apt-get install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 apt-get install udev&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T11:59:15Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: fixed chroot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
if you build the first stage on your host, finish the install with the second stage on the device&lt;br /&gt;
 chroot /media/card /debootstrap/debootstrap --second-stage&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:' | chroot /media/card/ chpasswd&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /media/card/etc/apt/sources.list&lt;br /&gt;
 chroot /media/card apt-get update&lt;br /&gt;
 chroot /media/card apt-get -y upgrade&lt;br /&gt;
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: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 apt-get install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 apt-get install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 apt-get install udev&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T11:44:50Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: changed aptitude to apt-get to comply with debian lenny minimal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
if you build the first stage on your host, finish the install with the second stage on the device&lt;br /&gt;
 chroot /media/card /debootstrap/debootstrap --second-stage&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:' | chroot /media/card/ chpasswd&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get -y upgrade&lt;br /&gt;
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: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 apt-get install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 apt-get install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 apt-get install udev&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 apt-get install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 apt-get install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 apt-get install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T11:42:05Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: set root password, rearrange setup steps&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
if you build the first stage on your host, finish the install with the second stage on the device&lt;br /&gt;
 chroot /media/card /debootstrap/debootstrap --second-stage&lt;br /&gt;
execute the following commands (just copypaste everything below)&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
 echo 'root:' | chroot /media/card/ chpasswd&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude -y upgrade&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T11:06:18Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: /* (option 3) debootstrap on the neo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2008.04.16+nmu1_all.deb&lt;br /&gt;
 ar -x debian-archive-keyring_2008.04.16+nmu1_all.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 cdebootstrap-static sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T10:03:35Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: changed hostname&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 cdebootstrap-static --flavour minimal sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost neo1973-debian&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T09:55:07Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: /* (option 3) debootstrap on the neo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 cdebootstrap-static --flavour minimal sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;fic-gta01&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost fic-gta01&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T09:54:47Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: /* (option 3) debootstrap on the neo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
 ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
 tar -xz -C / -f data.tar.gz&lt;br /&gt;
 rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
&lt;br /&gt;
cdebootstrap-static --flavour minimal sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;fic-gta01&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost fic-gta01&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T09:54:25Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: /* (Optional) Install Known Good Kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
 ./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
tar -xz -C / -f data.tar.gz&lt;br /&gt;
rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
&lt;br /&gt;
cdebootstrap-static --flavour minimal sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;fic-gta01&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost fic-gta01&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-25T09:51:58Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added cdebootstrap-static instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== (option 3) debootstrap on the neo ==&lt;br /&gt;
&lt;br /&gt;
you can download and debootstrap natively on the neo by downloading cdebootstrap-static. just do the &amp;quot;prepare sd card&amp;quot; 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&lt;br /&gt;
&lt;br /&gt;
wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
ar -x cdebootstrap-static_0.5.3_armel.deb data.tar.gz&lt;br /&gt;
tar -xz -C / -f data.tar.gz&lt;br /&gt;
rm data.tar.gz cdebootstrap-static_0.5.3_armel.deb&lt;br /&gt;
&lt;br /&gt;
cdebootstrap-static --flavour minimal sid /media/card/ http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;fic-gta01&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost fic-gta01&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-12T01:27:05Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added serial modem&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;fic-gta01&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost fic-gta01&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Enable Modem ==&lt;br /&gt;
&lt;br /&gt;
Here comes the phone functionality - just add this line into the &amp;quot;serial devices&amp;quot; section in your /etc/udev/rules.d/50-udev.rules&lt;br /&gt;
&lt;br /&gt;
 # serial devices&lt;br /&gt;
 KERNEL==&amp;quot;s3c2410_serial[0-9]&amp;quot;,  NAME=&amp;quot;ttySAC%n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Manual_Debian</id>
		<title>Manual Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Manual_Debian"/>
				<updated>2008-12-11T00:45:34Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: added rotation and cursor hiding&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
''Contents of this page is probably old and superceded by this new pae : [[Debian]].''&lt;br /&gt;
&lt;br /&gt;
[[Image:Debian.png|thumb|480px|''Debian on neo1973'']]&lt;br /&gt;
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.&lt;br /&gt;
The former will take some time, perhaps 2 hours, depending on your internet connection&lt;br /&gt;
&lt;br /&gt;
= Prebuilt Filesystem =&lt;br /&gt;
&lt;br /&gt;
Download and extract to an ext2/ext3 formatted filesystem on your SD card:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/debian-armel-xfce.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Note that the above is just a bit too big to fit on a 512MB SD card.  A smaller image will soon be provided.&lt;br /&gt;
&lt;br /&gt;
Access via SSH is much the same as under other images using [[USB Networking]], with the user accounts below:&lt;br /&gt;
&lt;br /&gt;
* root password: openmoko&lt;br /&gt;
* First user and password: openmoko&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
== (Optional) Install Known Good Kernel ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
wget http://rabenfrost.net/celtune/uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
./dfu-util -d 0x1457:0x5119 -a kernel -R -D ./uImage-2.6.24+svnr4194-r4165-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
This kernel doesn't work for gta02 (just my expirience, it didn't detect ext3), but the kernel from Om 2008.9 works good.&lt;br /&gt;
http://downloads.openmoko.org/releases/Om2008.9/Om2008.9-gta02-20080916.uImage.bin&lt;br /&gt;
&lt;br /&gt;
== (Optional) Recompiling Kernel to Add Drivers ==&lt;br /&gt;
(Based on http://lists.openmoko.org/pipermail/support/2008-August/001240.html)&lt;br /&gt;
&lt;br /&gt;
Steps to build the kernel standalone with the &amp;quot;moredrivers&amp;quot; config (to get additional drivers, such as the usb tether drivers that were moved out as kernel modules, compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
  ~ - git clone git://git.openmoko.org/git/kernel.git linux-2.6&lt;br /&gt;
  ~ - cd linux-2.6&lt;br /&gt;
  ~ - git checkout origin/stable&lt;br /&gt;
  ~ - edit ./build to point to your compiler path&lt;br /&gt;
  ~ - cp defconfig-2.6.24 .config&lt;br /&gt;
  ~ - ./build&lt;br /&gt;
&lt;br /&gt;
That gets you a uImage.bin you can DFU or copy into your SD Card filesystem.&lt;br /&gt;
&lt;br /&gt;
== Configure booting from SD/SDHC ==&lt;br /&gt;
&lt;br /&gt;
Do as proposed here: [[Booting_from_SD]]&lt;br /&gt;
&lt;br /&gt;
Note that these instructions are in need a rewrite.&lt;br /&gt;
&lt;br /&gt;
= Build your own armel filesystem =&lt;br /&gt;
&lt;br /&gt;
== (Option 1) debootstrap your rootfs on Debian or Ubuntu host ==&lt;br /&gt;
&lt;br /&gt;
 debootstrap --verbose --arch armel --foreign sid ./armel-chroot http://ftp.de.debian.org/debian/&lt;br /&gt;
&lt;br /&gt;
== (option 2) download ready to use armel rootfs ==&lt;br /&gt;
&lt;br /&gt;
If you don't have debootstrap on your system you can download the results here:&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/debian/armel-chroot-first-stage.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Prepare SD card ==&lt;br /&gt;
&lt;br /&gt;
ssh to your neo and format your sd card appropriately. I'm using an 8GB SDHC card here.&lt;br /&gt;
&lt;br /&gt;
:''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.''&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
 We will now create a 8 mb partition for our kernel and another one for the rootfs which will take up all the   &lt;br /&gt;
 remaining space.&lt;br /&gt;
  Command (m for help): d&lt;br /&gt;
  Selected partition 1&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 1&lt;br /&gt;
  First cylinder (1-983, default 1):&lt;br /&gt;
  Using default value 1&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
  Command (m for help): n&lt;br /&gt;
  Command action&lt;br /&gt;
     e   extended&lt;br /&gt;
     p   primary partition (1-4)&lt;br /&gt;
  p&lt;br /&gt;
  Partition number (1-4): 2&lt;br /&gt;
  First cylinder (18-983, default 18):&lt;br /&gt;
  Using default value 18&lt;br /&gt;
  Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
  Using default value 983&lt;br /&gt;
  Command (m for help): w&lt;br /&gt;
  The partition table has been altered!&lt;br /&gt;
  Calling ioctl() to re-read partition table.&lt;br /&gt;
  Syncing disks.&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-September/031106.html Consider a swap partition].&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
 mount /dev/mmcblk0p2 /media/card&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;= WONTFIX)&lt;br /&gt;
&lt;br /&gt;
 tar -C ./armel-chroot/ -c . | ssh root@192.168.0.202 tar -C /media/card -xv&lt;br /&gt;
or if you downloaded the archive&lt;br /&gt;
&lt;br /&gt;
 cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzvf -&lt;br /&gt;
&lt;br /&gt;
== Complete debootstrap Process ==&lt;br /&gt;
&lt;br /&gt;
ssh to your device and execute the following commands (just copypaste everything below)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;nameserver 192.168.0.200&amp;quot; &amp;gt; /media/card/etc/resolv.conf&lt;br /&gt;
 echo &amp;quot;fic-gta01&amp;quot; &amp;gt; /media/card/etc/hostname&lt;br /&gt;
 echo &amp;quot;127.0.0.1 localhost.localdomain localhost fic-gta01&amp;quot; &amp;gt; /media/card/etc/hosts&lt;br /&gt;
 echo -e &amp;quot;auto lo\n\&lt;br /&gt;
 iface lo inet loopback\n\&lt;br /&gt;
 auto usb0\n\&lt;br /&gt;
 iface usb0 inet static\n\&lt;br /&gt;
     address 192.168.0.202\n\&lt;br /&gt;
     netmask 255.255.255.0\n\&lt;br /&gt;
     network 192.168.0.0\n\&lt;br /&gt;
     gateway 192.168.0.200\n\&lt;br /&gt;
     up echo nameserver 192.168.0.200 &amp;gt;/etc/resolv.conf&amp;quot; &amp;gt; /media/card/etc/network/interfaces&lt;br /&gt;
 echo -e &amp;quot;rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\&lt;br /&gt;
 proc    /proc            proc    defaults                           0 0\n\&lt;br /&gt;
 tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\&lt;br /&gt;
 tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0&amp;quot; &amp;gt; /media/card/etc/fstab&lt;br /&gt;
now chroot into your armel rootfs and finish the install&lt;br /&gt;
 chroot /media/card&lt;br /&gt;
 /debootstrap/debootstrap --second-stage&lt;br /&gt;
make sure your internal clock is set to the correct date because aptitude will complain if otherwise (does not work on the gta02 at the moment: &amp;quot;Cannot access the Hardware Clock via any known method.&amp;quot;)&lt;br /&gt;
 hwclock --set --date=&amp;quot;MM/DD/YY hh:mm:ss&amp;quot;&lt;br /&gt;
install openssh so you can login remotely&lt;br /&gt;
 echo &amp;quot;deb http://ftp.de.debian.org/debian sid main&amp;quot; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 aptitude update&lt;br /&gt;
 aptitude upgrade&lt;br /&gt;
 aptitude install openssh-server&lt;br /&gt;
install and configure locales&lt;br /&gt;
 aptitude install locales&lt;br /&gt;
 dpkg-reconfigure locales&lt;br /&gt;
install udev to dynamically create /dev&lt;br /&gt;
 aptitude install udev&lt;br /&gt;
set a root password&lt;br /&gt;
 passwd&lt;br /&gt;
create a normal user&lt;br /&gt;
 adduser &amp;lt;yournamehere&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get X Running ==&lt;br /&gt;
Now reboot and start Debian. Login with ssh and start configuring xorg:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xorg&lt;br /&gt;
&lt;br /&gt;
configure /etc/X11/xorg.conf so that it looks like this:&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;mouse&amp;quot;&lt;br /&gt;
        Option          &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Video Device&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;fbdev&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        Monitor         &amp;quot;Configured Monitor&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
 Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
        Screen          &amp;quot;Default Screen&amp;quot;&lt;br /&gt;
        InputDevice     &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
Start X in the first vt:&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Get touchscreen working ==&lt;br /&gt;
Install the tslib driver:&lt;br /&gt;
&lt;br /&gt;
 aptitude install xserver-xorg-input-tslib&lt;br /&gt;
&lt;br /&gt;
and edit the InputDevice section in your xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Configured Mouse&amp;quot;&lt;br /&gt;
        Driver &amp;quot;tslib&amp;quot;&lt;br /&gt;
        Option &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
        Option &amp;quot;TslibDevice&amp;quot; &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
        Option &amp;quot;Protocol&amp;quot; &amp;quot;Auto&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
calibrate your touchscreen&lt;br /&gt;
for gta01:&lt;br /&gt;
 echo -67 36365 -2733100 -48253 -310 45219816 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
calibration for the gta02&lt;br /&gt;
 echo  -67 38667 -4954632 -51172 121 46965312 65536 &amp;gt; /etc/pointercal&lt;br /&gt;
&lt;br /&gt;
Note from Tkrahn:&lt;br /&gt;
&lt;br /&gt;
First the above calibration for gta02 worked fine for me, but after a &lt;br /&gt;
apt-get update &amp;amp;&amp;amp; apt-get upgrade the pointer didn't follow the stylo&lt;br /&gt;
anymore. I needed to overwrite /etc/udev/rules.d/50-udev.rules with &lt;br /&gt;
/etc/udev/udev.rules.dpkg-bak and a restart of the X server to get it &lt;br /&gt;
moving again. But then the pointer was very far off from the tip of &lt;br /&gt;
the stylo. Obviously the mode how the calculation of the position worked&lt;br /&gt;
has changed with the upgrade. I changed the calibration empirically. &lt;br /&gt;
The following /etc/pointercal parameters worked for me:&lt;br /&gt;
&lt;br /&gt;
 0 80000 -8000000 -80500 0 74500000 65536&lt;br /&gt;
&lt;br /&gt;
(On GATA02v5 after the upgrade!)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start X and enjoy!&lt;br /&gt;
 startx -- vt1&lt;br /&gt;
&lt;br /&gt;
== Install GDM and xfce4 ==&lt;br /&gt;
&lt;br /&gt;
 aptitude install gdm xfce4 xvkbd&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 fi&lt;br /&gt;
 sleep 20 &amp;amp;&amp;amp; /usr/bin/xvkbd -xdm -compact -geometry 480x210+0+0 &amp;amp;&lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you like you can also download a correctly sized Debian wallpaper I generated from the SVG source for 480x640:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http://rabenfrost.net/debian/debian-blueish-wallpaper-480x640.png&amp;lt;/nowiki&amp;gt; -O /usr/share/images/desktop-base/desktop-background&lt;br /&gt;
&lt;br /&gt;
== Clean Up ==&lt;br /&gt;
 aptitude clean&lt;br /&gt;
&lt;br /&gt;
== Load Additional Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
These are for sound, bluetooth and USB. Use the modules archive that fits to your kernel.&lt;br /&gt;
&lt;br /&gt;
 wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz&lt;br /&gt;
 tar -xf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz -C /&lt;br /&gt;
 depmod -a&lt;br /&gt;
 echo -e &amp;quot;hci_usb\n\&lt;br /&gt;
 hidp\n\&lt;br /&gt;
 ohci-hcd\n\&lt;br /&gt;
 rfcomm\n\&lt;br /&gt;
 snd-mixer-oss\n\&lt;br /&gt;
 snd-pcm-oss\n\&lt;br /&gt;
 snd-soc-neo1973-wm8753&amp;quot; &amp;gt; /etc/modules&lt;br /&gt;
&lt;br /&gt;
Note: On the FreeRunner, the sound module (on the last line) is called snd-soc-neo1973-gta02-wm8753&lt;br /&gt;
[[Image:Sonata.png|480px|''Sonata on neo1973'']]&lt;br /&gt;
== Enable Sound ==&lt;br /&gt;
&lt;br /&gt;
Now we turn our Debian into a jukebox!&lt;br /&gt;
&lt;br /&gt;
 aptitude install alsa-base&lt;br /&gt;
 wget http://rabenfrost.net/celtune/alsa_state_files-working.tar.gz&lt;br /&gt;
 tar -xf alsa_state_files-working.tar.gz -C /etc&lt;br /&gt;
 alsactl -f /etc/alsa_state_files-working/stereoout.state restore&lt;br /&gt;
 addgroup openmoko audio&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== Chroot installation ==&lt;br /&gt;
&lt;br /&gt;
If you just want to run random debian programs without completely booting to debian you can use the following minimal steps:&lt;br /&gt;
&lt;br /&gt;
on desktop:&lt;br /&gt;
&lt;br /&gt;
 sudo debootstrap --arch armel --foreign sid sid&lt;br /&gt;
 sudo tar cjf sid.tar.bz2 sid&lt;br /&gt;
 nc -w3 -lp1234 &amp;lt; sid-arm.tar.bz2&lt;br /&gt;
&lt;br /&gt;
on neo:&lt;br /&gt;
&lt;br /&gt;
 cd /media/card&lt;br /&gt;
 nc 192.168.0.200 1234 | tar -x -j -f -&lt;br /&gt;
 mount -t none -o bind /dev /media/card/sid/dev&lt;br /&gt;
 mount -t none -o bind /proc /media/card/sid/proc&lt;br /&gt;
 mount -t none -o bind /sys /media/card/sid/sys&lt;br /&gt;
 mount -t none -o bind /tmp /media/card/sid/tmp&lt;br /&gt;
 chroot /media/card/sid /deboostrap/deboostrap --second-stage&lt;br /&gt;
 cp /etc/resolv.conf /media/card/sid&lt;br /&gt;
 chroot /media/card/sid apt-get update&lt;br /&gt;
 chroot /media/card/sid apt-get install mplayer&lt;br /&gt;
 chroot /media/card/sid mplayer http://relay.slayradio.org:8000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Xglamo on the FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
Copy /usr/bin/Xglamo (and /usr/bin/Xfbdev) to  /usr/bin in Debian from FSO/ASU/2007.2/2008.8.&lt;br /&gt;
&lt;br /&gt;
Add this to your .bashrc (to tell tslib to use the correct input device):&lt;br /&gt;
 export TSLIB_TSDEVICE=/dev/input/event1&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
 ln -s /usr/lib/libts-0.0.so.0 /usr/lib/libts-1.0.so.0&lt;br /&gt;
&lt;br /&gt;
We also need to change the symlink for the X server to either Xfbdev or Xglamo (this should better be handled by update-alternatives!):&lt;br /&gt;
 cd /usr/bin &amp;amp;&amp;amp; mv X X.orig &amp;amp;&amp;amp; ln -s Xfbdev X&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Rotating screen to landscape ==&lt;br /&gt;
&lt;br /&gt;
add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections to get landscape mode&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hiding the cursor ==&lt;br /&gt;
&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&lt;br /&gt;
 #define empty.cursor_width 16&lt;br /&gt;
 #define empty.cursor_height 16&lt;br /&gt;
 static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
 xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
&lt;br /&gt;
to your ~/.xinitrc&lt;br /&gt;
&lt;br /&gt;
=Official Debian Port=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Distributions</id>
		<title>Distributions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Distributions"/>
				<updated>2008-08-13T10:13:26Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: Updated Debian Info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Distributions}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float:right;width:200px;background-color:#FF6600;text-align:center;border-collapse:collapse;font-weight:bold&amp;quot; &lt;br /&gt;
|&amp;lt;font color=white&amp;gt;Distributions&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! style='background-color:#333333;color:#FFFFFF'|&lt;br /&gt;
&amp;lt;div align=left&amp;gt;&lt;br /&gt;
* &amp;lt;font color='#BBBBBB'&amp;gt;Openmoko (official)&amp;lt;/font&amp;gt;&lt;br /&gt;
** [[Om 2008.8]]&lt;br /&gt;
** [[Om 2007.2]]&lt;br /&gt;
** [[Om 2007.1]]&lt;br /&gt;
** [[OpenmokoFramework|FSO]]&lt;br /&gt;
* &amp;lt;font color='#BBBBBB'&amp;gt;Community&amp;lt;/font&amp;gt;&lt;br /&gt;
** [[SHR]]&lt;br /&gt;
* &amp;lt;font color='#BBBBBB'&amp;gt;Other&amp;lt;/font&amp;gt;&lt;br /&gt;
** [[Qtopia]]&lt;br /&gt;
** [[Debian]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&amp;lt;noinclude&amp;gt;[[Category:Templates]]&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Openmoko distributions are designed to run on various mobile devices, with the primary aim of Openmoko Inc.'s [[Neo 1973]] and [[Neo FreeRunner]] phones. They are similar to Linux distributions; complete operating systems with user applications. You can install any of them on your phone or even have a multiboot system with two distributions installed. &lt;br /&gt;
&lt;br /&gt;
While the Openmoko distributions will run on [[Supported devices|other mobile devices]] too, some other software distributions will also run on the Openmoko Inc. phones (see below). &lt;br /&gt;
&lt;br /&gt;
For downloads see [[Latest Images]], for installation instructions see [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
== About distributions ==&lt;br /&gt;
&lt;br /&gt;
To be technically precise, 2007.2, 2008.8, FSO and SHR of these are not directly independent distributions, but different 'release targets'. They are built out of different branches of the [[OpenEmbedded]] metadistribution source tree, e.g. 2007.2 and 2008.8 are to each other like Ubuntu Gutsy is to Kubuntu Hardy. &lt;br /&gt;
&lt;br /&gt;
One should only use feeds from packages of the same source-branch, else 'stuff will break', similar to like using .debs from Hardy on a Gutsy base system. Also note that there is NO supported upgrade path between these at the moment, thus updating by changing the feeds will most likely end in broken packages or even a unbootable system. Thus please always use [[dfu-util]] to switch between the different 'distributions' for now or install them in a dual-boot setup (e.g. via sdcard or NFS).&lt;br /&gt;
&lt;br /&gt;
== Openmoko Inc. driven release targets ==&lt;br /&gt;
&lt;br /&gt;
=== Om 2007.2 (GTK) ===&lt;br /&gt;
&lt;br /&gt;
[[Om 2007.2]] is for people who are familiar with the [http://www.gnome.org/mobile/ GNOME Mobile] initiative and who want to write applications that run on multiple devices running (parts of) GNOME Mobile. This includes Maemo, which runs on the Nokia Internet Tablets. The strength of the GTK+ stack is a UI and programming environment similar to what you run on your Linux desktop, if you’re into GNOME. The GTK+ has PIM applications based on the Evolution Data Server and runs the gsmd phone server. Although you can use them, the applications are still pretty rough und unfinished. Some people have problems with the stability of the phone server.&lt;br /&gt;
&lt;br /&gt;
* [[Om 2007.2]]&lt;br /&gt;
* Availabilty: [http://buildhost.openmoko.org/daily/ Official Buildhost] and [[MokoMakefile]] support for development builds&lt;br /&gt;
* Download: [http://buildhost.openmoko.org/daily/freerunner/  Releases are labeled &amp;quot;openmoko-devel-image&amp;quot; ]&lt;br /&gt;
* Several videos of this stack by [http://uk.youtube.com/user/freeyourphone Youtube user freeyourphone] and [http://uk.youtube.com/watch?v=U05kZfURPig&amp;amp;NR=1 video review by BVB Tech]&lt;br /&gt;
This is the base-system which is installed on Freerunner when it leaves the factory.&lt;br /&gt;
&lt;br /&gt;
2007.2 development driven by openmoko inc. has basically stopped and resources are allocated in favor of 2008.8, while the community currently does the effort to 'rescue' the 2007.2 telephony apps and pull them to the future middleware from FSO (see SHR).&lt;br /&gt;
thus patches are still welcome, especially if they help development of SHR.&lt;br /&gt;
&lt;br /&gt;
=== Om 2008.8 (ASU, April/August Software Update) ===&lt;br /&gt;
&lt;br /&gt;
Om 2008.8 has been started to integrate the [http://trolltech.com/products/qtopia Qtopia] stack - on X11 - with a new set of graphically pleasing applications based on the Enlightenment Foundation Libraries. ASU is the internal name and is known as Om 2008.8 upon its release on August 8, 2008.  Qtopia is a more mature product than the GNOME Mobile stack and you can expect all the standard feature phone applications to work in a solid way. It uses the Qtopia phone server. Since - contrary to standard Qtopia - it does not directly use the framebuffer, non-Qt applications can safely share the screen with Qt applications.&lt;br /&gt;
&lt;br /&gt;
* [[Om2008.8|Om 2008.8]]&lt;br /&gt;
* Download: [http://downloads.openmoko.org/releases/Om2008.8/  Releases are labeled &amp;quot;Om2008.8&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
=== FSO - freesmartphone.org ===&lt;br /&gt;
&lt;br /&gt;
FSO has been started to overcome the deficiencies both of the 2007.2 and the 2008.8 stack, namely to come up with an extensible framework that gives developers the infrastructure they need to create solid and exciting software products based on the Openmoko platform. An infrastructure that supports competing UIs while we can collaborate on developing services, making the framework strong . Here, the focus is on stable highlevel services that you can access from whatever language or UI that supports [http://dbus.freesmartphone.org/ dbus]. People report that despite its infancy, e.g. the phone server part in FSO is already more solid than anywhere else.&lt;br /&gt;
&lt;br /&gt;
It is not really intended as future release-target, but used as a 'vessel' or 'container' for the development and testing of the new, future middleware.&amp;lt;br&amp;gt;&lt;br /&gt;
The applications installed are intended as test-tools for the new middleware and not as fully featured, end user oriented applications. (even if it looks that way sometimes)&lt;br /&gt;
&lt;br /&gt;
* [[FSO]]&lt;br /&gt;
* [http://trac.freesmartphone.org:8000/trac-example  Development tracker]&lt;br /&gt;
* [http://downloads.openmoko.org/framework/milestone2/ Download milestone 2]&lt;br /&gt;
* [http://freesmartphone.org freesmartphone.org]&lt;br /&gt;
&lt;br /&gt;
== Openmoko Community driven release targets ==&lt;br /&gt;
&lt;br /&gt;
=== SHR - Stable Hybrid Release ===&lt;br /&gt;
&lt;br /&gt;
Stable Hybrid Release is a combination of the middleware from FSO, some of the 2007.2 GTK software (telephony-ui, pim), and Om2008.8 that provides all of the functionality of the 2007.2 software, but with the stability of the FSO.&lt;br /&gt;
&lt;br /&gt;
* [[Stable Hybrid Release]]&lt;br /&gt;
&lt;br /&gt;
== Non-Openmoko distributions ==&lt;br /&gt;
&lt;br /&gt;
These are not Openmoko (and OE) based distributions. These are an alternatives you can run on your Openmoko phones.&lt;br /&gt;
&lt;br /&gt;
=== Qtopia ===&lt;br /&gt;
&lt;br /&gt;
The Qtopia distribution from [http://www.trolltech.com Trolltech], it aims to provide a ready-to use image for Openmoko devices. &lt;br /&gt;
&lt;br /&gt;
* [[Qtopia]]&lt;br /&gt;
* Download: [http://www.qtopia.net/modules/mydownloads/viewcat.php?cid=6 Qtopia.net]&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&lt;br /&gt;
Debian Linux, the whole distribution, on a mobile phone.&lt;br /&gt;
&lt;br /&gt;
* [[Debian]]&lt;br /&gt;
&lt;br /&gt;
== Features by distribution/release target ==&lt;br /&gt;
&lt;br /&gt;
=== Connectivity ===&lt;br /&gt;
&lt;br /&gt;
{| border=1 width=100% |&lt;br /&gt;
| width=14%| || width=14%|2007.2 || width=14%|FSO || width=14%|Om2008.8 || width=14%|SHR || width=14%|Qtopia || Debian&lt;br /&gt;
|-&lt;br /&gt;
| Telephony || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| SMS || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| GPRS || Not through UI || Not through UI || Not through UI || N/A || No (3) || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| WiFi || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || Not through UI || style=&amp;quot;background:lightgreen;&amp;quot; | Yes (*) || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes ||style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| VoIP || ?? || ?? || ?? || ?? || ?? || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || No || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| GPS || style=&amp;quot;background:lightgreen;&amp;quot; | Yes (1) || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes (1) || N/A || No || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===  User Interaction ===&lt;br /&gt;
&lt;br /&gt;
{| border=1 width=100% |&lt;br /&gt;
| width=14%| || width=14%|2007.2 || width=14%|FSO || width=14%|Om2008.8 || width=14%|SHR || width=14%|Qtopia || Debian&lt;br /&gt;
|-&lt;br /&gt;
| Stylus friendly || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Finger friendly || Partially || Partially || Partially || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer || No || No || No || N/A || No || No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Applications ===&lt;br /&gt;
&lt;br /&gt;
{| border=1 width=100% |&lt;br /&gt;
| width=14%| || width=14%|2007.2 || width=14%|FSO || width=14%|Om2008.8 || width=14%|SHR || width=14%|Qtopia || Debian&lt;br /&gt;
|-&lt;br /&gt;
| Terminal || Basic (2) || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes (1) || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| PIM || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || No || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Phonebook || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Dialer || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || N/A || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Web Browser || style=&amp;quot;background:lightgreen;&amp;quot; | Yes (1) || ? || style=&amp;quot;background:lightgreen;&amp;quot; | Yes (1) || ? || No || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Mail Client || ? || ? || ? || ? || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| XMPP Client || style=&amp;quot;background:lightgreen;&amp;quot; | Yes (1) || ? || ? || ? || No || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Toolkits / Runtimes ===&lt;br /&gt;
{| border=1 width=100% |&lt;br /&gt;
| width=14%| || width=14%|2007.2 || width=14%|FSO || width=14%|Om2008.8 || width=14%|SHR || width=14%|Qtopia || Debian&lt;br /&gt;
|-&lt;br /&gt;
| GTK+ || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || No || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| QT/Qtopia || No || style=&amp;quot;background:lightgreen;&amp;quot; | Yes? || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes? || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Middleware || gsmd/neod || freesmartphone.org || qtopia-x11 || freesmartphone.org || qtopia || freesmartphone.org&lt;br /&gt;
|-&lt;br /&gt;
| [[Java]] || Jalimo || ? || ? || ? || ? || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| [[Python]] || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || ? || style=&amp;quot;background:lightgreen;&amp;quot; | Yes || style=&amp;quot;background:lightgreen;&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Footnotes:&lt;br /&gt;
&lt;br /&gt;
(1) works, but need additional software to be installed&lt;br /&gt;
&lt;br /&gt;
(2) unusable due to lack of certain keyboard characters (unless you [[Switching_Keyboards#Matchbox_keyboard|install matchbox-keyboard]])&lt;br /&gt;
&lt;br /&gt;
(3) there is a UI but it crashes the device when used.&lt;br /&gt;
&lt;br /&gt;
(*) unstable&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
Original distribution descriptions are from Mickey Lauer's [http://www.vanille-media.de/site/index.php/2008/06/28/gtk-asu-fso-tmtla/ GTK, ASU, FSO, TMTLA!].&lt;br /&gt;
&lt;br /&gt;
[[Category:Distributions| ]]&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Mokopedia</id>
		<title>Mokopedia</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Mokopedia"/>
				<updated>2008-07-25T16:44:15Z</updated>
		
		<summary type="html">&lt;p&gt;JoSch: heavy update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Mokopedia_main.png|thumb|480px|''Mokopedia running on Openmoko'']]&lt;br /&gt;
&lt;br /&gt;
for more info visit the official website: http://mokopedia.mister-muffin.de/&lt;br /&gt;
&lt;br /&gt;
join our irc channel on freenode: #mokopedia&lt;br /&gt;
&lt;br /&gt;
This project aims to provide software to create and use small size wikipedia dumps for embedded Linux devices.&lt;br /&gt;
&lt;br /&gt;
All Wikipedia pages will be stripped down html files compressed in a squashfs lzma image.&lt;br /&gt;
&lt;br /&gt;
It's the goal to make ALL the articles (except images) of Wikipedia (including formatting, linking, tables, formulas) fit on very little space.&lt;br /&gt;
&lt;br /&gt;
Tests show that the German Wikipedia will be around 1.3GB and the English Wikipedia around 4GB so with flash storage prices dropping I will not bother removing certain articles - the dumps will include everything. &lt;br /&gt;
&lt;br /&gt;
= development status =&lt;br /&gt;
&lt;br /&gt;
some people are already running the new mokopedia on their freerunners but i wont announce any official info until enwiki isnt done so up to now there are only dewiki and others that are possible to use.&lt;br /&gt;
&lt;br /&gt;
I you are interested to get it running on you freerunner join our irc channel and i will explain the few steps you have to take.&lt;br /&gt;
&lt;br /&gt;
In the near feature there will be ipkgs for everything.&lt;br /&gt;
&lt;br /&gt;
= to everybody thas was familiar with the old implementation =&lt;br /&gt;
&lt;br /&gt;
There is no lighty needed anymore - i now implement the server in a simple python script.&lt;br /&gt;
&lt;br /&gt;
Now we have FULLTEXT search - yeah you hear right. a fulltext search through 6.8 GB of dewiki is possible in mere 20 seconds on the neo1973.&lt;br /&gt;
&lt;br /&gt;
Now there are also a lot of things already implemented as ipkg - only the server is left but will follow soon.&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications]]&lt;/div&gt;</summary>
		<author><name>JoSch</name></author>	</entry>

	</feed>