Customization stick development

From OLPC
Revision as of 12:35, 24 November 2009 by DanielDrake (talk | contribs) (New page: == Source code == For OLPC builds based on Fedora 9 and older (including OLPC OS 8.2.x), [http://dev.laptop.org/git/users/mstone/irfs-udebs/log/?h=unpack-bundles unpack-bundles branch of...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

to be documented later