Owut: OpenWrt Upgrade Tool

owut was released with a new --rev-code option in version 2024.07.31 (should be in the package feeds shortly). Normally, you let standard full-firmware upgrades keep your packages up-to-date, but in this case you may want to manually upgrade owut specifically (in order to be able to actually do that full-firmware upgrade).

$ opkg update
..
$ opkg info owut
Package: owut
Version: 2024.07.31~e329cb9b-r1 <<<--- if you see this (or later)
...
$ opkg upgrade owut  <<<--- then you can do this
...

Why do this?
An "incorrect" revision code (or if you prefer, version_code) is the root cause issue on a lot of failed upgrade attempts. The scare quotes are to emphasize that it's often the case that you don't really care what specific kernel build you are getting (sometimes you do!), as long as it's new enough to contain patches or new packages of interest.

The symptom is a build request that terminates early and shows the reason to be:

Progress   2 (  22s) -----------------------------
Status: 500
Detail: Error: Received incorrect version r27055-e6fec638d2 (requested r27065-ca4469045f)

This indicates that the ASU server and the ImageBuilder are out of sync. If that "received" version number is acceptable to you, then you can usually specify a --rev-code manually and things will work just fine ("fine" in this context means "a valid, self-consistent, working firmware with the version numbers as shown in the manifest").

Copy the received version code from the error message onto the command line thusly:

$ owut download --rev-code r27055-e6fec638d2
...
Build: Requesting version r27055-e6fec638d2 (kernel 6.6.43)

Requesting build ----------------------
Hash:   blahblah
Status: 202
Detail: queued - 0 ahead of you
...
Progress  17 ( 187s) -----------------------------
Status: 200
Detail: done

Build completed in 188 seconds.
  version_number = SNAPSHOT
  version_code   = r27055-e6fec638d2 (requested r27055-e6fec638d2)
...
$ vi /tmp/firmware-manifest.json
... check the package versions or whatever
... if acceptable:
$ owut install

Notes:

  • The --rev-code value you supply is checked for syntax, but it is impossible to check it for actual validity. Make sure you copy or type it correctly, a mismatch will result in another failed build attempt.
  • The value none as in owut upgrade --rev-code none is allowed, and it removes the version_code from the request altogether. This may (or may not!) get you through the build, it's a last ditch option, try using real rev codes first.
4 Likes