Selecting the right version
Gluon’s releases are managed using Git tags. If you are just getting started with Gluon we recommend to use the latest stable release of Gluon.
Take a look at the list of gluon releases and notice the latest release, e.g. v2023.1.2. Always get Gluon using git and don’t try to download it as a Zip archive as the archive will be missing version information.
Please keep in mind that there is no “default Gluon” build; a site configuration is required to adjust Gluon to your needs. Due to new features being added (or sometimes being removed) the format of the site configuration changes slightly between releases. Please refer to our release notes for instructions to update an old site configuration to a newer release of Gluon.
An example configuration can be found in the Gluon repository at docs/site-example/.
To build Gluon, several packages need to be installed on the system. On a freshly installed Debian Bullseye system the following packages are required:
git (to get Gluon and other dependencies)
ecdsautils (to sign firmware, see contrib/sign.sh)
libncurses-dev (actually libncurses5-dev)
libz-dev (actually zlib1g-dev)
libelf-dev (to build x86-64)
time (built-in time doesn’t work)
We also provide a container environment that already tracks all these dependencies. It quickly gets you up and running, if you already have either Docker or Podman installed locally.
Building the images
To build Gluon, first check out the repository. Replace RELEASE with the version you’d like to checkout, e.g. v2023.1.2.
git clone https://github.com/freifunk-gluon/gluon.git gluon -b RELEASE
This command will create a directory named gluon/. It might also tell a scary message about being in a detached state. Don’t panic! Everything’s fine. Now, enter the freshly created directory:
It’s time to add (or create) your site configuration. If you already have a site repository, just clone it:
git clone https://github.com/freifunk-alpha-centauri/site-ffac.git site
If you want to build a new site, create a new git repository site/:
Copy site.conf, site.mk and i18n from docs/site-example:
cp ../docs/site-example/site.conf .
cp ../docs/site-example/site.mk .
cp -r ../docs/site-example/i18n .
Edit these files as you see fit and commit them into the site repository. Extensive documentation about the site configuration can be found at: Site configuration. The site directory should always be a git repository by itself; committing site-specific files to the Gluon main repository should be avoided, as it will make updates more complicated.
Next go back to the top-level Gluon directory and build Gluon:
make update # Get other repositories used by Gluon
make GLUON_TARGET=ath79-generic # Build Gluon
In case of errors read the messages carefully and try to fix the stated issues (e.g. install missing tools not available or look for Troubleshooting in the wiki.
ath79-generic is the most common target and will generate images for most of the supported hardware.
To see a complete list of supported targets, call
make without setting
To build all targets use a loop like this:
for TARGET in $(make list-targets); do
You should generally reserve 5GB of disk space and additionally about 10GB for each GLUON_TARGET.
The built images can be found in the directory output/images. Of these, the factory images are to be used when flashing from the original firmware a device came with, and sysupgrade is to upgrade from other versions of Gluon or any other OpenWrt-based system.
Note: The images for some models are identical; to save disk space, symlinks are generated instead of multiple copies of the same image. If your webserver’s configuration prohibits following symlinks, you can use the following command to resolve these links while copying the images:
cp -rL output/images /var/www
The directory output/debug contains a compressed kernel image for each architecture. These can be used for debugging and should be stored along with the images to allow debugging of kernel problems on devices in the field. See Debugging for more information.
Cleaning the build tree
There are two levels of make clean:
make clean GLUON_TARGET=ath79-generic
will ensure all packages are rebuilt for a single target. This is usually not necessary, but may fix certain kinds of build failures.
will clean the entire tree, so the toolchain will be rebuilt as well, which will take a while.
Gluon is mostly compatible with OpenWrt, so the normal OpenWrt package repositories can be used for Gluon as well.
This is not true for kernel modules; the Gluon kernel is incompatible with the kernel of the default OpenWrt images. Therefore, Gluon will not only generate images, but also an opkg repository containing all core packages provided by OpenWrt, including modules for the kernel of the generated images.
Gluon does not support HTTPS for downloading packages; fortunately, opkg deploys public-key cryptography to ensure package integrity.
The Gluon images will contain public keys from two sources: the official OpenWrt keyring (to allow installing userspace packages) and a Gluon-specific key (which is used to sign the generated package repository).
OpenWrt will handle the generation and handling of the keys itself.
When making firmware releases based on Gluon, it might make sense to store
the keypair, so updating the module repository later is possible.
In fact you should take care to reuse the same opkg keypair, so you don’t pollute the key
/etc/opkg/keys) on the node.
The signing-key is stored at
openwrt directory is the Git checkout, that gets created after calling
After making a fresh clone copy the key files to the aforementioned locations.
Gluon’s build process can be controlled by various variables. They can
usually be set on the command line or in
Overrides the default branch of the autoupdater set in
site.conf. For the
GLUON_AUTOUPDATER_BRANCHdefines the branch to generate a manifest for.
1to enable the autoupdater by default for newly installed nodes.
Controls whether images for deprecated devices should be built. The following values are supported:
0: Do not build any images for deprecated devices.
upgrade: Only build sysupgrade images for deprecated devices.
full: Build both sysupgrade and factory images for deprecated devices.
Usually, devices are deprecated because their flash size is insufficient to support future Gluon versions. The recommended setting is
0for new sites, and
upgradefor existing configurations (where upgrades for existing deployments of low-flash devices are required). Defaults to
Space-separated list of languages to include for the config mode/advanced settings. Defaults to
enshould always be included, other supported languages are
Defines the priority of an automatic update in
make manifest. See Autoupdater for a detailed description of this value.
Some devices (at the moment the TP-Link Archer C7) contain a region code that restricts firmware installations. Set GLUON_REGION to
usto make the resulting images installable from the respective stock firmware.
Firmware release number: This string is displayed in the config mode, announced via respondd/alfred and used by the autoupdater to decide if a newer version is available. The same GLUON_RELEASE has to be passed to
make manifestto generate a correct manifest.
Target architecture to build.
CONFIG_AUTOREMOVEOpenWrt setting, which will delete package build directories after a package build has finished to save space. This is mostly useful for CI builds from scratch. Do not set this flag during development (or generally, when you want you reuse your build tree for subsequent builds), as it significantly increases incremental build times.
GLUON_DEBUG=1will provide firmware images including debugging symbols usable with GDB or similar tools. Requires a device or target with at least 16 MB of flash space, e.g. x86-64. Unset by default.
GLUON_MINIFY=0will omit the minification of scripts during the build process. By default the flag is set to
1. Disabling the flag is handy if human readable scripts on the devices are desired for development purposes. Be aware that this will increase the size of the resulting images and is therefore not suitable for devices with small flash chips.
List of devices to build. The list contains the Gluon profile name of a device, the profile name is the first parameter of the
devicecommand in a target file. e.g.
GLUON_DEVICES="avm-fritz-box-4020 tp-link-tl-wdr4300-v1". Empty by default to build all devices of a target.
Path where images will be stored. Defaults to
Path where the opkg package repository will be stored. Defaults to
Path where output files will be stored. Defaults to
Path to the site configuration. Defaults to