Differences between revisions 21 and 22
Revision 21 as of 2009-03-05 07:29:04
Size: 10101
Editor: JamesCameron
Comment:
Revision 22 as of 2009-03-05 07:41:53
Size: 10194
Editor: JamesCameron
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= See Also =

[wiki:DebianEdu/OLPC/Installation]

(Some duplication needs resolving).

See Also

[wiki:DebianEdu/OLPC/Installation]

(Some duplication needs resolving).

DebXO

These are pre-built operating system images for using Debian on the OLPC XO-1 laptop.

The images are available in two filesystem types; jffs2 or ext3. jffs2 is for installation onto the NAND flash using the Open Firmware flash writer, and the USB disk is only needed once. ext3 is for booting from a USB flash disk, where the disk must remain in during operation, and the NAND flash left unchanged. Use the ext3 image to try it out, and use the jffs2 image if you decide to delete what you have in the NAND flash.

There are many flavours; awesome, base, gnome, kde, lxde, sugar, and xfce.

The images can be downloaded from:

http://lunge.mit.edu/~dilinger/debxo-latest/images/

The latest release announcement is on the devel@lists.laptop.org mailing list: http://lists.laptop.org/pipermail/devel/2009-February/023270.html

xodist

xodist is software that produces DebXO images from a Debian archive or mirror. It can be used with a caching proxy server.

git clone git://lunge.mit.edu/git/xodist

Open Hardware Manager

The Open Hardware Manager provides suspend on power button press, suspend on lid close, display dimming on idle, and suspend on extended idle.

It is the component that ships on the OLPC XO builds used by school deployments in order to maximise battery performance.

Resuming from suspend occurs within about one second. Extended idle suspend leaves the screen contents visible, which is useful for reading. Keyboard input is not lost.

Experimental ohmd packages for Debian may be available from: http://dev.laptop.org/~quozl/debian/

The initial release announcement of packages for Debian systems: http://lists.laptop.org/pipermail/devel/2009-March/023695.html

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 }}}

  • Copy OLPC image to your pen drive(1Gb).

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

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

 sync
  • After it, you can put the pen drive in your OLPC and test it booting by the pen drive. :)

We did a backup of OLPC filesystem.

 mount /dev/sdb1 /media/OLPCRoot

 cd /media/OLPCRoot

 tar -cvzpf olpc_filesystem_backup.tar.gz *
  • And copied and extracted it on our home.

 mkdir ~/olpc_root ; cd ~/olpc_root

 tar -xvzpf olpc_filesystem_backup.tar.gz
  • Erase the old olpc filesystem and create a simple debian filesystem. BE CAREFUL !!!!!

 cd /media/OLPCRoot

 rm -rf *

 debootstrap etch /media/OLPCRoot http://ftp.br.debian.org/debian/
  • Now you have a simple debian filesystem in our pen drive. Let's modify!!!!

Reference:

[http://wiki.laptop.org/go/OS_images_for_USB_disks OS_images_for_USB_disks]

File system

New kernel

  • Download olpc kernel source using git(9418/tcp) :

 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
  • Install modules:

 make modules_install INSTALL_MOD_PATH=/media/OLPCRoot
  • Copy all /boot files from the OLPC filesystem to debian /boot.

 cp -rv ~/olpc_root/boot/* /media/OLPCRoot/boot/.
  • Install the new kernel:

 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:

[http://wiki.laptop.org/go/Kernel_Building 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 [http://www.debian.org/devel/wnpp/requested 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

Comments and helps are welcome !!!!

References: