Firmware Upgrade

A WeOS unit holds two types of firmware:

  • System firmware: The system firmware holds the operating system, which is what we usually refers to when we say WeOS. For robustness purposes, a WeOS unit typically holds two separate system firmware images.

    • Primary firmware image: The primary firmware image (or primary image) contains the system firmware loaded by default by the bootloader.
    • Backup firmware image: The backup firmware image (also known as backup image or secondary image) contains the system firmware image loaded in case an error is encountered while loading the primary image.
  • Bootloader: The bootloader firmware (or simply ”bootloader”) is the basic firmware run to bootstrap the system. The bootloader will in turn load the system firmware (trying the primary image first).

It is possible to upgrade both the system firmware (primary and secondary image) and the bootloader firmware. There is no general guarantee that an older system firmware can be loaded into the switch, i.e., downgrade is not generally guaranteed to work. However, if the firmware is downgraded it is recommended to reboot the switch once the old firmware has been installed. When the switch comes up with the old firmware, copy the factory default configuration to the running configuration.

Upgrading firmware and bootloader

WeOS firmware and bootloader can be downloaded from www.westermo.com. The WeOS firmware and bootloader can be upgraded using a common ”pkg” file or using individual firmware and bootloader files per WeOS product.

Commands

upgrade [force] [no-reboot] <all|pri|sec|boot> <[URI://][ADDRESS[:PORT]/]FILE | ADDRESS FILE]

Starts an upgrade process based on the parameters given.

force
A keyword can be used to bypass the image signature check and certain version checks. It also makes it possible to upgrade individual images not using ‘all’ in this release. This should only be used as a last resort and MAY BRICK THE DEVICE if the wrong imaged is used. Please verify carefully that you are using the correct image for the device being upgraded.
no-reboot
If the running image has been RAM-loaded (usually only done in a lab environment) and the no-reboot option is specified, the machine will not reboot. This is however negated when using the “all” target, where the machine does everything and forcibly reboots on the last image.
pri
Setting the target to be the primary (main) flash area.
sec
Setting the target to be the secondary (backup) flash area.
boot
Setting the target to be the bootloader firmware flash area.
all
The “all” target is only available for packages and is used in specific cases where many actions must be done at once. Not all upgrades or targets support the all keyword.
URI
WeOS VFS URIs can be used to retrieve the firmware file.
ADDRESS
IP-address of the server from which the image/package should be retrieved.
FILE
The name of the image or package (pkg) to be used during upgrade.

Firmware Upgrade using FTP or TFTP

WeOS firmware upgrade can fetch the upgrade image from an external FTP or TFTP server. The protocol variant can be explicitly specified through the use of a URI, for example (from WeOS CLI):

example:/#> upgrade sec tftp://192.168.122.1/firmware.pkg

Or it can be determined automatically. In this case WeOS first tries FTP and if it fails to connect, falls back to TFTP:

example:/#> upgrade sec 192.168.122.1 firmware.pkg

If username and password are not supplied for an FTP connection, WeOS will use anonymous FTP. Username and password can be supplied using the syntax:

example:/#> upgrade sec ftp://username:password@host/path/to/firmware.pkg

Firmware upgrade can also be initiated from the WeOS Web interface. In that case selecting the “FTP/TFTP” option will make WeOS try anonymous FTP first, then if that fails, TFTP.

Note: The WeOS CLI upgrade command also accepts URI prefixes http:// and usb://, but not scp://.

Firmware Upgrade using target ‘all’

In order to move all firmwares in a consistent way, the target ‘all’ can be used. It will upgrade bootloader and system images in a determined sequence. As usual, power must not be interrupted.

example:/#> upgrade all 192.168.122.1 firmware.pkg