Image builder

From OLPC
Revision as of 12:13, 4 December 2008 by DanielDrake (talk | contribs)
Jump to navigation Jump to search

Source code is at: http://dev.laptop.org/git/users/cscott/image-builder

The image builder tool is very simple: it consists of a single python file named 'build.py', which you can download from http://dev.laptop.org/git?p=users/cscott/image-builder;a=blob_plain;f=build.py;hb=HEAD

First, prepare a collection of activity and content bundles in the style of a customization stick. Make sure you include an OS image on the customization stick, as explained in the optional step on the customization stick page (this is not optional for the image builder).

Assuming the customization stick (including OS image) is mounted or located at (say) /media/custom, you invoke the image builder with:

$ build.py -v -o per703-6 /media/custom

This will create peru703-6.img and other files needed to install the image with copy-nand. For more information:

$ build.py --help
Usage: build.py [options] [path-to-customization-stick]

Options:
  -h, --help            show this help message and exit
  -o FILE, --output=FILE
                        Name of custom image file to generate.
  -v                    Display verbose progress information.
  -q, --quiet           Don't output anything if successful.

You will need the following programs installed on your machine for build.py's use: tar, unzip, mkfs.jffs2, sumtool, crcimg. The mkfs.jffs2 and sumtool binaries are in the 'mtd-utils' package on Debian and Fedora; the crcimg tool is described here.

PLEASE BE SURE YOU ARE USING AN UP-TO-DATE mkfs.jffs2, since the resulting images are much more robust if they can be generated with hardlinks built-in. The image builder script will complain if you don't have an appropriate mkfs.jffs2; never ignore this warning for production images.

Contact cscott at laptop dot org for more information.