Firmware Upgrade Module?

I'm wondering if this package exists, preferably in Python (well, I *know* it exists, as I wrote it for a commercial project, and can't use it any more.  I'm hoping there's an Open Source version I can enhance for future use):

  • bundle a .tar.gz (signed, optionally encrypted) for delivery to embedded platforms
  • on platform, decrypt and unpack
  • (bonus) able to stream the content from network through the decrypt and unpack stages
  • verify unpacked archive (rules provided by the package)
  • fixate the unpacked archive into a directory structure that allows for N installed versions (use hard-linking to duplicate files to reduce disk usage)
  • run pre-install script from the archive
  • (atomically) swap the new firmware in as current
  • run post-install script from the archive
  • provide back-off/retry, revert mechanisms
  • provide for a "failsafe" firmware to which to revert on un-recoverable updates

The firmware would contain *everything* (as much as possible) to run on a base install, *including* the firmware upgrade software.  It should be installed in such a manner that any "hooks" (/etc/ directories, cron jobs, etc) are pointing "into" the "current" version of the archive (i.e. there should not be any changes to the system outside the directory structures in the firmware other than to point "current" to the new firmware).  Upgrade scripts would handle any external operations (creating new directories, running upgrade/downgrade scripts, etc).

Comments

  1. Michał

    Michał on 04/04/2012 2 p.m. #

    Me, too. Seriously.

  2. George erickson

    George erickson on 04/04/2012 5:30 p.m. #

    You've probably heard of this, but Fabric is an awesome python module that should be able to do most of what you want.

  3. Nick Coghlan

    Nick Coghlan on 04/04/2012 7:41 p.m. #

    Have you ever come across Ryan Kelly's Esky package?

    It's primarily designed for updating actual Python applications, but it seems to me that the updating and versioning mechanisms it provides should be adaptable to your arbitrary tarball use case (if nothing else, the tarball could likely be included as a data file in a Python module that's used purely as a delivery mechanism and a "what's installed?" version checker).

    http://pypi.python.org/pypi/esky/0.9.5

  4. Mike Fletcher

    Mike Fletcher on 04/04/2012 8:49 p.m. #

    Oh, I use Fabric extensively, but this is the *user* upgrading their "device" (hardware) with a bundle of firmware, not me reaching out and upgrading it for them.

  5. Mike Fletcher

    Mike Fletcher on 04/04/2012 8:50 p.m. #

    Nope, hadn't come across it. It's doing pretty much the same thing I want to do with a different focus, so it seems it might be worth playing. Thanks!

Comments are closed.

Pingbacks

Pingbacks are closed.