Updating Firmware - themactep/thingino-firmware GitHub Wiki

Updating Thingino Firmware

How Often Should I Update?

Unlike most software, we don't recommend arbitrary upgrades. If your firmware is working great for you and you're not missing any of the new features, upgrading your firmware is generally unnecessary. Our nightly release system creates nightly builds, which contain new fixes and features but also new bugs. If you're contributing to the firmware as a developer, by all means we encourage you to follow our nightly builds, but for most folks this is unnecessary.

If you are experiencing problems, or if we've released a new feature you'd like to use, that's when it's time to update! Chances are high that whatever issue you've found has already been solved, and bug reports from old versions are likely to start with instructions to test on the current build. Or, if you're a contributor who is helping to develop the firmware, staying current is important on the device you're developing with!

About Partial Upgrades

Partial upgrades (updating only the kernel and userland while preserving the bootloader and environment) have proven unreliable in practice and are now disabled. Only full upgrades are supported.

Upgrade From SD Card (where supported)

  • Download the latest firmware image for your camera from https://thingino.com/
  • Place the firmware file on a blank SD card
  • Rename the file to autoupdate-full.bin
  • Insert the card into the camera, and reboot

This performs a full upgrade — the bootloader is replaced and the U-Boot environment is reset, leaving the camera in a pristine state.

Upgrade From the Camera Itself

When the camera is installed at its final location, the firmware can be upgraded to a newer version directly from within the camera's Linux system. Log in via ssh and use the sysupgrade script to install a newer version of the firmware.

sysupgrade

To use the sysupgrade command, you can run it with one of the following options:

sysupgrade [-x] [-b] [-d <date>] [-f | <file> | <URL>]

Options

  • -f: Perform a full upgrade from GitHub. This upgrades the entire system, including the bootloader. It resets the U-Boot environment, which includes settings like your Wi-Fi SSID, password, and root password.
  • -b: Upgrade only the bootloader.
  • -d <date>: Install the release from the specified date (YYYY-MM-DD). If omitted, the latest available release is used.
  • <filename>: Perform a full upgrade using a local file. Useful if you have already downloaded the firmware binary and want to upgrade without fetching it from a remote source.
  • <URL>: Perform a full upgrade using a URL. This allows you to specify a direct URL to the firmware binary for the upgrade.
  • -x: Skip the automatic self-update of the sysupgrade script before performing the system upgrade.
  • -h: Display help information for the sysupgrade command.

How It Works

The sysupgrade script automatically downloads the latest precompiled build for your specific device from the Thingino GitHub repository.

By default, sysupgrade first checks for a newer version of itself on the stable branch and updates automatically. Use -x to skip this self-update.

If /tmp does not have enough free space to hold the firmware image, the script automatically falls back to downloading to the SD card (if one is mounted and writable).

Important

After a full upgrade is complete, the system may take up to 60 seconds to complete provisioning and be ready for use. Be patient.

Example Commands

  1. Full Upgrade (recommended):

    sysupgrade -f

    This command will fetch the latest full upgrade from the GitHub repository and apply it, including the bootloader. The U-Boot environment will be reset.

  2. Upgrade from a Local File:

    sysupgrade /path/to/firmware.bin

    Replace /path/to/firmware.bin with the actual path to your firmware file. This command will perform a full upgrade using the specified file.

  3. Upgrade from a URL:

    sysupgrade https://example.com/firmware.bin

    Replace https://example.com/firmware.bin with the actual URL of the firmware binary. This command will download the firmware from the URL and perform a full upgrade.

  4. Upgrade to a Specific Release Date:

    sysupgrade -f -d 2026-07-15

    This command will install the firmware release from the specified date.

  5. Upgrade Bootloader Only:

    sysupgrade -b

Important

If you are trying to upgrade Thingino from a really old build, you might need to update the upgrading script first. Run the following command on the camera:

curl -sL -o /sbin/sysupgrade https://raw.githubusercontent.com/themactep/thingino-firmware/refs/heads/stable/package/thingino-sysupgrade/files/sysupgrade && chmod +x /sbin/sysupgrade

then run sysupgrade -f as usual.

Important

If sysupgrade fails with a message about upgrade partitions, you need to enable updates first:

fw_setenv enable_updates true

Then reboot the camera and run sysupgrade again. This only needs to be done once.

From the Development Environment

During development, you may need to update or upgrade your firmware frequently. To make this process easier, two commands have been added to the Thingino makefile: make update_ota and make upgrade_ota. Both commands require the IP address of the camera as the value of the IP= argument. Note that the camera should be online to use this method.

The usual routine to build and install the new firmware would be as follows:

make update_ota IP=192.168.1.10

or

make upgrade_ota IP=192.168.1.10

Switching between Branches

Thingino U-Boot will flash any firmware image placed on an SD card as autoupdate-full.bin, regardless of which branch it came from. This means you can freely switch between stable and master (or even revert to stock firmware) using the SD card method described above — the bootloader rewrites the flash chip without discriminating based on the image content.

Reverting from master to stable

Simply download the stable firmware image for your camera, rename it to autoupdate-full.bin, place it on an SD card, and reboot. The camera will flash the stable firmware, including its U-Boot, and reset to a pristine state.

⚠️ **GitHub.com Fallback** ⚠️