Standard Flashing Instructions

The LEDE Team has designed the firmware to make the installation (“flashing”) process robust and reliable. You may find installation shortcuts elsewhere here or the Internet, but this procedure, followed carefully works every time.

To get LEDE running, first use the steps below to download and install the LEDE firmware onto your router, then use the Quick Start Guide to complete the configuration and get on the air.

To begin the installation process, you need to do these things:

  1. Find the Device Techdata page for your router/device. To do this, go to the Table of Hardware: Firmware downloads (ToH) page and search for your vendor/model. There is a column for Device Techdata. Open the link “View/edit data”. Bookmark that page - it has lots of good information about your router. If you don't find your device in the ToH, please ask on the Installing and Using LEDE category of the forum.
    • Note: The Device Techdata page will have two links: Firmware LEDE Install URL and Firmware LEDE Upgrade URL. The first is for a “factory installation”, the second for a “sysupgrade installation”.
    • Note: If you don't find the information you need in the ToH or Device Pages/Techdata pages, see Alternative ways to find LEDE firmware images.
    • Note: If you have accidently browsed the generic LEDE download folders to locate your device, you might have seen some more download files matching your device - ignore those files, you only want the sysupgrade installation file or factory installation file for the process described below.
  2. Connect directly to the device via an Ethernet cable. Avoid the Wi-Fi (wireless) connection if you can (not all devices have ethernet ports so it's not always possible), because it is less reliable and may corrupt the firmware image you transfer.
    This is an issue only for first LEDE installation when you are installing on stock firmware, as sysyupgrade through Luci offers a SHA256sum of the file so you can check that the file was transferred correctly and try again if it was corrupted (if you are doing sysupgrade with command-line you can check yourself the SHA256sum using the Linux instructions below).
  3. Determine what firmware your device is currently running. Open the web interface for your device and log into it. Follow one of these steps:
    • If your device is running the firmware it came with (often called “stock”, “factory”, or “vendor” firmware)
    • If your device is already running LEDE (or OpenWrt)
    • If you're not sure what you have or you think some steps in this tutorial are not clear, please ask on the Installing and Using LEDE category of the forum. Be sure to include the brand, model, and version of your router and other information about the device.

Some devices lack a factory or sysupgrade image. They usually require a special (and usually a bit complex) installation procedure that is very device-specific. To learn know how to install LEDE in them you should read their device page in the OpenWRT wiki (eventually that info will be migrated here).

This step is to verify the downloaded firmware binary against a reference checksum to avoid download errors.

Obtaining the reference checksum from the download page is currently a little inconvenient, as the reference checksums of the firmware binaries are currently not contained on the LEDE device tech data pages. To get the reference checksum, recall the URL path of firmware binary you just downloaded, e.g.
if your firmware download-URL was https://downloads.lede-project.org/releases/version/targets/chipset/modell/lede-something-something-something-something-something.bin
then open the web page https://downloads.lede-project.org/releases/version/targets/chipset/modell/
There you will find a list of firmware images, one of it being the file you just downloaded. Now note the additional checksum string on the right side of the download link (in the table column “sha256sum”).
We will now calculate a checksum of the downloaded file and compare it with that string. If that check fails, the firmware file was not properly downloaded and if you proceed with the upgrade, you will probably brick the device, requiring annoying procedures to recover.
On differences, download it again and compare it again - if it is still wrong in repeated attempts, ask for help in forums before proceeding.

Calculating SHA256 of the firmware file on Windows

Newer Windows has an integrated tool to check sha256sums called 'certutil', but it has no graphical user interface so we will have to use the command line to interact with it. Older Windows version will need to download a sha256 tool, for example MD5 & SHA Checksum Utility (the free version). Click the Windows icon, type “cmd” and hit enter. Execute (assuming you downloaded the file to your Downloads folder):

certutil -hashfile "%USERPROFILE%/Downloads/file-name-here" sha256

it will print something like this (file name followed by string with letters and numbers),
SHA256-Hash of file C:\Users\USERNAME\Downloads\lede-17.01.1-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin:
79 f9 4e fa d3 2c 14 8f f1 95 3f 09 6d 98 c7 41 c0 ff 8f 7e b4 68 8c 9d 5b f9 fb 01 c0 90 fb ab

Now remove spaces (e.g. using replace function in notepad) and check that the string with letters and numbers is the same as the one you read from sha256sums line in the download page.

Calculating SHA256 checksum of the firmware file on Mac

Mac has an integrated tool to check sha256sums, but it has no graphical user interface so we will have to use the Terminal to interact with it.
Click the Finder icon in the Dock. Click Applications in the Favorites list. Find the Utilities folder and click to open it. Locate Terminal and double-click the icon to open the program. Open a terminal window, and write (assuming you downloaded the file on the desktop):

shasum -a 256 ./Desktop/file-name-here

it will print something like this (string with letters and numbers followed by file name),
1a7c8bba93584fc44045629888e6b147851917cd0c83fcc91a7e6dbe90bdce76 lede-17.01.0-rc1-r3042-ec095b5-au1000-au1500-squashfs-sysupgrade.bin
Now check that the string with letters and numbers is the same as the one you read from sha256sums line in the download page.

Calculating SHA256 checksum of the firmware file on Linux

Linux has an integrated tool that is accessible from command line, similar to Mac. Some file managers (dolphin and other more powerful ones used in KDE user interface, don't know about others) offer this functionality in the file property window (right-click on the file, select Properties, click on “Checksums” tab, that tab appears only for binary files, like firmware images). It will offer buttons to calculate the SHA256sum and a field where you can paste the SHA256 string from sha256sums file to verify that it is correct. If your file manager does not offer any of this, open a terminal window and type (again assuming you downloaded the file on the desktop)

sha256sum ./Desktop/file-name-here

It will print something like this
1a7c8bba93584fc44045629888e6b147851917cd0c83fcc91a7e6dbe90bdce76 lede-17.01.0-rc1-r3042-ec095b5-au1000-au1500-squashfs-sysupgrade.bin.
Now check that this string matches as the one you read from sha256sums line in the download page.

Use this procedure if you want to install LEDE on a router running the “factory firmware” that it shipped with:

  1. The Device Page or Device Techdata page should have a link to an image for a “factory installation.”
  2. Download that file (called an image file) to your computer.
  3. Connect directly to the device via an Ethernet cable, if you haven't already done this. Do not use a Wi-Fi (wireless) connection, because it makes the flashing process less reliable.
  4. Log into the device's web interface.
  5. Locate the page for installing new firmware. This varies by vendor: follow the instructions for reloading/installing firmware in the manufacturer's user guide.
  6. Double-check that the LEDE firmware file you are about to flash matches your router model and is called “….factory.bin”, as you will use it to modify a vendor's factory firmware towards LEDE.
  7. Follow the manufacturer's instructions for transferring/uploading/sending the image file (from Step 2) to the router.
  8. Wait while the router accepts the firmware image, burns it into its flash memory, and then reboots. This can take several minutes: the Device Page may state an expected time for this process. If you do not see any confirmation after several minutes, continue on to Step 2 of the Quick Start Guide anyway: the router may have a new IP address.
  9. Congratulations! The new firmware has been installed. Complete the installation and configuration process at Step 2 of the Quick Start Guide

Use this procedure if you want to install LEDE on a router that is already running LEDE or OpenWrt:

:!: A sysupgrade erases internal memory, only configuration files are preserved.
You must install again all the packages you installed before the sysupgrade, also enable them again if they added system services.
After a sysupgrade you can restore the setting backup file you generated before the upgrade from Luci's System → Backup/Flash Firmware page.
If you have a particularly complex setup or you prefer more control over the sysupgrade process, please check Installing LEDE from the Command Line.

  1. Log into the device's web interface. Note: If the web interface is not installed, use the Installing LEDE from Command Line instructions.
  2. Go to the System → Backup/Flash Firmware page.
  3. Optional, but highly recommended: This is a good time to make a backup of the settings. It makes it easier to revert to the previous state. Click “Generate Archive” to save them on your computer.
  4. Decide what to do with the “Keep Settings” checkbox:
    • It is safest to uncheck the “Keep Settings” box. This allows you to get the device running with default settings.
    • However, if you are upgrading a recent version of LEDE, you may check the “Keep Settings” box.
    • Warning: If you are switching to a different release or distribution (e.g. from a release to a buildbot snapshot, or from OpenWrt to LEDE, or if you are changing from a newer build to an older release) uncheck the “Keep Settings” box. If you do not, you may find your router is not functional.
    • Pro tip: If you flash your device regularly, consider rebuilding settings (leave “Keep Settings” unchecked) from scratch every time you flash the router. After you get it to reboot successfully with the default settings, you can customize the settings with a script. See, for example, the config-openwrt.sh script that updates most settings.
  5. Optional, if you have custom configurations outside /etc/config : Go to System > Backup/Flash Firmware > Configuration tab. This will allow you to add your custom configuration files to the /etc/sysupgrade.conf file that is read by sysupgrade when it is backing up files. Click “Submit” when done editing.
    To view all the configuration files that will be saved on an upgrade, click the “Open list…” button.
  6. Double-check that the LEDE firmware file you are about to flash matches your router model and is called “….sysupgrade.bin”, as you will upgrade an existing LEDE/OpenWrt system towards a newer LEDE firmware version.
  7. In the Flash new firmware image section, click “Choose file” to select the image file (from Step 2). Click “Flash image…”
  8. You will see a “Flash Firmware - Verify“ page which includes information about the image file you are about to install.
  9. Check that the SHA256sum of the file in the device matches the SHA256 of the file you downloaded and the one in the sha256sums file.
    If it matches, evertyhing is OK, click “Proceed”.
    If it does not match go back and try again, either with the same or with a new image file. DO NOT proceed if the SHA256sums differ, as that's a corrupt file and will likely brick your device.
  10. You will see “System - Flashing …” along with a spinning wheel and “Waiting for changes to be applied…” It can take several minutes while the router accepts the firmware image, writes it into its internal memory, and then reboots. If you do not see any confirmation after several minutes, continue on to Step 2 of the Quick Start Guide anyway: the router may have a new IP address.
  11. Congratulations! The new firmware has been installed. Complete the installation and configuration process at Step 2 of the Quick Start Guide

The LEDE firmware is designed to work according to these instructions. Should you experience difficulty, or have questions before you start, search this site for more information, or ask for help on the Installing and Using LEDE category of the forum.