Debian

From Openmoko

Revision as of 08:33, 19 August 2008 by Coolcat (Talk | contribs)

Jump to: navigation, search

Contents

Installation

There are official instructions on how to install Debian on http://wiki.debian.org/DebianOnFreeRunner, and the announcement.

Previous, partly now outdated information on how to install Debian manually has been moved to Manual Debian.

System

Speeding up booting

What's good for every linux booting is also good for our debian on the freerunner: booting in quiet mode. To do so by default just boot your Neo Freerunner in NOR-Flash and execute this configure-script: configure-uboot.sh.

It changes default booting to quiet-mode and adds another boot-option to boot without quiet-mode for debugging purpose.

Suspend

To make suspend available you have to install apmd:

apt-get install apmd

After that you can suspend your phone with:

apm -s

and make it wake up again with pressing the power button.


Issues:

  • Wuth 06:28, 17 August 2008 (UTC): I found that apmd was already installed by using the official debian installation procedure, but that the kernel didn't support apm. I haven't yet resolved this issue.

Time

The default time zone is UTC. Reconfigure it by running

# dpkg-reconfigure tzdata

Set the clock manual using, e.g.

# date -s 00:33


Issues:

WLAN

You can set up the wireless connection to your home router. Assuming your wireless router uses WPA security and DHCP:

# apt-get install wireless-tools wpasupplicant dhcp3-client

Edit /etc/network/interfaces to include a section like this:

auto eth0
iface eth0 inet dhcp
       wpa-driver wext
       wpa-ssid "MyWirelessName"
       wpa-psk "MyWirelessPassword"

Where, of course, you're using the name of your wireless network and it's password instead of MyWirelessName and MyWirelessPassword.

You can test by running

# ifup eth0

You can determine your IP address by running

# ifconfig eth0


Issues:

  • only works if in presence of wireless network on boot, or when manually running ifup eth0
  • booting away from wireless network is slower because waits for DHCP to time out
  • does not reestablish connection when leaving wireless area and then returning
  • does not support multiple wireless networks or open hotspots that you may travel between

Software

TangoGPS

Tangogps is a very nice GPS mapping application. The latest version is available in Debian.

Unfortunately it depends on gpsd which conflicts with frameworkd in fso-frameworkd.

# apt-get install gpsd tangogps
 

Edit /etc/frameworkd.conf. In the section [ogpsd]<code>, edit to read:

# path = /dev/ttySAC1
path = /dev/null
/etc/init.d/fso-frameworkd restart
/etc/init.d/zhone-session stop && sleep 2 && /etc/init.d/zhone-session start 
# dpkg-reconfigure gpsd
  • Start gpsd automatically no boot? Yes.
  • Device the GPS receiver is attached to: /dev/ttySAC1
  • Should gpsd handle attached USB GPS receivers automatically? Yes
    • not certain what this answer should be
  • Options to gpsd: none


Start tangogps like this:

# echo 1 >/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/neo1973-pm-gps.0/pwron

Turns the GPS on.

# DISPLAY=:0 tangogps


Issues:

  • The different daemons for the reading GPS data mean that both tangogps and the framework demo GPS application can't be configured to work at the same time. Reboots are probably necessary when switching between them.
    • Both gpsd and the framework publish GPS data through dbus, though with different interfaces. This suggests a number of possible solutions.
      • gpsd or the framework could implement the other's interface (along with their own).
      • the framework could have an option to read data from gpsd.
      • tangogps could be extended to read data from the framework.

Miscellaneous

Making the cursor invisible

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

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

Now you can execute:

xsetroot -cursor empty.cursor empty.cursor

and the cursor will be invisible. To make this permanent you have to invent something ;) It must be executed after zhone has finished starting up.

Personal tools

Installation

There are official instructions on how to install Debian on http://wiki.debian.org/DebianOnFreeRunner, and the announcement.

Previous, partly now outdated information on how to install Debian manually has been moved to Manual Debian.

System

Speeding up booting

What's good for every linux booting is also good for our debian on the freerunner: booting in quiet mode. To do so by default just boot your Neo Freerunner in NOR-Flash and execute this configure-script: configure-uboot.sh.

It changes default booting to quiet-mode and adds another boot-option to boot without quiet-mode for debugging purpose.

Suspend

To make suspend available you have to install apmd:

apt-get install apmd

After that you can suspend your phone with:

apm -s

and make it wake up again with pressing the power button.


Issues:

  • Wuth 06:28, 17 August 2008 (UTC): I found that apmd was already installed by using the official debian installation procedure, but that the kernel didn't support apm. I haven't yet resolved this issue.

Time

The default time zone is UTC. Reconfigure it by running

# dpkg-reconfigure tzdata

Set the clock manual using, e.g.

# date -s 00:33


Issues:

WLAN

You can set up the wireless connection to your home router. Assuming your wireless router uses WPA security and DHCP:

# apt-get install wireless-tools wpasupplicant dhcp3-client

Edit /etc/network/interfaces to include a section like this:

auto eth0
iface eth0 inet dhcp
       wpa-driver wext
       wpa-ssid "MyWirelessName"
       wpa-psk "MyWirelessPassword"

Where, of course, you're using the name of your wireless network and it's password instead of MyWirelessName and MyWirelessPassword.

You can test by running

# ifup eth0

You can determine your IP address by running

# ifconfig eth0


Issues:

  • only works if in presence of wireless network on boot, or when manually running ifup eth0
  • booting away from wireless network is slower because waits for DHCP to time out
  • does not reestablish connection when leaving wireless area and then returning
  • does not support multiple wireless networks or open hotspots that you may travel between

Software

TangoGPS

Tangogps is a very nice GPS mapping application. The latest version is available in Debian.

Unfortunately it depends on gpsd which conflicts with frameworkd in fso-frameworkd.

# apt-get install gpsd tangogps
 

Edit /etc/frameworkd.conf. In the section [ogpsd]<code>, edit to read:

# path = /dev/ttySAC1
path = /dev/null
/etc/init.d/fso-frameworkd restart
/etc/init.d/zhone-session stop && sleep 2 && /etc/init.d/zhone-session start 
# dpkg-reconfigure gpsd
  • Start gpsd automatically no boot? Yes.
  • Device the GPS receiver is attached to: /dev/ttySAC1
  • Should gpsd handle attached USB GPS receivers automatically? Yes
    • not certain what this answer should be
  • Options to gpsd: none


Start tangogps like this:

# echo 1 >/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/neo1973-pm-gps.0/pwron

Turns the GPS on.

# DISPLAY=:0 tangogps


Issues:

  • The different daemons for the reading GPS data mean that both tangogps and the framework demo GPS application can't be configured to work at the same time. Reboots are probably necessary when switching between them.
    • Both gpsd and the framework publish GPS data through dbus, though with different interfaces. This suggests a number of possible solutions.
      • gpsd or the framework could implement the other's interface (along with their own).
      • the framework could have an option to read data from gpsd.
      • tangogps could be extended to read data from the framework.

Miscellaneous

Making the cursor invisible

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

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

Now you can execute:

xsetroot -cursor empty.cursor empty.cursor

and the cursor will be invisible. To make this permanent you have to invent something ;) It must be executed after zhone has finished starting up. </div>