Image builder: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (key -> stick)
No edit summary
Line 3: Line 3:
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
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]]. Then, download the osNNN.img and fs.zip files (usually obtained from http://download.laptop.org/xo-1/os/official/) for the OS release that you want to base your image on, and place those files in the root directory of the customization stick.
Given an unpacked customization stick in /media/custom (say), you invoke the image builder with:

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


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

Revision as of 12:09, 4 December 2008

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. Then, download the osNNN.img and fs.zip files (usually obtained from http://download.laptop.org/xo-1/os/official/) for the OS release that you want to base your image on, and place those files in the root directory of the customization stick.

Assuming the combined customization stick + OS 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.