Sysup is a very simple tool that is supposed to run at boot time from initrd/initramfs of Linux based Embedded system.

osi-certifiedIt’s objective is to locate, by reading a text file, called the versions files, the correct version of the embedded device software to load. The versions are each a (possibly compressed) file system images which sysup will loop back mount and then pivot_root() into cleanly. Before mounting however, sysup will verify the image integrity (using MD5 signature) and will allow a fall back to the previous running version in case of error.

The idea behind sysup is that it makes the problem of atomic software upgrade easy: to upgrade to a new version from a running system, download the latest version and write it to the file system on the flash, get an MD5 of the new version file downloaded and create a copy of the versions file mentioned above, modify it to point to the new version (and list the current running version as the previous one) and then use the POSIX rename(2) call to atomically switch the files, then boot the machine.

This is the very first public version and work in progress with many additional features to come:

  • Complete C implementation: migrate all code from the bash script to C executable.
  • Add “safe boot detection” to detect problems that occur in a good MD5 signature image using a boot journal.
  • Utility to update versions – perhaps integrate into cfgsh?
  • documentation
  • Profit! 🙂

The latest development versions be found here: sysup-0.1.tar.bz2.