ImageBuilder
Refers to the OpenWrt wiki Using the Image Builder for detailed options
TIP
Find the target-subtarget of your device using the OpenWrt's Table of Hardware or the firmware-selector
Setup
Export to the environment the target-subtarget and the package architecture
export TARGET=ath79-generic
export ARCH=$(curl -s https://downloads.openwrt.org/snapshots/.targets.json | \
sed 's/\//-/' | jq -r '."${TARGET}"')Build on Debian
Refers to the OpenWrt wiki Using the Image Builder
Install the OpenWrt ImageBuilder Debian prerequisites
Download the imagebuilder of your choice, extract it and enter in its directory.
FILE_HOST="https://downloads.openwrt.org"
DOWNLOAD_PATH="releases/25.12.0/targets/ath79/generic"
DOWNLOAD_FILE="imagebuilder-.*x86_64.tar.[xz|zst]"
mkdir imagebuilder; cd imagebuilder
wget -nv "$FILE_HOST/$DOWNLOAD_PATH/sha256sums" -O sha256sums
file_name="$(grep "$DOWNLOAD_FILE" sha256sums | cut -d "*" -f 2)"
wget -nv "$FILE_HOST/$DOWNLOAD_PATH/$file_name"
tar xf "$file_name" --strip=1 --no-same-owner -C .FILE_HOST="https://downloads.openwrt.org"
DOWNLOAD_PATH="releases/24.10.5/targets/ath79/generic"
DOWNLOAD_FILE="imagebuilder-.*x86_64.tar.[xz|zst]"
mkdir imagebuilder; cd imagebuilder
wget -nv "$FILE_HOST/$DOWNLOAD_PATH/sha256sums" -O sha256sums
file_name="$(grep "$DOWNLOAD_FILE" sha256sums | cut -d "*" -f 2)"
wget -nv "$FILE_HOST/$DOWNLOAD_PATH/$file_name"
tar xf "$file_name" --strip=1 --no-same-owner -C .FILE_HOST="https://downloads.openwrt.org"
DOWNLOAD_PATH="snapshots/targets/ath79/generic"
DOWNLOAD_FILE="imagebuilder-.*x86_64.tar.[xz|zst]"
mkdir imagebuilder; cd imagebuilder
wget -nv "$FILE_HOST/$DOWNLOAD_PATH/sha256sums" -O sha256sums
file_name="$(grep "$DOWNLOAD_FILE" sha256sums | cut -d "*" -f 2)"
wget -nv "$FILE_HOST/$DOWNLOAD_PATH/$file_name"
tar xf "$file_name" --strip=1 --no-same-owner -C .Build on Docker
Start an ImageBuilder of your choice, for example ath79-generic if your device is supported within it
mkdir ./images/
docker run -it \
-e TARGET=$TARGET \
-e ARCH=$ARCH \
-v $(pwd)/config/:/builder/files/etc/config/ \
-v $(pwd)/images:/images/ \
ghcr.io/openwrt/imagebuilder:$TARGET-v25.12.0mkdir ./images/
docker run -it \
-e TARGET=$TARGET \
-e ARCH=$ARCH \
-v $(pwd)/config/:/builder/files/etc/config/ \
-v $(pwd)/images:/images/ \
ghcr.io/openwrt/imagebuilder:$TARGET-v24.10.5mkdir ./images/
docker run -it \
-e TARGET=$TARGET \
-e ARCH=$ARCH \
-v $(pwd)/config/:/builder/files/etc/config/ \
-v $(pwd)/images:/images/ \
ghcr.io/openwrt/imagebuilder:$TARGETAdd LibreMesh feeds
Within the container add the lime-packages feeds.
cat << EOF >> repositories
https://feed.libremesh.org/master/openwrt-25.12/x86_64/packages.adb
https://feed.libremesh.org/master/openwrt-25.12/$ARCH/packages.adb
https://feed.libremesh.org/profiles/openwrt-25.12/x86_64/packages.adb
EOF
cat << EOF > keys/libremesh.pem
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdFJZ2qVti49Ol8LJZYuxgOCLowBS
8bI86a7zqhSbs5yon3JON7Yee7CQOgqwPOX5eMALGOu8iFGAqIRx5YjfYA==
-----END PUBLIC KEY-----
EOFcat << EOF >> repositories.conf
src/gz libremesh_packages https://feed.libremesh.org/master/openwrt-24.10/x86_64
src/gz libremesh_arch_packages https://feed.libremesh.org/master/openwrt-24.10/$ARCH
src/gz profiles https://feed.libremesh.org/profiles/openwrt-24.10/x86_64
EOF
cat << EOF > keys/a71b3c8285abd28b
untrusted comment: signed by libremesh.org key a71b3c8285abd28b
RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8
EOFcat << EOF >> repositories
https://feed.libremesh.org/master/openwrt-main/x86_64/packages.adb
https://feed.libremesh.org/master/openwrt-main/$ARCH/packages.adb
https://feed.libremesh.org/profiles/openwrt-main/x86_64/packages.adb
EOF
cat << EOF > keys/libremesh.pem
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdFJZ2qVti49Ol8LJZYuxgOCLowBS
8bI86a7zqhSbs5yon3JON7Yee7CQOgqwPOX5eMALGOu8iFGAqIRx5YjfYA==
-----END PUBLIC KEY-----
EOFCustom files
Ideally add your own lime-community files within the container in the folder ./files/etc/config/.
To find all possible options consult the [Configuration][/reference/configuration] page.
Now create an image of your choice, to see the names of supported profiles run make info first.
Build
make image \
PROFILE=ubnt_unifi \
BIN_DIR=/images \
FILES=files \
PACKAGES="-dnsmasq -odhcpd-ipv6only \
lime-system lime-proto-babeld lime-proto-batadv lime-proto-anygw \
lime-hwd-openwrt-wan lime-hwd-ground-routing \
babeld-auto-gw-mode check-date-http batctl-default \
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"Build using Network Profiles
Refers to Network Profiles
make image \
PROFILE=ubnt_unifi \
BIN_DIR=/images \
FILES=files \
PACKAGES="-dnsmasq -odhcpd-ipv6only profile-libremesh-suggested-packages"