Construir OS

De Paraguay Educa

Tabla de contenidos

Setup

  1. Create a new directory e.g. "pyos" and a data subdirectory at "pyos/data"
  2. Under "pyos", download image builder script from http://wiki.laptop.org/go/Image_builder
  3. Install the prerequisites described at http://wiki.laptop.org/go/Image_builder
  4. Download os801.tar.bz2 and os801.tar.bz2.md5 to the same directory, retrieved from http://download.laptop.org/xo-1/os/candidate/801/jffs2/
  5. Download os801.img and fs.zip and put them in pyos/data/

Our customizations

Create something that looks like an OS + customization key:

mkdir -p data/bundles
touch data/customization-2

Put the activity and content bundles in the directory data/bundles/. These are specified on the Actividades y contenidos page.

From the "pyos" directory, checkout the Paraguayan OS customization scripts into a new "osmods" directory:

svn co svn://codigo.paraguayeduca.org/scripts/os-modifications osmods

Build

As root, run:

python build.py --make-tarball --custom-script="./osmods/pycustomize.sh" -l -v -o py801-1.img data

Where "py801-1" is the desired name of the output image. You have some useful output files:

  • py801-1.img, the main flashable image file containing your custom build
  • py801-1.crc, a file that allow you to use the "copy-nand" installation method on unsecured machines
  • py801-1-tree.tar.bz2, a tarball of the entire filesystem which is needed for automatic network-based updates, see Distribuir nueva OS
  • py801-1-tree.tar.bz2.md5, a checksum of the above
  • py801-1.contents, a description of the filesystem contents, needed for automatic network-based updates, see Distribuir nueva OS

Keep all of these files!

Sign

Check out the bios-crypto tree:

git clone git://dev.laptop.org/bios-crypto

Build the tools in the "build" directory:

cd bios-crypto/build
make cli

Put symlinks to the Paraguayan fs key in place with the name "fs":

ln -s /path/to/pys1.public fs.public
ln -s /path/to/pys1.private fs.private

Sign the OS build:

./make-fs.sh /path/to/py800-1.img fs.zip

The output file is "fs.zip" and contains the cryptographic signature of the image.

Output

  • For unsecure installation, py801-1.img and py801-1.crc on a USB stick is enough for "copy-nand"
  • For secure installation, use py801-1.img and fs.zip and the 4-gamekey flash method (same for nandblasting, but rename py801-1.img to fs.img)
  • For Distribuir nueva OS automatically over the network to existing XOs, you need py801-1-tree.tar.bz2, py801-1-tree.tar.bz2.md5 and py801-1.contents (see Distribuir nueva OS)
Herramientas personales