Skip to content

Commit

Permalink
update tips for downgrading firmware (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
ab7pa committed Apr 17, 2023
1 parent 470ff27 commit 2cefb39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
Binary file modified arednHow-toGuides/_images/downgrade.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 11 additions & 12 deletions arednHow-toGuides/firmware_tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tips for Uploading Firmware
Uploading firmware to an AREDN |trade| node is usually a straightforward process. Follow the procedures documented in the **Downloading AREDN Firmware** section to ensure you have the correct firmware version from the AREDN |trade| website to install on your node. If you experience issues uploading firmware, the following tips may be helpful.

Error message when uploading firmware
If you see an error message displayed when uploading new firmware to your node, verify that you are loading the correct file by referring to the `AREDN download page <http://downloads.arednmesh.org/firmware/html/stable.html>`_, then you can safely ignore the warning. The file naming standard recently changed from a non-standard naming convention to the standard naming convention used by OpenWRT.
If you see an error message displayed when uploading new firmware to your node, verify that you are loading the correct file by referring to the `AREDN Firmware Selector (AFS) <http://downloads.arednmesh.org/afs/www/>`_, then you can safely ignore the warning. The file naming standard recently changed from a non-standard naming convention to the standard naming convention used by OpenWRT.

Web browser cache and sessions
One common issue can occur when installing firmware using a web browser. Your computer's browser cache stores data for the URLs that have been visited, but IP addresses and other parameters may change during the install process. It is possible for the cache to contain information that doesn’t match the latest settings for the URL, so the browser may block the connection setup and display an ERR_CONNECTION_RESET message. Clearing your computer's web browser cache will allow the latest URL settings to be registered so you can continue with the install process.
Expand Down Expand Up @@ -35,14 +35,13 @@ In rare cases the upgrade process can fail due to lack of node resources, but su
Try to Load Local Firmware
The **Load Local Firmware** option is described in the *Configuration Deep Dive > Administration* documentation. This involves using a file copy utility on your computer to copy the firmware file to a specific directory and filename on your node. Once the new firmware file is available on the node, you can click the *Load Local Firmware* button to start the install process.

Release node resources
Before starting the firmware upgrade on low memory devices, it may be necessary to stop, disable, or uninstall extra packages such as MeshChat, SNMP, and IperfSpeed. The goal of this step is to keep those processes from using RAM memory and to free as much RAM as possible before the upgrade. Rebooting the node before beginning the upgrade will ensure that RAM utilization is at a minimum.

You may also want to stop node programs or services that are not needed during the upgrade. For example, you can telnet or ssh to the node and type the command ``wifi down`` to free the memory used by this driver.

Tips for legacy nodes with low memory (32mb)
Legacy equipment with only 32mb of memory may require more effort to upgrade. Be sure not to use these types of devices at sites which are difficult to access.

- Before starting the firmware upgrade on low memory devices, it may be necessary to stop, disable, or uninstall extra packages such as MeshChat, SNMP, and IperfSpeed. The goal of this step is to keep those processes from using RAM memory and to free as much RAM as possible before the upgrade. Rebooting the node before beginning the upgrade will ensure that RAM utilization is at a minimum.

- You may also want to stop node programs or services that are not needed during the upgrade. For example, you can telnet or ssh to the node and type the command ``wifi down`` to free the memory used by this driver.

- You may need to try the sysupgrade procedure several times before it succeeds. Be patient and keep trying.

- Get everything ready to do the upgrade, then do a fresh reboot of the node and immediately start the sysupgrade process before the node has time to initialize services which use memory.
Expand All @@ -60,26 +59,26 @@ Tips for legacy nodes with low memory (32mb)

To transfer the image from a Windows computer you can use a *Secure Copy* program such as `WinSCP <https://winscp.net>`_. Then use a terminal program such as `PuTTY <https://www.chiark.greenend.org.uk/~sgtatham/putty/>`_ to connect to the node via ssh or telnet in order to run the sysupgrade command shown as the last line above.

- As a last resort, use the TFTP procedure to load the *factory.bin* firmware image to the node. This procedure is described in the *First Install* sections of **Installing AREDN Firmware**.
- As a last resort, use the First Install procedure to load the *factory.bin* firmware image to the node. This procedure is described in the *First Install* sections of **Installing AREDN Firmware**.

Tips for Downgrading Firmware
-----------------------------

Downgrading AREDN |trade| firmware is typically accomplished using the same procedure as for uploading firmware to your node. You are simply uploading a previous version of the firmware rather than the latest version.

However, there is a difference if you are downgrading the firmware on a node which previously used a different target architecture. As explained in the **Downloading AREDN Firmware** section, the legacy ``ar71xx`` target has been retired and replaced by the ``ath79`` target. For example, you may have a node that was previously running an ``ar71xx`` firmware version but you installed the latest Nightly Build which upgraded it to an ``ath79`` firmware target. In this case you will need to do a fresh "first install" using the legacy architecture's firmware.
However, there is a difference if you are downgrading the firmware on a node which previously used a different target architecture. As explained in the **Downloading AREDN Firmware** section, the legacy ``ar71xx`` target has been retired and replaced by the ``ath79`` target. For example, you may have a node that was previously running an ``ar71xx`` firmware version but you installed the latest Stable Release or Nightly Build which upgraded it to an ``ath79`` firmware target. In this case you will need to do a fresh First Install using the legacy architecture's firmware.

1. Use the `AREDN Download website <http://downloads.arednmesh.org/firmware/html/stable.html>`_ to download the previous release's install files. For example, if your Ubiquiti Rocket M5 XW is currently running the Nightly Build which uses ``ath79``, then download the *factory* file for the a previous Stable Release (which uses ``ar71xx``) as shown below.
1. Use the `AREDN Firmware Selector <http://downloads.arednmesh.org/afs/www/>`_ to download the previous release's install files. For example, if your Ubiquiti Rocket M5 XW is currently running version ``3.23.4.0``, then download the files required for a First Install from release ``3.22.12.0`` which used *ar71xx* (as shown below).

.. image:: _images/downgrade.png
:alt: Downgrading across target architectures
:align: center

2. Review the **Installing AREDN Firmware** documentation and follow the steps for the *First Install* procedure that is appropriate for your node model.

- For Ubiquiti and TP-LINK models you will be uploading the *factory* firmware.
- For Mikrotik models you will boot using the *vmlinux-initramfs.elf* file (which you rename to *rb.elf*) and then immediately apply the *sysupgrade.bin* firmware image.
- For GL.iNet models you will use the `recovery procedure <https://docs.gl-inet.com/en/3/tutorials/debrick/>`_ to upload the *sysupgrade.bin* firmware image.
- For Ubiquiti and TP-LINK models you will be uploading the *FACTORY* firmware.
- For Mikrotik models you will boot using the *KERNEL* file (which you rename to *rb.elf*) and then immediately apply the *SYSUPGRADE* firmware image.
- For GL.iNet models you will use the `recovery procedure <https://docs.gl-inet.com/en/3/tutorials/debrick/>`_ to upload the *SYSUPGRADE* firmware image.

Another possible way to downgrade firmware between architectures is to enable **Dangerous Upgrade** under the *Advanced Configuration* settings. Setting this to *ON* will disable the normal firmware compatibility checks that are done automatically during the firmware install process. This should allow your node to install a firmware image that uses a legacy architecture.

Expand Down

0 comments on commit 2cefb39

Please sign in to comment.