Manual Debian

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(please help with xorg error in debian :-()
Line 21: Line 21:
 
  echo "nameserver 192.168.0.200" > /media/card/etc/resolv.conf
 
  echo "nameserver 192.168.0.200" > /media/card/etc/resolv.conf
 
  echo "fix-gta01" > /media/card/etc/hostname
 
  echo "fix-gta01" > /media/card/etc/hostname
 +
echo "127.0.0.1 localhost.localdomain localhost fic-gta01" > /media/card/etc/hosts
 
  echo -e "auto lo\n\
 
  echo -e "auto lo\n\
 
  iface lo inet loopback\n\
 
  iface lo inet loopback\n\
Line 30: Line 31:
 
     gateway 192.168.0.200\n\
 
     gateway 192.168.0.200\n\
 
     up echo nameserver 192.168.0.200 >/etc/resolv.conf" > /media/card/etc/network/interfaces
 
     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
 
now chroot into your armel rootfs and finish the install
 
  chroot /media/card
 
  chroot /media/card
Line 36: Line 45:
 
  apt-get update
 
  apt-get update
 
  apt-get install openssh-server
 
  apt-get install openssh-server
 +
apt-get install locales
 +
dpkg-reconfigure locales
 +
apt-get install udev
 +
passwd
 +
You may also copy some kernel modules over
 +
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
 
now reboot and start your debian. you can login with ssh and start configuring xorg - I will add this soon.
 
now reboot and start your debian. you can login with ssh and start configuring xorg - I will add this soon.
 +
apt-get install xorg
 +
doing this I get:
 +
Fatal server error:
 +
xf86OpenConsole: Cannot open virtual console 255 (No such file or directory)
 +
this sux as I already fixed this problem a while ago but cannot remember how I did it - can anybody fix this?
 
= 3.2. (option #2) download ready to use armel rootfs =
 
= 3.2. (option #2) download ready to use armel rootfs =

Revision as of 19:42, 23 March 2008

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 removing sd debug symbols and buildin 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

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/

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

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 "fix-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
echo "deb http://ftp.de.debian.org/debian sid main" > /etc/apt/sources.list
apt-get update
apt-get install openssh-server
apt-get install locales
dpkg-reconfigure locales
apt-get install udev
passwd

You may also copy some kernel modules over

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

now reboot and start your debian. you can login with ssh and start configuring xorg - I will add this soon.

apt-get install xorg

doing this I get:

Fatal server error:
xf86OpenConsole: Cannot open virtual console 255 (No such file or directory)

this sux as I already fixed this problem a while ago but cannot remember how I did it - can anybody fix this?

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

Personal tools

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 removing sd debug symbols and buildin 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

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/

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

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 "fix-gta01" > /media/card/etc/hostname
echo -e "auto lo\n\
iface lo inet loopback\n\
auto usb0\n\
iface usb0 inet static\n\
    address 192.168.0.202\n\
    netmask 255.255.255.0\n\
    network 192.168.0.0\n\
    gateway 192.168.0.200\n\
    up echo nameserver 192.168.0.200 >/etc/resolv.conf" > /media/card/etc/network/interfaces

now chroot into your armel rootfs and finish the install

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

now reboot and start your debian. you can login with ssh and start configuring xorg - I will add this soon.

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