Firmware zip file handling

From OLPC
Revision as of 20:28, 1 October 2012 by DanielDrake (talk | contribs) (Created page with '{{draft}} The firmware and the security system deals with zip archives found in the <tt>/boot</tt> directory of the boot partition. These zip files are: *…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Pencil.png NOTE: The contents of this page are not set in stone, and are subject to change!

This page is a draft in active flux ...
Please leave suggestions on the talk page.

Pencil.png

The firmware and the security system deals with zip archives found in the /boot directory of the boot partition. These zip files are:

  • bootfw: an on-disk copy of the OpenFirmware image, used for automatic firmware upgrades
  • runos: an executable image treated as the operating system kernel for normal boots of the system
  • runrd: a ramdisk image loaded into memory when runos is booted
  • actos: an executable image treated as theoperating system kernel for when the system is booted in activation mode
  • actrd: a ramdisk image loaded into memory when actos is booted
  • fs: contains checksums for an accompanying filesystem image

Zip file contents

Note that executable images above can be simple forth scripts, and the ramdisks are optional (if not needed to boot the OS).

The content (as described above) must be stored in the zip file in a file called data.img. If dealing with signed content, the signature is stored in a file called data.sig in the firmware signature format with hashname "sha256".

All content of the zip file must be uncompressed; OpenFirmware cannot access compressed files inside the zip file.

Zip file naming

Each zip file is named according to its base name, followed by a laptop model suffix, followed by the extension .zip.

The laptop model suffixes are:

  • 0: XO-1
  • 1: XO-1.5
  • 2: XO-1.75
  • 3: XO-3
  • 4: XO-4

For example:

  • bootfw4.zip - Firmware for the XO-4
  • fs2.zip - Filesystem image checksums for an XO-1.75 image

In each situation where OFW seeks one of the above zip files, it will first try the naming scheme detailed above. If such a file is not found, it will fall back on the same filename but without the model suffix (e.g. actos.zip, fs.zip).

Old, released versions of XO-1 and XO-1.5 firmwares do not support the naming scheme that includes the model suffix, so when working with the XO-1 and XO-1.5, you will need to ship files without the model suffix (or perhaps back-compat symlinks) to retain full compatibility with all released versions.

Another reason for the firmware continuing to fall-back on "unversioned" zip file names is for convenience; as executable images can be machine-independent (e.g. the Collection stick is a machine-independent signed forth script), it is useful to be able to share a single file between multiple laptop models.