hello friends! new(ish)!
OpenWRT: Difference between revisions
>Mrsnooze m (category:distros, cleanup) |
>Se7en1 m (Fix formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
OpenWRT is an open source [[:Category:GNU/Linux | linux]] [[:Category:Distros | distribution]] for routers and other [[:Category:Networking | networking]] equipment. Firmware images are avilable from the [https://downloads.openwrt.org/ official website] but building from source is preferred. | OpenWRT is an open source [[:Category:GNU/Linux | linux]] [[:Category:Distros | distribution]] for routers and other [[:Category:Networking | networking]] equipment. Firmware images are avilable from the [https://downloads.openwrt.org/ official website] but building from source is preferred. | ||
= Compatibility = | == Compatibility == | ||
OpenWRT supports a [http://wiki.openwrt.org/toh/start number of devices]. Check the full details of the device before purchasing one, or attempting to flash the device. | OpenWRT supports a [http://wiki.openwrt.org/toh/start number of devices]. Check the full details of the device before purchasing one, or attempting to flash the device. Please make sure to read their entries fully, as some have partial compatibility. For instance, on several routers it supports flashing but does not support the proprietary drivers for WLAN. | ||
= First Time Install = | == First Time Install == | ||
Firmware images can be downloaded from the [https://downloads.openwrt.org/snapshots/trunk/ official firmware site], with [http://wiki.openwrt.org/doc/howto/generic.flashing insructions on flashing] available. | Firmware images can be downloaded from the [https://downloads.openwrt.org/snapshots/trunk/ official firmware site], with [http://wiki.openwrt.org/doc/howto/generic.flashing insructions on flashing] available. | ||
If flashing from a DD-WRT router, you'll need to [[Telnet]] into the router and use mtd to flash the OpenWRT factory image. Using DD-WRT's GUI flasher won't work, because DD-WRT does some kind of nasty shit to stop it being removed. | If flashing from a DD-WRT router, you'll need to [[Telnet]] into the router and use mtd to flash the OpenWRT factory image. Using DD-WRT's GUI flasher won't work, because DD-WRT does some kind of nasty shit to stop it being removed. | ||
= Building From Source = | == Building From Source == | ||
[[File:Openwrt-status.jpg|thumb|200px|right|OpenWRT running on a cheap router]] | [[File:Openwrt-status.jpg|thumb|200px|right|OpenWRT running on a cheap router]] | ||
[http://wiki.openwrt.org/doc/howto/buildroot.exigence Official Instructions] | [http://wiki.openwrt.org/doc/howto/buildroot.exigence Official Instructions] | ||
Line 40: | Line 40: | ||
The '''factory''' firmware is for installing OpenWRT over other firmware. '''sysupgrade''' is for updating OpenWRT. | The '''factory''' firmware is for installing OpenWRT over other firmware. '''sysupgrade''' is for updating OpenWRT. | ||
== Flashing == | === Flashing === | ||
Save your router config, flash the new firmware and hold your breath. | Save your router config, flash the new firmware and hold your breath. | ||
Latest revision as of 09:27, 21 January 2020
OpenWRT is an open source linux distribution for routers and other networking equipment. Firmware images are avilable from the official website but building from source is preferred.
Compatibility
OpenWRT supports a number of devices. Check the full details of the device before purchasing one, or attempting to flash the device. Please make sure to read their entries fully, as some have partial compatibility. For instance, on several routers it supports flashing but does not support the proprietary drivers for WLAN.
First Time Install
Firmware images can be downloaded from the official firmware site, with insructions on flashing available.
If flashing from a DD-WRT router, you'll need to Telnet into the router and use mtd to flash the OpenWRT factory image. Using DD-WRT's GUI flasher won't work, because DD-WRT does some kind of nasty shit to stop it being removed.
Building From Source
Before attempting to build, prepare for the worst. Open and Save As the following pages:
- Debricking Guide
- Booting into Failsafe Mode
- The OpenWRT wiki page for your specific device.
- Network cable.
Also have:
- The stock firmware for your device.
- Apache installed on your pc (or anything that will allow you to wget your firmware from the router's command prompt).
Follow the official instructions including git clone, installing the feeds, and make menuconfig.
Within menuconfig:
- Set Target System to your device's chipset.
- Set Target Profile to your specific device.
- Within LuCI, Collections, select luci. This is the web interface. Hit space twice to ensure it's selected with an asterix, and not an M (M means module, and modules have to be loaded before they'll start).
- Save to .config.
- Exit.
On your first compile, don't be tempted to select a heap of cool software or settings. Keep it simple. Once you know you can create a working firmware, then you can go nuts with the options.
Expect the compile to take about 45mins for a single CPU core. You can speed it up by using make -j4 (for 4 compilation threads) or -j8 (for 8 core CPUs) but it may fail and need restarting.
Once the compiliation is finished, your firmwares will be in bin/<chipset>/
The factory firmware is for installing OpenWRT over other firmware. sysupgrade is for updating OpenWRT.
Flashing
Save your router config, flash the new firmware and hold your breath.
If it all goes horribly wrong, refer to the debricking and recovery mode webpages you saved earlier. Generally recovery involves pressing the physical WPS button on your router when it boots, telnetting into it, wgetting a working firmware image from your pc, and using mtd to reflash. TFTD is another option, but much more finicky as you need split second timing to get it to respond.