So this is my routine for testing all the recent puppies (Lupu, quirky, wary etc). Having Step 1 done takes ~10min to make the XOpup
Step 1
You need to compile a kernel that will boot the XO-1 eg an OLPC kernel and is patched with a layered file system eg Aufs2. In puppy you will need the devx.sfs of your pupplet. In other distros, the usual development/compiling tools and Git.
You will also need 3GB of space or more and a relatively fast computer (NOT the XO-1) if you do not want to spend your time waiting.
So
Code: Select all
git clone git://dev.laptop.org/olpc-2.6
cd olpc-2.6
git checkout origin/olpc-2.6.31
cd ..
git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git aufs2-standalone.git
cd aufs2-standalone.git
git checkout origin/aufs2-31
Patch your source with the Aufs patch and configure your kernel (you can use the attached DOTconfig file as configuration base - Edit: see comment on next post).
Make your kernel.
"make install" will place your vmlinuz and system.map in /boot and modules in /lib/modules/2.6.31.6 folder
"make xo_1-kernel-rpm" (in a Fedora machine) will place the kernel rpm in the olpc/ folder. You can either install on the Fedora-running XO-1 by "rpm -ivvh" and get your vmlinuz and /lib/modules/kernel_version or run "rpm2cpio kernel_version.rpm | cpio -icd" to get the rpm contents and place them accordingly.
Now you have a kernel that will boot Puppy on the XO-1 laptop
Attention: make sure that the /lib/modules/2.6.31.x/modules.dep file has the complete paths. eg the ones that start with "/lib/modules/..." and NOT with "kernel/....". If you build your kernel in puppy is the default, but in Fedora you must edit the file manually. I just do a 'find/replace all' of "kernel/" with "/lib/modules/<my_kernel_name>/kernel/"
Warning: Some newer version of gcc will not compile a working XO-1 kernel. Kernel building has been tested in F11 and Puppy 4.3.1. Ubuntu Intrepid or Jaunty may also work but not Lucid.
EDIT: You could download a ready olpc-puppy kernel from here so you are done with "step 1"
Step 2
Now you need to download the ISO of your XOpup-base and modify the initrd.gz to boot your XOpup.
I usually copy the puppy inirtd.gz and the new XO-kernel (eg from /lib/modules/2.6.31.x) in my working folder but can be anywhere.
So (as sudo if you are not in Puppy)
Code: Select all
mkdir initramfs
cd initramfs
gunzip -c /<path_to_puppy_initrd>/initrd.gz | cpio -i
rm -rf lib/modules/*
cp -aR /<path_to_your_xo_kernel>/2.6.31.x lib/molules/
find . -print | cpio -H newc -o | gzip -9 >../initrd.gz
cd..
Step 3
Modifying the puppy sfs file to decrease its size and thus RAM requirement. It saves you ~30MB of RAM and improves speed. Here we asume the original name is "puppy-123.sfs" but usually relates to the variant and version eg "lupu-500.sfs" for Ludic Puppy.
If you are not using Puppy you may need to install squashfs-tools for this step
So (still as sudo if not in puppy)
Code: Select all
mkdir /mnt/sfs
mkdir puppydata
mount -o loop /path_to_puppy_sfs/puppy-123.sfs /mnt/sfs
cp -aR /mnt/sfs/* puppydata/
rm -rf puppydata/lib/modules/*
rm -rf puppydata/lib/firmware/*
rsync --archive --checksum rsync://updates.laptop.org/build-802/root/lib/firmware/usb8388.bin puppydata/lib/firmware/
repack your sfs
Code: Select all
mksquashfs puppydata/* puppy-123.sfs
Step 4.
Now you are ready to make your USB stick/SDcard to boot your XO-1 with.
Copy the modified "initrd.gz" and "puppy-123.sfs" files and the "vmlinuz" corresponding to your xo-kernel build, at the root of an ext2/3 formatted USB stick or SD card.
Also at the root of the stick/card make the "/boot" folder and in put the "olpc.fth" file.
The content of the /boot/olpc.fth file should look like that
Code: Select all
\ OLPC boot script
unfreeze visible setup-smbios
" u:\initrd.gz" to ramdisk
" setenv boot-file console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22 pmedia=usbhd" to boot-file
boot u:\vmlinuz
For an SDcard use
Code: Select all
\ OLPC boot script
unfreeze visible setup-smbios
" sd:\initrd.gz" to ramdisk
" setenv boot-file console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22 pmedia=usbhd" to boot-file
boot sd:\vmlinuz
Transfer the USB stick/SDcard to your XO and power up. You should get the familiar puppy dialogs (or your desktop if you use lupu)
In newer puppies you may need to add "modprobe mousedev" in "/etc/rc.d/rc.local" and/or edit the mouse option of /etc/X11/xorg.conf to "/dev/input/mice", to have a proper mouse behavior.
Since most pups do not have .../X11/xkb/compat/olpc and .../X11/xkb/symbols/olpc, you also need some additions for the rocker keys and game keys.
In the /etc/rc.d/rc.local add
Code: Select all
setkeycodes 65 103 # up
setkeycodes 66 108 # down
setkeycodes 67 105 # left
setkeycodes 68 106 # right
setkeycodes 69 101 # rotation button
Code: Select all
keycode 229 = KP_Prior
keycode 231 = KP_Home
keycode 232 = KP_End
keycode 230 = KP_Next
If you want to go all the way you could also get powerd and kbdshim from the OLPC git repository and compile them for puppy to get power management and brightness and sound keys, screen rotation etc! But even without these should be a pretty usable XOpup .
Sound is the only major issue remaining...