Customization stick development
 Source code
For OLPC builds based on Fedora 9 and older (including OLPC OS 8.2.x), unpack-bundles branch of the irfs-udebs git tree contains the source code for the customization stick. customization-1.zip and customization-2.zip are based on this.
For builds based on Fedora 11 and newer, the customization stick source code is the 30olpc-customization module in dracut-modules-olpc.
Actually, the customization stick runs independently from the installed system, so it would be OK to run a F11-based customization stick on an OLPC OS 8.2 system. The primary driver for development of a new customization stick based on dracut was to create a customization stick for XO-1.5.
 Building customization stick
These instructions detail how to build the Fedora 11 based customization stick. *These instructions must be carried out on an XO running a Fedora 11 based OS build* which matches the hardware revision that you're targetting (for example, if you want to build a customization stick for XO-1.5, then perform these instructions on an XO-1.5).
Upgrade the dracut-modules-olpc package. You need v0.3.0 or newer.
# yum upgrade dracut-modules-olpc
Use dracut to generate the customization stick initramfs:
# dracut --force -m 30olpc-customization initrd.img $(uname -r)
The output "initrd.img" initramfs is the core of the customization stick.
That's it! Now you need to sign your resultant initrd and kernel into zip files which you can distribute (see below).
If you want to test it on an unsecured laptop, put the kernel (from the running system) and newly-generated initramfs on a USB disk and create a corresponding olpc.fth. Here's an example for XO-1.5 that assumes the kernel and initramfs can be found at boot/vmlinuz and boot/initrd.img on the USB disk:
\ olpc.fth " console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22 video=viafb:viafb_mode=1200x900,viafb_bpp=24,viafb_active_dev=LCD,viafb_lcd_panel_id=23 no_console_suspend reboot=acpi selinux=0" to boot-file " last:\boot\vmlinuz" to boot-device " last:\boot\initrd.img" to ramdisk boot
 Signing process
Take the initrd.img file and turn it into an unsigned zip file for signing:
# mv initrd.img data.img # zip -n .img runrd.zip data.img
This is now in the format that can be taken to the OLPC signing laptop, and signed.
- In a new directory tree, create a subdirectory called "boot" and a subdirectory called "bundles"
- Copy the signed runrd.zip to boot/
- Copy boot/runrd.zip to boot/actrd.zip (creating a duplicate copy)
- Take a signed OLPC kernel, from the latest release (found at /boot/runos.zip) and place it at boot/runos.zip
- Copy boot/runos.zip to boot/actos.zip (creating a duplicate copy)
- Create an empty file named customization-VERSION, replacing VERSION with the version number of the customization stick you are making
Resultant directory tree:
boot/ [directory] boot/actos.zip [signed runos.zip kernel copied from OLPC OS release] boot/actrd.zip [signed customization stick initramfs] boot/runos.zip [signed runos.zip kernel copied from OLPC OS release] boot/runrd.zip [signed customization stick initramfs] bundles/ [directory, empty] customization-7 [empty file, indicating version 7 of customization stick]
Put the resultant tree in a zip and publish it.