News
xserver-xorg-video-amd is available, add "http://q-funk.iki.fi/debian/ unstable main" to your sources.list, the package is in New per http://ftp-master.debian.org/new.html and has a bug logged http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430586
Kernels can be found at http://queued.mit.edu/~dilinger/builds-master/
Howto about Minimo(Mozilla Browser) with Debian/OLPC is available.
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
Download an olpc image. We're using olpc-redhat-stream-development-devel_ext3-tree,
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:
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:
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
Feel free !!!!!
Comments and helps are welcome !!!!
References:
Testing xorg.conf gave by Jim.
Created by:
Francisco Alecrim <francisco.alecrim@indt.org.br>
Anderson Briglia <anderson.briglia@indt.org.br>
Thanks to:
James Cameron <james.cameron@hp.com>