Manual Debian

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(added screenshot)
(additional comments, udev rules, gdm and xvkbd)
Line 26: Line 26:
 
  cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzv
 
  cat armel-chroot-first-stage.tar.gz | ssh root@192.168.0.202 tar -C /media/card -xzv
 
= 5. complete debootstrap process =
 
= 5. complete debootstrap process =
 +
make sure your internal clock is set to the correct date because apt-get will complain if otherwise
 +
hwclock --set --date="MM/DD/YY hh:mm:ss"
 
ssh to your device and execute the following commands (just copypaste everything below)
 
ssh to your device and execute the following commands (just copypaste everything below)
 
  echo "nameserver 192.168.0.200" > /media/card/etc/resolv.conf
 
  echo "nameserver 192.168.0.200" > /media/card/etc/resolv.conf
Line 50: Line 52:
 
  chroot /media/card
 
  chroot /media/card
 
  /debootstrap/debootstrap --second-stage
 
  /debootstrap/debootstrap --second-stage
 +
install openssh so you can login remotely
 
  echo "deb http://ftp.de.debian.org/debian sid main" > /etc/apt/sources.list
 
  echo "deb http://ftp.de.debian.org/debian sid main" > /etc/apt/sources.list
 
  apt-get update
 
  apt-get update
 
  apt-get install openssh-server
 
  apt-get install openssh-server
 +
install and configure locales
 
  apt-get install locales
 
  apt-get install locales
 
  dpkg-reconfigure locales
 
  dpkg-reconfigure locales
 +
install udev to dynamically create /dev
 
  apt-get install udev
 
  apt-get install udev
 +
set a root password
 
  passwd
 
  passwd
 +
create a normal user
 +
adduser <yournamehere>
 
You may also copy some kernel modules over doing this (still on the neo)
 
You may also copy some kernel modules over doing this (still on the neo)
 
  wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
 
  wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
Line 93: Line 101:
 
install the tslib driver:
 
install the tslib driver:
 
  apt-get install xserver-xorg-input-tslib
 
  apt-get install xserver-xorg-input-tslib
create this link as the device is hardcoded for now:
+
edit /etc/udev/udev.rules as the tslib device is hardcoded for now. search for the input devices section and make the first line look like this:
  ln -s /dev/input/event1 /dev/event0
+
  # input devices
 +
KERNEL=="event1",              NAME="event0"
 
and edit the InputDevice section in your xorg.conf
 
and edit the InputDevice section in your xorg.conf
 
  Section "InputDevice"
 
  Section "InputDevice"
Line 109: Line 118:
 
= 8. install xfce4 =
 
= 8. install xfce4 =
 
simple...
 
simple...
  apt-get install xfce4
+
  apt-get install gdm xfce4 xvkbd
  startx /usr/bin/xfce4-session -- vt1
+
configure gdm so xkvbd will allow you to put in your username and password. simply add this to the end of /etc/gdm/Init/Default before exit 0 so that the three last lines look like this:
 +
fi
 +
  sleep 20 && /usr/bin/xvkbd -xdm -geometry 480x210+0+0 &
 +
exit 0
 +
on each boot gdm should start automatically now

Revision as of 10:51, 26 March 2008

Debian on neo1973

This page is to explain how to run debian armel port on neo1973. This instructions are likely to work on freerunner, too.

Contents

1. (optional) install known good kernel

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

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

As there is no way to boot from sdhc with uboot directly I always copy my kernel to flash and let it boot my rootfs from sd but feel free to do it your way.

2. configure booting from sd/sdhc

Do as proposed here: Booting_from_SD

3.1. (option #1) debootstrap your own armel rootfs

debootstrap your rootfs on debian or ubuntu

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

3.2. (option #2) download ready to use armel rootfs

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

4 prepare sd card

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

umount /media/card
mkfs.ext3 /dev/mmcblk0p1
mount /dev/mmcblk0p1 /media/card

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

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

or if you downloaded the archive

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

5. complete debootstrap process

make sure your internal clock is set to the correct date because apt-get will complain if otherwise

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

ssh to your device and execute the following commands (just copypaste everything below)

echo "nameserver 192.168.0.200" > /media/card/etc/resolv.conf
echo "fic-gta01" > /media/card/etc/hostname
echo "127.0.0.1 localhost.localdomain localhost fic-gta01" > /media/card/etc/hosts
echo -e "auto lo\n\
iface lo inet loopback\n\
auto usb0\n\
iface usb0 inet static\n\
    address 192.168.0.202\n\
    netmask 255.255.255.0\n\
    network 192.168.0.0\n\
    gateway 192.168.0.200\n\
    up echo nameserver 192.168.0.200 >/etc/resolv.conf" > /media/card/etc/network/interfaces
echo -e "rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\
proc    /proc            proc    defaults                           0 0\n\
tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\
tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/log         tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0" > /media/card/etc/fstab

now chroot into your armel rootfs and finish the install

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

install openssh so you can login remotely

echo "deb http://ftp.de.debian.org/debian sid main" > /etc/apt/sources.list
apt-get update
apt-get install openssh-server

install and configure locales

apt-get install locales
dpkg-reconfigure locales

install udev to dynamically create /dev

apt-get install udev

set a root password

passwd

create a normal user

adduser <yournamehere>

You may also copy some kernel modules over doing this (still on the neo)

wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
tar -C /media/card -xzvf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
chroot /media/card
depmod -a

6. get x running

now reboot and start your debian. you can login with ssh and start configuring xorg:

apt-get install xorg

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

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

start x in the first vt:

startx -- vt1

7. get touchscreen working

install the tslib driver:

apt-get install xserver-xorg-input-tslib

edit /etc/udev/udev.rules as the tslib device is hardcoded for now. search for the input devices section and make the first line look like this:

# input devices
KERNEL=="event1",               NAME="event0"

and edit the InputDevice section in your xorg.conf

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

calibrate your touchscreen

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

start x and enjoy!!

startx -- vt1

8. install xfce4

simple...

apt-get install gdm xfce4 xvkbd

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

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

on each boot gdm should start automatically now

Personal tools
Debian on neo1973

This page is to explain how to run debian armel port on neo1973. This instructions are likely to work on freerunner, too.

1. (optional) install known good kernel

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

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

As there is no way to boot from sdhc with uboot directly I always copy my kernel to flash and let it boot my rootfs from sd but feel free to do it your way.

2. configure booting from sd/sdhc

Do as proposed here: Booting_from_SD

3.1. (option #1) debootstrap your own armel rootfs

debootstrap your rootfs on debian or ubuntu

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

3.2. (option #2) download ready to use armel rootfs

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

4 prepare sd card

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

umount /media/card
mkfs.ext3 /dev/mmcblk0p1
mount /dev/mmcblk0p1 /media/card

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

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

or if you downloaded the archive

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

5. complete debootstrap process

make sure your internal clock is set to the correct date because apt-get will complain if otherwise

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

ssh to your device and execute the following commands (just copypaste everything below)

echo "nameserver 192.168.0.200" > /media/card/etc/resolv.conf
echo "fic-gta01" > /media/card/etc/hostname
echo "127.0.0.1 localhost.localdomain localhost fic-gta01" > /media/card/etc/hosts
echo -e "auto lo\n\
iface lo inet loopback\n\
auto usb0\n\
iface usb0 inet static\n\
    address 192.168.0.202\n\
    netmask 255.255.255.0\n\
    network 192.168.0.0\n\
    gateway 192.168.0.200\n\
    up echo nameserver 192.168.0.200 >/etc/resolv.conf" > /media/card/etc/network/interfaces
echo -e "rootfs  /                ext3    defaults,errors=remount-ro,noatime 0 1\n\
proc    /proc            proc    defaults                           0 0\n\
tmpfs   /etc/network/run tmpfs   defaults,noatime                   0 0\n\
tmpfs   /tmp             tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/lock        tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/log         tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/run         tmpfs   defaults,noatime                   0 0\n\
tmpfs   /var/tmp         tmpfs   defaults,noatime                   0 0" > /media/card/etc/fstab

now chroot into your armel rootfs and finish the install

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

install openssh so you can login remotely

echo "deb http://ftp.de.debian.org/debian sid main" > /etc/apt/sources.list
apt-get update
apt-get install openssh-server

install and configure locales

apt-get install locales
dpkg-reconfigure locales

install udev to dynamically create /dev

apt-get install udev

set a root password

passwd

create a normal user

adduser <yournamehere>

You may also copy some kernel modules over doing this (still on the neo)

wget http://rabenfrost.net/celtune/modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
tar -C /media/card -xzvf modules-2.6.24+svnr4194-r4165-r3-neo1973.tgz
chroot /media/card
depmod -a

6. get x running

now reboot and start your debian. you can login with ssh and start configuring xorg:

apt-get install xorg

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

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

start x in the first vt:

startx -- vt1

7. get touchscreen working

install the tslib driver:

apt-get install xserver-xorg-input-tslib

edit /etc/udev/udev.rules as the tslib device is hardcoded for now. search for the input devices section and make the first line look like this:

# input devices
KERNEL=="event1",               NAME="event0"

and edit the InputDevice section in your xorg.conf

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

calibrate your touchscreen

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

start x and enjoy!!

startx -- vt1

8. install xfce4

simple...

apt-get install gdm xfce4 xvkbd

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

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

on each boot gdm should start automatically now