Files
openwrt-image-buildomatic/README.md
2021-05-15 14:48:49 +02:00

6.7 KiB

% OpenWRT Image Buildomatic

Overview

This shell script uses the official OpenWrt Image Builder to quickly generate/build an OpenWRT device image with extra pre-installed packages, files or configuration included in the final image.

This means that to build your very own, let's say Raspberry Pi 4, OpenWRT image, you just need these three lines:

    git clone https://github.com/mmeisner/openwrt-image-buildomatic
    cd openwrt-image-buildomatic
    ./oi-build -b -c rpi-4

...and then after a minute you will have an image you can write to an SD-card, insert it into your RPi4 and run your Internet connection with 940Mbps throughput, with Wireguard.

As the saying goes: The cool guys build from source, the impatient guys use the image builder.

See the device configuration files in the configs folder for how simple it is.

The OpenWRT Image Builder

The OpenWRT Image Builder is like the normal OpenWRT build system except it does not build from source code but downloads a pre-built binary image and packages and combines those into a new image that can be used to update your OpenWRT device; Instead of taking hours to build an image from source, it takes mere seconds to build an image - depending on your download speed.

The OpenWRT image builder is already very easy to use, so the only thing that this script adds, is automated download and execution of the image builder — plus a convenient way to specify your configuration in a simple textual file (actually merely a shell script with a few variables). In the configuration file you can specify:

  • RELEASE is the release to use, e.g. 21.02-rc1, 19.07, snapshot, etc.
  • TARGET is the CPU architecture such as x86, ath79 (for Archer C7), bcm27xx (for Raspberry PI), etc.
  • PROFILE is the device name to make an image for e.g. rpi4 or archer-c7-v2
  • PACKAGES is a list of additional packages to include in the image. Full list per release is here: OpenWrt Packages
  • FILES is the path to a directory containing additional files you want to add to the final image. The directory should be organized as a normal rootfs. It could contain some useful home-made scripts or uci-defaults files for predefined configuration at first boot (see UCI defaults)

Please note that as stated on the OpenWrt Image Builder page, prebuilt snapshot images do not come with any web interface or GUI. This means that PACKAGES should at least contain luci if you want the web GUI!

Here are some of the OpenWRT Release Builds and devices that the script works with (as of May 2021):

  • Releases:
    • snapshot (snapshot, next upcoming release)
    • 21.02.0-rc1 (release candidate)
    • 19.07
  • Some popular devices:
    • Raspberry Pi 4
    • Archer C7

OpenWRT Index of /releases/

Other Useful OpenWRT Projects and Resources

This section lists various other resources on the Internet which can be useful with regard to installing or upgrading your OpenWRT router.

  • uciparse · PyPI These tools were written to ease OpenWRT upgrades, making it easier to see the differences between two config files. As of this writing (mid-2020), OpenWRT upgrades often don't normalize upgraded config files in the same way from version to version

Raspberry Pi 4 Network Performance Tuning

Post Install Actions

OpenWRT Remote Control Projects

Some Useful OpenWRT Settings

Disable DHCP server on LAN: uci set dhcp.lan.ignore=1 && uci commit && /etc/init.d/dnsmasq restart

Similar projects

  • Github ansemjo/openwrtbuilder OpenWRT builder - using the imagebuilder to compile a custom image is a small, simple shell script that does pretty much the same as this script although with command-line arguments instead of a configuration file.

Convert this markdown doc to HTML with pandoc:

pandoc --toc --self-contained -t html -o README.html README.md