OpenWrt installation is device-specific. The generic page is a map of technical paths, not a universal flashing recipe; before writing anything, open the correct device page in the Table of Hardware and never reuse another router's IP, filename, or command.1
Warning: These operations can damage firmware or hardware. If installation fails, move to the model-specific debrick/recovery documentation. Do not overwrite or alter the bootloader unless the device page explicitly says to do so.1
Choose the installation path first
The source describes three choices for where the image runs and four common installation methods:
- Option 1: install OpenWrt in the router's non-volatile memory.
- Option 2: load OpenWrt into RAM so the flash firmware remains unchanged.
- Option 3: boot OpenWrt over the network; not every bootloader supports netbooting.
- The concrete transport methods are OEM WebUI, bootloader over Ethernet, bootloader over serial, and JTAG.1
Prerequisites and model checklist
Before choosing a method, identify every bootloader value:
- The bootloader's preset IP address, which may differ from the address used by OEM firmware.
- The protocol and whether the bootloader is a client or server: TFTP, FTP, web, XMODEM, or a model-specific method.
- The port when it is not the default.
- The Ethernet or serial interface that must be connected.
- A username and password if required.
- The time window available after power-on.
Install the matching PC software, read the relevant manual for tftp, tftpd, ftp, ncftp, ftpd, or pure-ftpd, configure a static PC address in the bootloader's subnet, connect to the device, power-cycle it, connect to the bootloader, and send the correct firmware. Do not overwrite the bootloader until the model documentation explicitly authorizes it.1
Method 1: through OEM firmware
Open the OEM firmware WebUI, choose the correct factory image for the model and hardware revision under Firmware Upgrade, and let the device reboot. OEM firmware may accept only a specific file type; when it does, use only an image documented as compatible for that model. Do not assume that every factory image works on every revision.1
Method 2: through a bootloader and Ethernet
A bootloader may provide a TFTP client, TFTP server, FTP client, FTP server, web server, or XMODEM. Once the checklist values are known, follow this order:
- Install the appropriate client or server on the PC.
- Read its manual and set a static PC address in the bootloader subnet.
- Connect the PC to the correct device port.
- Power-cycle the device and catch the bootloader window.
- Connect with the selected software.
- Send the correct OpenWrt image with the required name and format.
- Stop if the bootloader rejects the image; do not force a file from another model.
- Do not overwrite or alter the bootloader without explicit instructions.
When the connection window is very short, the source mentions reducing NIC negotiation or media-sensing delays when the device guide permits it.1
The source links separate how-tos for generic.flashing.tftp, generic.flashing.ftp, and generic.flashing.xmodem; these are distinct paths, not one generic TFTP command.1
Method 3: through a bootloader and serial
Serial installation still needs the values from the Ethernet checklist—protocol, IP, port, interface, and timing—then follows generic.flashing.serial for the device. A serial cable does not make a generic image suitable for a model; preserve the bootargs, addresses, and layout required by that bootloader.1
Method 4: through JTAG
JTAG is a deeper flash access and recovery path when ordinary methods are unavailable. Follow port.jtag and the board-specific documentation, and prepare stable power, the correct pinout, tools, and a dump from the same device. Never guess JTAG pins or offsets.1
Test a ramdisk without writing flash: WNDR3700 example
The source includes a concrete WNDR3700 example. It is a procedural example, not a recipe for another router.
- In OpenWrt Buildroot, explicitly select RAMDISK to create
openwrt-ar71xx-uImage-lzma.bin. - Connect Ethernet from the computer to a WNDR3700 LAN port, not WAN.
- Connect serial to the header and set the terminal to:
115200 bps 8N1;- no software flow control;
- no hardware flow control.
- Set the PC Ethernet address to
192.168.0.10/24. - Run a TFTP server on the PC and place the image in its TFTP directory.
- Fix the image header with the
wndr3700.cprogram described by the WNDR3700 instructions, then run this from the TFTP directory:
| |
- Power up the board, press a key when the serial console asks to interrupt the normal boot sequence, and reach the prompt.
- Enter the bootloader commands exactly:
| |
If bootargs is omitted, the board may appear to boot but fail to bring up its network interfaces. A running ramdisk leaves the flash firmware unchanged, providing a safer boundary for testing before a permanent install.1
Pre-, during-, and post-install checklist
Before installation
- Read the installation FAQ, Table of Hardware, and forum material for the exact router.
- Confirm stock/original firmware when the selected method requires OEM firmware.
- Configure a static PC address and use a wired connection, not Wi‑Fi, for flashing.
- Save the First login and Failsafe pages for offline reading.
- Back up the flash when the model documentation supports it and store the dump off the router.
During installation
- Reboot within the documented bootloader window.
- Put the image in the correct location; for an existing OpenWrt sysupgrade, the source notes
/tmpbecause it is RAM. - Verify the downloaded image's MD5 checksum against the published checksum.
- Ensure that free RAM is at least the image size.
- Do not remove power, change cables, or move ports while writing.
After installation
- Perform First login and set a root password.
- Back up the flash again when the selected method and model support it.
- Become familiar with Failsafe.
- Only then configure networking, wireless, and services.1
Scope and rollback
The generic page does not provide a universal restore command. If the image does not boot, return to the model-specific bootloader, OEM, or recovery path; never use another device's sysupgrade or guess an offset. When the goal is testing, prefer a ramdisk or a documented recovery method over writing directly to flash.1


Góp Ý / Bình Luận / Đánh giá