OpenWrt is an operating system (in particular, an embedded operating system) based on the Linux kernel, primarily used on embedded devices to route network traffic. The main components are the Linux kernel, util-linux, uClibc or musl, and BusyBox. All components have been optimized for size, to be small enough for fitting into the limited storage and memory available in home routers.
OpenWrt is configured using a command-line interface (ash shell), or a web interface (LuCI). There are about 3500 optional software packages available for installation via the Opkg package management system.
OpenWrt can run on various types of devices, including CPE routers, residential gateways, smartphones (e.g. Neo FreeRunner), pocket computers (e.g. Ben NanoNote), and laptops (e.g. One Laptop per Child (OLPC)). It is also possible to run OpenWrt on ordinary computers, which are most commonly based on the x86 architecture. Many patches from the OpenWrt’s codebase have been included upstream in the Linux kernel mainline.
Hystory of the OpenWrt
The project came into being because Linksys built the firmware for their WRT54G wireless router from publicly available code licensed under the GPL. Under the terms of that license, Linksys was required to make the source code of its modified version available under the same license, which in turn enabled independent developers to create additional derivative versions. Support was originally limited to the WRT54G series, but has since been expanded to include many other chipsets, manufacturers and device types, including Plug Computers and Openmoko mobile phones.
Using this code as a base and later as a reference, developers created a Linux distribution that offers many features not previously found in consumer-level routers. Some features formerly required proprietary software. Before the introduction of OpenWrt 8.09, using Linux 2.6.25 and the b43 kernel module, WLAN for many Broadcom-based routers was only available through the proprietary wl.o module that was also provided for Linux kernel version 2.4.x only.
OpenWRT is an active and vibrant home firewall project that was born on the Linksys WRT54G line of home routers. It has grown and expanded to support an amazing array of old and new hardware alike. The list of compatible hardware is large enough to require its own index.
The code names of OpenWrt branches are named after alcoholic beverages, usually including their recipes in the MOTD as well, cf. White Russian, Kamikaze, Backfire, Attitude Adjustment, Barrier Breaker.
OpenWrt follows the bazaar-philosophy in which the code is developed over the Internet in view of the public and is known for an abundance of options. Features include:
-A writable root file system, enabling users to add, remove or modify any file. This is accomplished by using OverlayFS to overlay a read-only compressed SquashFS file system with a writable JFFS2 file system in a copy-on-write fashion. JFFS2 supports flash wear leveling, the package manager opkg, similar to dpkg, enables users to install and remove software. The package repository contains about 3500 packages. This contrasts with Linux-based firmwares based on read-only file systems without the possibility to modify the installed software without rebuilding and flashing a complete firmware image,
-A set of scripts called UCI (unified configuration interface) intended to unify and simplify the configuration of the entire system
-An extensible configuration of the entire hardware drivers, e.g. built-in network switches and their VLAN-capabilities, WNICs, DSL modems, FX, available hardware buttons, etc.,
-Exhaustive possibilities to configure network-related features.
Open Wrt Development
OpenWrt’s development environment and build system, known together as OpenWrt Buildroot, are based on a heavily modified Buildroot system. OpenWrt Buildroot is a set of Makefiles and patches that automate the process of building a complete Linux-based OpenWrt system for an embedded device, by building and using an appropriate cross-compilation toolchain.
Embedded devices usually use a different processor than the one found in host computers used for building their OpenWrt system images, requiring a cross-compilation toolchain. Such a compilation toolchain runs on a host system, but generates code for a targeted embedded device and its processor’s instruction set architecture (ISA). For example, if a host system uses x86 and a target system uses MIPS32, the regular compilation toolchain of the host runs on x86 and generates code for x86 architecture, while the cross-compilation toolchain runs on x86 and generates code for the MIPS32 architecture. OpenWrt Buildroot automates this whole process to work on the instruction set architectures of most embedded devices and host systems.
OpenWrt Buildroot provides the following features:
- Makes it easy to port software across architectures
- Uses kconfig (Linux kernel menuconfig) for the configuration of all options
- Provides an integrated cross-compiler toolchain (gcc, ld, uClibc etc.)
- Provides an abstraction for autotools (automake, autoconf), cmake and SCons
- Handles standard OpenWrt image build workflow: downloading, patching, configuration, compilation and packaging
- Provides a number of common fixes for known badly behaving packages
- Being a Linux distribution, OpenWrt takes existing software written by others and adopts this to its own use
Message to take home
In fact, OpenWrt provides an environment for building custom, Linux kernel-based firmware for a variety of embedded devices.
With the advent of flash-based embedded devices such as WLAN access points and routers, the availability of OpenWrt as a standardized Linux distribution for these and the low resource consumption of DNS/DHCP, and migration of these services from hard disk-based servers onto access points/routers became feasible. After all, an access point running on flash memory is much less likely to fail than a full-blown server with hard disks as storage. The only part we’ve seen failing over years with these devices is the $0.05 power supply. Using an inexpensive wireless router, you can build a file server, a print server and even a media server. Plus, you can put all of those together and build the network device that does what you want.
Sirin Software offers OpenWRT customization in the form of:
- Package management, configuration and development
- Build system configuration
- Backports, imports specific package versions
- Web management interface customization and development
- System adaptation for target hardware
- Applications and kernel modules development