News

Debian OLPC howto

This tutorial shows the steps that we've done to run Debian in OLPC, including problems. You can help us with suggestions(Francisco Alecrim <francisco.alecrim@indt.org.br> ; Anderson Briglia <anderson.briglia@indt.org.br>).

Feel free!!!

Preparing USB disk

 wget http://olpc.download.redhat.com/olpc/streams/development/latest/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2

or the most recent build.

wget http://xs-dev.laptop.org/~cscott/olpc/streams/update1/latest/devel_ext3/olpc-redhat-stream-update1-devel_jffs2.img    

 bunzip2 olpc-redhat-stream-development-devel_ext3.img.bz2

 dd if=olpc-redhat-stream-development-devel_ext3.img of=/dev/sdb bs=1M

 sync

We did a backup of OLPC filesystem.

 mount /dev/sdb1 /media/OLPCRoot

 cd /media/OLPCRoot

 tar -cvzpf olpc_filesystem_backup.tar.gz *

 mkdir ~/olpc_root ; cd ~/olpc_root

 tar -xvzpf olpc_filesystem_backup.tar.gz

 cd /media/OLPCRoot

 rm -rf *

 debootstrap etch /media/OLPCRoot http://ftp.br.debian.org/debian/

Reference:

OS_images_for_USB_disks

File system

New kernel

 git clone git://dev.laptop.org/olpc-2.6

Configure it using the config that is available in OLPC filesystem. Compile kernel and modules.

 cp ~/olpc_root/boot/config-2.6.21-20070406.2.olpc.051789d5548a5a3 .config

 make

 make modules

 make modules_install INSTALL_MOD_PATH=/media/OLPCRoot

 cp -rv ~/olpc_root/boot/* /media/OLPCRoot/boot/.

 cp System.map /media/OLPCRoot/boot/System.map-2.6.21-rc7

 cp arch/i386/boot/bzImage /media/OLPCRoot/boot/vmlinuz-2.6.21-rc7

 cd /media/OLPCRoot/boot

 ln -sf vmlinuz-2.6.21-rc7 vmlinuz

Reference:

OLPC wiki kernel building

Basic modifies

Some simple configuration files:

* Users (passwd)

 cp /etc/passwd /media/OLPCRoot/etc/passwd

* Passwords(shadow)

 cp /etc/shadow /media/OLPCRoot/etc/shadow

* Machine name(hostname)

 cp /etc/hostname /media/OLPCRoot/etc/hostname

* Machines available (hosts)

 cp /etc/hosts /media/OLPCRoot/etc/hosts

* Debian repository ()

  cp /etc/apt/sources.list /media/OLPCRoot/etc/apt/sources.list 

Mount point (/media/OLPCRoot/etc/fstab), you can copy from OLPC filesystem.

 LABEL=OLPCRoot         /                       ext3    defaults,noatime 1 1

 devpts                  /dev/pts                devpts  gid=5,mode=620    0 0

 tmpfs                   /dev/shm                tmpfs   defaults,size=15% 0 0

 proc                    /proc                   proc    defaults          0 0

 sysfs                   /sys                    sysfs   defaults          0 0

Modules necessary(/media/OLPCRoot/etc/modules).

olpc_battery

i2c_dev

mousedev

joydev

snd_cs5535audio

snd_seq_dummy

snd_seq_oss

snd_pcm_oss

ov7670

cafe_ccic

usb8xxx

psmouse

serio_raw

asix

cpuid

msr

Now you can test a basic boot with your new debian filesystem. Simple and fast!!!

Xorg

We install xserver-xorg, x-window-system and fluxbox in OLPC.

  apt-get install xserver-xorg x-window-system fluxbox

We did find a generic configuration to start up X server. OLPC uses a VGA AMD video and we don't have it available on debian, but it's already requested, as you can see here.

Plug the pen drive in your desktop again(it's more fast than OLPC). We compiled the new driver and install it in debian filesystem.

 git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-amd.git

 ./autogen.sh --prefix=/media/OLPCRoot/usr

 make

 make install

Some development packages are required to compile xserver-xorg-video-amd (eg: x11proto-xf86vidmode-dev, x11proto-xf86dga-dev, xserver-xorg-dev and some more).

We had some problems with it and we didn't found the perfect configuration yet, but you can test X server using the configuration below. Mouse is NOT working.

vim /media/OLPCRoot/etc/X11/xorg.conf

xorg.conf

Section "ServerLayout"

Identifier     "Default Layout"

Screen      0  "Screen0" 0 0

InputDevice    "Mouse0" "CorePointer"

InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Module"

Load  "extmod"

Load  "freetype"

Load  "evdev"

EndSection

Section "ServerFlags"

      Option      "AllowMouseOpenFail" "yes"

EndSection

Section "InputDevice"

Identifier  "Keyboard0"

Driver      "kbd"

Option     "XkbModel" "pc105"

Option     "XkbLayout" "us"

EndSection

Section "InputDevice"

Identifier  "Mouse0"

Driver      "mouse"

Option     "Protocol" "IMPS/2"

Option     "Device" "/dev/input/mice"

Option      "ZAxisMapping" "4 5"

Option     "Emulate3Buttons" "yes"

EndSection

Section "InputDevice"

       Identifier      "Mouse"

Driver          "evdev"

Option          "evBits"        "+1-2"

Option          "keyBits"       "~272-287"

Option          "relBits"       "~0-2 ~6 ~8"

Option          "Pass"          "3"

EndSection

# since we don't have DDC implemented on the VGA port, we set

# the defaults resolution and vertical refresh to be as generic

# as possible, setup for a flat panel and/or projector.  

# Feel free to customize to meet your needs.

Section "Monitor"

Identifier   "Monitor0"

VendorName   "Generic"

Option     "dpms"

HorizSync   30-67

VertRefresh 60

EndSection

Section "Device"

Identifier  "Geode"

#Driver      "amd"

Driver   "fbdev"

VendorName  "Advanced Micro Devices, Inc."

BoardName   "AMD Geode GX/LX"

# disable VGA BIOS execution for the OLPC board

Option     "NoVGA"  "true"

# Specify the frame buffer size

Option     "FBSize" "8388608"

Option     "AccelMethod" "EXA"

Option     "NoCompression" "true"

EndSection

Section "Screen"

Identifier "Screen0"

Device     "Geode"

Monitor    "Monitor0"

DefaultDepth 16

SubSection "Display"

 Depth 16

 Modes "1024x768"

EndSubSection

SubSection "Display"

 Depth 24

 FbBpp 32

 Modes "1024x768"

EndSubSection

EndSection

Udev is necessary for mouse support. AMD driver is not working yet.

apt-get install udev 

Testing

Boot up debian on olpc and test your x server:

 startx

Debian on B4 and posterior

Pictures

Debian OLPC pictures

Pictures slideshow

Feel free !!!!!

Comments and helps are welcome !!!!

References:

Testing xorg.conf gave by Jim.

Xorg amd

Created by:

Francisco Alecrim <francisco.alecrim@indt.org.br>

Anderson Briglia <anderson.briglia@indt.org.br>

Thanks to:

James Cameron <james.cameron@hp.com>

Rafael Ortiz

howto debian olpc (last edited 2008-09-14 11:06:51 by FranklinPiat)