What's “flashing firmware” Anyway?
In short, flashing is installing new firmware. On a device like a router, firmware is most of the basic programming code which runs most of the major functions on the device. This is similar to the installed operating system and programs on a PC. Similar to a PC, firmware updates are released to fix bugs, add new features, and increase security. The device can usually run without updates in a fairly stable way. However, you should understand the risks this may involve for your network.
Firmware is “firm” because we don't apply changes or updates nearly so often. It's a bigger event to flash firmware than it is to to update software. This is because the Flash RAM memory which stores router firmware isn't designed to be written to frequently. As well, more things can go wrong during firmware flashing.
Flashing firmware is usually done to fix bugs, improve stability or add new features to the device. In the case of FreshTomato, the firmware often adds all of the above when compared with the vendor's “stock” (original) firmware.
On routers, firmware is stored in a type of non-volatile memory called Flash RAM. The contents of non-volatile memory such as Flash RAM remain after reboots or when the device is turned off. If they were erased, the device would not function. On routers, firmware is replaced or updated by uploading the entire image of the operating system installation and its programs to an EEPROM (electrically erasable and writable) chip.
Again, this is vaguely similar to reformatting and reinstalling the entire operating system on a PC. However, during the firmware flashing process, files are not copied one at a time onto a filesystem. Instead, one single image file of the entire installation is copied to Flash RAM, a small portion at a time. This is similar to using a drive imaging program such as Acronis TrueImage for Windows, or Time Machine for the Macintosh.
What's an Image?
We refer to the files used to flash FreshTomato as “image” files, because they are mirror images of the entire installation of the operating system programs. The flashing simply copies the entire image file to the router's Flash RAM.
A build is one compilation of firmware.
Each build is:
The features included depend on the router's hardware and on which build/version is flashed. See the Feature matrix page for details on which features are included in each build).
Make sure to carefully choose a FreshTomato build appropriate for your hardware model. Choosing the wrong build/version could brick your router if it's not appropriate for your hardware. (See bricking section below).
When choosing a build, you need to make note of:
Some hardware models have two or more hardware versions/revisions. Some of these may contain different chipsets than others. Flashing the firmware to the “same” model hardware, but wrong version or revision could brick your hardware.
For some models, Flash RAM is limited, so it’s also important you choose a build that takes up less storage space than is available. Otherwise, you could run out of Flash RAM and your hardware could be bricked. For help choosing a build that's appropriate for your hardware, see the Hardware compatibility wiki page. For more guidance on how to choose a build, see the How Do I Choose a Build? section on the FAQ page. If you're still unsure after you've read both those pages, we recommend you ask for advice on the Tomato forum.
“Bricking” mean making your router completely non-functional after a failed flash. It's called bricking because the hardware would then only be useful as a brick, but not as a router. In this condition, It sometimes can't be fixed without electronics or soldering knowledge.
Here are some rules for successful firmware flashing:
Doing any of the these can result in a partial update. This may leave the firmware corrupted, which can damage how the device works or even “brick it”, making it useless. See the “Can I Recover from a Bad Flash?” section below to learn more about unbricking your router.
Can I Recover from a Bad Firmware Flash?
Yes, quite often, but not always. This depends on factors, including:
Once you're sure the router won't boot/work properly, follow these steps, in order:
NVRAM is the part of non-volatile memory where settings and parameters are stored.
FreshTomato can sometimes retain some NVRAM variables (settings) even after you flash a new firmware image. Therefore, it's very important to erase NVRAM before flashing. Doing so ensures all variables from existing firmware are erased before flashing begins. Erasing NVRAM before flashing is an important step that should NEVER be skipped.
A “dirty flash” is one performed without thoroughly wiping NVRAM before/after flashing. It often leads to strange, unexplained symptoms, like web interface pages that don't display properly, “missing” menu items, and just generally buggy or unstable operation. No matter how tempted you are to “save time”, please don't do a dirty flash. You'll likely waste time with strange symptoms and regret it.
There are several methods used to flash firmware on modern routers.
The method you use depends on several things:
For Asus hardware, several methods/tools are available for firmware flashing.
In general, if your (FreshTomato-supported) Asus hardware has FreshTomato or another Tomato fork installed, such as Shibby or Toastman, you can upgrade straight to FreshTomato using the Upgrade menu.
This flashing method is only possible for builds of release 2022.3 and later. In this example, we will flash an RT-AC68U model.
Here are the steps to follow:
Asus provides a Windows program called Firmware Restoration. This tool is used to flash firmware or recover from a failed firmware flash. After you put the router in Rescue Mode, the Restoration tool finds the router's IP address and lets you flash firmware to it. Rescue Mode is a mode in which the router won't do anything except receive a firmware update.
For Asus models built in 2014 and earlier, the Firmware Restoration tool works fine. However, on most Asus models after 2014, Firmware Restoration won't let you flash third-party firmware like FreshTomato. If you try this on newer hardware, the program will simply throw an error saying it's not possible. The reasons indirectly relate to a 2015 decision made by the US FCC (Federal Communications Commission) about changes to wireless features in third-party firmware.
For details, see the section below titled: FCC Regulation Change Affecting Wireless Routers.
To flash using the Firmware Restoration utility:
At this point, the router should function properly.
Sometimes on the first boot after a flash, FreshTomato may seem buggy or weird things might happen.
In such cases:
If problems persist, try the following:
If the router still acts strangely at that point, you should request help on the Tomato Web forum.
“Trivial File Transfer Protocol” is a small utility that transfers files between hosts on a TCP/IP network. It lets you upload firmware images to a router. There are command-line and graphical tftp client programs available. Windows includes a tftp program for the command line.
The TFTP method may work when the vendor's firmware blocks other upgrade methods from the original firmware.
To prepare to flash via tftp:
“tftp –I PUT filename.trx <IP address of router>“
Rescue Mode has a timeout period that limits how long you have to start firmware upload. If the timeout expires, you may need to put the hardware into Rescue Mode again and restart the flashing process.
Modern routers use CFE (Common Firmware Environment) for bootstrapping.
For some Broadcom devices, CFE is preset to run the convenient miniWeb server interface (shown above). CFE lets you install any compatible firmware on your device, making the router largely “unbrickable”.
When CFE loads, it sets the router's address to: 192.168.1.1. You can connect to it by setting your client Ethernet interface with an address in the same subnet (192.168.1.2) and entering the above address in a browser. CFE has a timeout period, so you need to reset the router and access it before it decides to load any custom/stock firmware on the device.
If Freshtomato is already installed, you can change the CFE timeout by changing the Boot Wait Time parameter in the Miscellaneous menu.
CFE can also be accessed by using a console/command prompt and connecting via a USB-to-serial interface. However, that is appropriate only for advanced users with special (but cheap) equipment.
If your router has a Tomato fork already installed, you can use the Administration/Upgrade menu in the web interface to upgrade to FreshTomato.
In some cases, flashing Linksys gear is a bit more complicated than flashing other brands. Before flashing, you're advised to read the Notes section in the Hardware compatibility list for important details. This includes important warnings about NVRAM size/limitations, CFE modifications that might be required, hardware revisions and more.
Some models might need to be flashed with a special “initial” firmware build first before you can install a regular FreshTomato build. Please read about this (above) before flashing.
There is no official HOWTO for flashing Linksys hardware. However, these unofficial HOWTOs on the forum have been worked many times:
How to flash Linksys EA6300v1, EA6400, EA6500v2, EA6700, EA6900v1.0/1.1 with Tomato
If you're still not sure what to do, post an question on the Tomato forum to avoid problems.
You should also read the Notes section at the bottom of this page for details on general flashing basics.
If you have a R-series router with stock firmware installed, you must first flash with a “Netgear R-series initial” file. Once you have an initial FreshTomato build installed, you can then upgrade to new versions using normal build files. The initial .zip file contains a file with ”.chk“ file extension. You can install that initial file via the original Netgear firmware.
For example: the following steps list the process for flashing an R7000 with an initial build, and then a normal build.
First, download the 2 files you'll need to flash the R7000:
The “R-series initial file” for R7000:
This .zip file has MD5SUM value: e3ef483d088215e9abe4888e0dd36d37
The normal R7000 AIO build file:
/downloads/freshtomato-arm/2023/2023.2/K26ARM/freshtomato-R7000-ARM-2023.2-AIO-64K.zip
This .zip file has MD5SUM value: ec63c869fe14f5b46cbb13813c1699bf
Run a hash check program against both files to check their integrity. On Windows, HashMyFiles works.
If the hash check program finds an MD5 matching the number above, the file is good. If it does not match, the file was corrupted during download and should be downloaded again.
Do not flash using the contents of .zip files that fail a hash check.
Now, unzip the .zip files. The contents should look like this (for this specific router/FreshTomato release):
freshtomato-R7000-2023.2-initial-64K.chk
freshtomato-R7000-ARM-2023.2-AIO-64K.trx
If you're not sure which build file to download,
In the case of the R7000, the data in the table describe these specifications:
Now, perform the flash procedure:
If you have FreshTomato installed on your Netgear, you can upgrade to new releases using regular build files. These .zip archives contain firmware files ending with the .trx file extension.
A Netgear router with FreshTomato installed can't be directly flashed back to original Netgear firmware from within normal builds. Some Netgear models can be flashed back to Netgear firmware using special “Netgear back to OFW” builds. Check if your Netgear model is supported in the “Netgear Back to OFW” folder in the appropriate FreshTomato downloads folder:
"Netgear back to OFW" firmware
In 2015, The US FCC (Federal Communications Commission) passed legislation designed to block people from changing certain WiFi settings, to avoid radio interference with other devices. WiFi radio power had to be implemented in hardware so that end users couldn't modify it. For example, the FCC wanted to make sure end users didn't override country settings or power limits which might affect radio power.
Some hardware vendors reacted to the legislation in an extreme way, blocking third-party firmware from being flashed at all. (The FCC did not actually require anything like this). As a result, some companies' hardware could not be flashed with third-party firmware from within the factory firmware interface. If you tried to do so, you'd simply receive an error stating it wasn't possible. This resulted in a lot of controversy.
ArsTechnica.com: FCC: Open source router software is still legal under certain conditions:
https://arstechnica.com/information-technology/2015/09/fcc-open-source-router-software-is-still-legal-under-certain-conditions/
SLATE: FCC Support for hackable routers is a win for all of us:
https://slate.com/technology/2016/08/fcc-support-for-hackable-wireless-routers-is-a-win-for-all-of-us.html