
LibreMesh project includes the development of several tools used for
deploying libre/free mesh networks.
The firmware (the main piece) will allow simple deployment of auto-configurable,
yet versatile, multi-radio mesh networks. Check the Network Architecture to
see the basic ideas.
We encourage each network community to create its firmware profile on
network-profiles repository and build the images locally.
Supported hardware
In this page we provide a list of requirements that ensure you to have a
working LibreMesh node on your router. This list comes with no warranties: read
carefully the model-specific instructions on OpenWrt wiki and be
extra-careful when flashing your routers!
Building a Firmware Image on Your PC
Building the stable release LibreMesh 2020.1
Using the BuildRoot
The BuildRoot will cross-compile the whole OpenWrt and the LibreMesh packages on your computer, so it will take approx 10 GB of disk space and a few hours of compilation time.
For compiling LibreMesh firmware with this method, you can follow these instructions.
Using the ImageBuilder
The ImageBuilder method is not available for the stable release.
Building the experimental firmware
The experimental code still has serious issues that have to be solved, use it only for developing or debugging.
Using the BuildRoot
As explained above, in the instuctions on the website you will find where to specify the version of the code to compile.
Using the ImageBuilder
The ImageBuiler will download pre-compiled parts of the OpenWrt releases, and add the pre-compiled LibreMesh packages, so it is much faster than the BuildRoot method (but less practical if you want to develop some new features modifying LibreMesh source code).
With Docker
Start an ImageBuilder of your choice, for example ath79-generic if your device is supported within it, use containers for an easier setup:
mkdir ./images/
docker run -it -v $(pwd)/images:/images/ ghcr.io/openwrt/imagebuilder:ath79-generic-v23.05.5
If your device is not part of ath79-generic profiles, you can replace it with another <target>-<subtarget> combination. For knowing which target and subtarget is best suited for your router, check out the page about it in the OpenWrt's Table of Hardware.
Within the container, add the lime-packages feeds:
opkg on openwrt 24.10.x and previous
- replace
openwrt-23.05 with another openwrt branch (i.e openwrt-24.10)
- replace
mips_24kc with the architecture of your device based on target/subtarget
echo "src/gz libremesh https://feed.libremesh.org/master/openwrt-23.05/x86_64" >> repositories.conf
echo "src/gz libremesh_arch_packages https://feed.libremesh.org/master/openwrt-23.05/mips_24kc" >> repositories.conf
echo "src/gz libremesh_profiles https://feed.libremesh.org/profiles/openwrt-23.05/x86_64" >> repositories.conf
echo "untrusted comment: signed by libremesh.org key a71b3c8285abd28b" > keys/a71b3c8285abd28b
echo "RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8" >> keys/a71b3c8285abd28b
apk on openwrt main branch
- replace
openwrt-main with another openwrt branch
- replace
mips_24kc with the architecture of your device based on target/subtarget
echo "https://feed.libremesh.org/master/openwrt-main/x86_64/packages.adb" >> repositories
echo "https://feed.libremesh.org/master/openwrt-main/mips_24kc/packages.adb" >> repositories
echo "https://feed.libremesh.org/profiles/openwrt-main/x86_64/packages.adb" >> repositories
echo "-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdFJZ2qVti49Ol8LJZYuxgOCLowBS
8bI86a7zqhSbs5yon3JON7Yee7CQOgqwPOX5eMALGOu8iFGAqIRx5YjfYA==
-----END PUBLIC KEY-----" > keys/libremesh.pem
Ideally add your own lime-community files within the container in the folder
./files/etc/config/. To find possible options consult the
lime-example.txt file. It is also possible to mount an existing
lime-community file directly. For example, when the lime-community file is in the current directory, append -v $(pwd)/lime-community:/builder/files/etc/config/lime-community to the docker run command.
Now create an image of your choice, to see the names of supported profiles run
make info first.
make image PROFILE=ubnt_unifi PACKAGES="lime-system lime-proto-babeld lime-proto-batadv lime-proto-anygw lime-hwd-openwrt-wan lime-hwd-ground-routing lime-app lime-debug lime-docs lime-docs-minimal shared-state-babeld_hosts shared-state-bat_hosts shared-state-dnsmasq_hosts shared-state-nodes_and_links babeld-auto-gw-mode check-date-http batctl-default -dnsmasq -odhcpd-ipv6only" BIN_DIR=/images FILES=files
For more information about which packages to select, refer to section package-selection.
Your images should be available outside of the container in the ./images/ folder.
Without Docker
Go to https://firmware-selector.openwrt.org/. Find your device. Click on the folder symbol right after "Links: ". Alternatively, find your device in OpenWrt's Table of Hardware, find the image download link, remove the filename from the right side of the link and put the result in your browsers address bar. Scroll down and download openwrt-imagebuilder-*. Unpack the file and open a terminal inside the directory. Add the lime-packages feed:
Follow the same steps at With Docker
- opkg on openwrt 24.10.x and previous
- apk on openwrt main branch
Create an image with
make image PROFILE=ubnt_unifi FILES=path-to-root-dir PACKAGES="lime-system lime-proto-babeld lime-proto-batadv lime-proto-anygw lime-hwd-openwrt-wan lime-hwd-ground-routing lime-app lime-debug lime-docs lime-docs-minimal shared-state-babeld_hosts shared-state-bat_hosts shared-state-dnsmasq_hosts shared-state-nodes_and_links babeld-auto-gw-mode check-date-http batctl-default -dnsmasq -odhcpd-ipv6only"
where path-to-root-dir is the path to a directory where your lime-community file is located, like so: path-to-root-dir/etc/config/lime-community. ubnt_unifi needs to be replaced with the profile that fits your device. Run make info to see the names of supported profiles. You find the resulting image files in ./bin/target/*/*/.
For more information about which packages to select, refer to section package-selection.
For more information about commands and parameters of imagebuilder, run make help.
Possible errors from the ImageBuilder
If you get a docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. error, means that you don't have Docker's daemon running. Make sure you have docker installed and start its daemon with systemctl start docker.service.
If you get a opkg_download: Check your network settings and connectivity. error, both check the connectivity and make sure that the firewall rules of your computer allow the container to reach the internet.
Firmware CI (build + test)
.github/workflows/build-firmware.yml driven by .github/ci/targets.yml
provides an end-to-end CI pipeline for pull requests and scheduled runs.
How it works for contributors:
When you open a pull request, the CI:
- Compiles your changes: The SDK builds every package under
packages/ from your PR commit, so modifications to lime-system,
lime-proto-*, etc. are included in the resulting .ipk/.apk feed.
- Builds firmware images: ImageBuilder creates per-device images
that install the packages you just compiled, not upstream packages.
- Runs tests on your code: The test jobs (
test-firmware,
test-mesh, test-mesh-qemu) exercise the firmware built from your
PR. Failures indicate issues with your changes.
This means you get real hardware and QEMU validation of your actual code
before merge, not just syntax checks.
Physical tests run on a self-hosted Labgrid testbed at FCEFyN (UNC,
Argentina) and require approval via the physical-lab environment gate.
QEMU tests run on GitHub-hosted runners without approval.
Updating lime-docs source pin
packages/lime-docs/Makefile pins libremesh/libremesh.github.io with PKG_SOURCE_VERSION (full SHA) and PKG_MIRROR_HASH (sha256 of the reproducible .tar.zst OpenWrt generates). OpenWrt 24.10 rejects PKG_MIRROR_HASH:=skip, and gh-action-sdk runs make package/lime-docs/check, so both values must stay correct.
When bumping to newer documentation:
Choose the upstream commit SHA (e.g. git ls-remote https://github.com/libremesh/libremesh.github.io refs/heads/main).
Set PKG_SOURCE_VERSION to that full SHA.
Set PKG_VERSION to YYYY.MM.DD~shortsha, where YYYY.MM.DD comes from the docs repo (git -C <docs-clone> show -s --format=%ad --date=short HEAD | sed 's|-|.|g') and shortsha is the first 7 hex digits of PKG_SOURCE_VERSION.
Get PKG_MIRROR_HASH from CI (most reliable). Set the new SHA + version in the Makefile, push, and read the value the workflow logs:
WARNING: PKG_MIRROR_HASH does not match lime-docs-<PKG_VERSION>.tar.zst hash <sha256>
Package HASH check failed
Copy that <sha256> into PKG_MIRROR_HASH. Reason: OpenWrt's download.pl picks one of two paths (GitHub tarball API or git clone + git archive) depending on mirror state, and each path produces a different tarball. The hash CI prints reflects the path actually taken in CI, which is deterministic per commit once chosen.
(Optional, faster) reproduce locally inside the SDK image so the first push succeeds:
docker run --rm --user root -v "$PWD:/work" \
ghcr.io/openwrt/imagebuilder:mediatek-filogic-v24.10.6 \
sh -lc 'cd /tmp && /builder/scripts/dl_github_archive.py \
--dl-dir=/tmp --url=https://github.com/libremesh/libremesh.github.io/ \
--version=<SHA> --subdir=lime-docs-<PKG_VERSION> \
--source=lime-docs-<PKG_VERSION>.tar.zst \
--hash=0000000000000000000000000000000000000000000000000000000000000000 \
--submodules skip 2>&1; sha256sum /tmp/lime-docs-<PKG_VERSION>.tar.zst'
If the GitHub API path succeeds locally and CI exercises the git-clone fallback, the hashes will differ - defer to step 4.
mkdir -p ./out-feed ./feed-merged/lime_packages
# PACKAGES="" -> compile every package in the lime_packages feed (default).
tools/ci/build_feed.sh aarch64_cortex-a53 ./out-feed
# Merge arch-specific + all feed output (lime-system is PKGARCH:=all)
cp -a ./out-feed/bin/packages/aarch64_cortex-a53/lime_packages/. ./feed-merged/lime_packages/ 2>/dev/null || true
cp -a ./out-feed/bin/packages/all/lime_packages/. ./feed-merged/lime_packages/ 2>/dev/null || true
docker run --rm \
--user root \
-e MKHASH=/builder/staging_dir/host/bin/mkhash \
-e PATH=/builder/staging_dir/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
-v "$(pwd)/feed-merged/lime_packages:/work" \
ghcr.io/openwrt/imagebuilder:mediatek-filogic-v24.10.6 \
sh -lc 'cd /work && /builder/scripts/ipkg-make-index.sh . > Packages && gzip -9nc Packages > Packages.gz'
PACKAGES="lime-system lime-proto-babeld lime-proto-batadv lime-proto-anygw lime-hwd-openwrt-wan lime-hwd-ground-routing lime-app lime-debug lime-docs lime-docs-minimal shared-state-babeld_hosts shared-state-bat_hosts shared-state-dnsmasq_hosts shared-state-nodes_and_links babeld-auto-gw-mode check-date-http batctl-default -dnsmasq -odhcpd-ipv6only" \
ARCH=aarch64_cortex-a53 FEED_BRANCH=openwrt-24.10 DEVICE_NAME=linksys_e8450 \
tools/ci/build_image.sh mediatek-mt7622 linksys_e8450 24.10.6 \
./feed-merged ./out
The workflow produces firmware artifacts with stable names: firmware-<device>.<ext>.
Package selection
With the PACKAGES= argument, you can specify which packages should be preinstalled inside the image. All packages and packages they depend on will be included in the image. This list of packes will produce an image close to the official ones:
PACKAGES="lime-system lime-proto-babeld lime-proto-batadv lime-proto-anygw lime-hwd-openwrt-wan lime-hwd-ground-routing lime-app lime-debug lime-docs lime-docs-minimal shared-state-babeld_hosts shared-state-bat_hosts shared-state-dnsmasq_hosts shared-state-nodes_and_links babeld-auto-gw-mode check-date-http batctl-default -dnsmasq -odhcpd-ipv6only"
There are some target and profile specific packages that are included by default. They can be excluded by prepending them with a minus sign. Note that when there is a package in the selection that depends on another package, that package will always be included. You can find out which packages depend on another package using package_whatdepends, for example:
make package_whatdepends PACKAGE=lime-system
If you have a device that uses an atk10k wireless driver, you need to make sure to use the one that isn't suffixed with -ct