RootstockImprovements

Rationale

Rootstock is a script that allows users to create rootfs tarballs for armel systems that are not supported by default in Ubuntu. It uses qemu-arm-static for the initial debootstrap process and wraps around a fully running qemu machine for the further package installations.

Scope

The scope of this Spec is to enhance the existing script with a GUI way to build such rootfses, to build directly to pre-partitioned target devices, add more flexibility by adding a plugin system as well as giving the user an option to inject locally store .deb packages into the target system.

Resources

Implementation

First of all rootstock will get a UI written in python/glade/gtkbuilder to set the following options in a graphical way:

Build Options in the UI:

  • mirror and extra-mirror (taking the typical apt protocols like http://, file:// etc) (text input boxes)

  • dist (jaunty, karmic, lucid are options) (pulldown menu)
  • serial (to point to a serial device to be used) (text input box)
  • "use swap" and "swapsize" (for enabling the use of swapspace during the build process) (checkbox and spinbutton)
  • target format (either tgz, qemu image or direct. the direct option requires to select a preformatted target device to directly build to) (pulldown menu plus device selector for the direct option)
  • an additional file selector to use a kernel .deb for boards that are not supported by ubuntu but for which .deb packages of the kernel exist (i.e. beagleboard)

During the build process tasksel will be fired up to make the selection of the software to be installed in the target system.

By default oem-config will be installed in all images and be preseeded to run on first boot.

That way the formerly required username, password, language, keyboard and location options are covered and will be set on first boot.

A "use local caching" option will be added to script and UI, that way the user only needs to download packages once if multiple builds of the same rootfs are planned.

Plugins

A plugin dir will be read by default at the end of the build process. This will enable OEMs to add common script based modifications to the target fs.

Plugins are simple shell scripts that are sourced by rootstock from /usr/share/rootstock/plugins after the rootfs was built.

Plugin naming should carry a sequence number and a descriptive name, i.e.: 10-modify-gdm-userlist. A plugin script does not need to carry a #!/bin/sh header and should not have the exit statement in it. OEMs can use simple shell commands to modify the resulting rootfs.

Example plugin content going along with the above naming example could be:

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/gdm/simple-greeter/disable_user_list true

rootstock will just execute the gconftool-2 call as root after rootfs building in this case. If in later releases demand comes up to inject such scripts before the rootfs build is done, a keyword mechanism "first-stage/second-stage" to execute plugin scripts at certain points of the build process can be designed for lucid+1.

Documantation

The initial UI should be self explaining, for the plugin system a README.plugins will be created and put into /usr/share/doc/rootstock. In later releases proper integration with the gnome help system will be added.

Specs/Mobile/Lucid/ARM/RootstockImprovements (last edited 2009-11-30 14:41:09 by p5098ed03)