Skip to content
hardware-independent openWRT-extension (using busybox-ash as main-language) for setting up, monitor and manage many, large wifi-mesh-networks for different locations including billing, captive portal / splash screen / weblogin, accounting, data retention and layer7/8-QoS
Shell JavaScript C PHP HTML CSS Makefile
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

kalua - build mesh-networks without pain

needing support? join the club or ask for consulting

Flattr this git repo

how to build this from scratch on a debian server

# be root user
apt-get update
LIST="build-essential libncurses5-dev m4 flex git git-core zlib1g-dev unzip subversion gawk python libssl-dev quilt screen"
for PACKAGE in $LIST; do apt-get -y install $PACKAGE; done

# now login as non-root user, use 'git clone --depth 1 ...' if history doesnt matter (faster download)
git clone git://
git clone git://
cd openwrt
git clone git://

# for working with a specific openwrt-revision, do this:
# REV=32793 // current testing
# REV=31465 // current beta
# REV=30823 // current stable
# git checkout "$( git log -z | tr '\n\0' ' \n' | grep "@$REV " | cut -d' ' -f2 )" -b r$REV

# now copy your own 'apply_profile.code.definitions' to . or the provided one will be used

make menuconfig             # select your "Target System" / "Target Profile" and exit
make package/symlinks

# now configure your image, see next
# section "configure the builtin-packages"

# last 3 arguments enforce a specific configuration (profile: ffweimar, wifmode: adhoc, node: 42)
kalua/openwrt-build/ applymystuff "ffweimar" "adhoc" "42" # omit arguments for a generic image
kalua/openwrt-build/ make                     # needs some hours + 5gig of space

# flash your image via TFTP
while :; do atftp --trace --option "timeout 1" --option "mode octet" --put --local-file $FW $IP && break; sleep 1; done

configure the builtin-packages

# the fast and easy automatic way:
kalua/openwrt-build/ set_build standard
make defconfig

# the way to understand what you are doing here:
make kernel_menuconfig      # will safe in 'build_dir/linux-${platform}/linux-${kernelversion}/.config'

    General setup ---> [*] Support for paging of anonymous memory (swap)
    Device Drivers ---> Staging drivers ---> [*] Compressed RAM block device support

make menuconfig         # will safe in '.config'

    Global build settings ---> [*] Compile the kernel with symbol table information

    Base system ---> busybox ---> Linux System Utilities ---> [*] mkswap
                                  [*] swaponoff
    Base system ---> [ ] firewall

    Network ---> Firewall ---> [*] iptables ---> [*] iptables-mod-ipopt
                             [*] iptables-mod-nat-extra

    Network ---> Routing and Redirection ---> [*] ip
    Network ---> Routing and Redirection ---> [*] olsrd ---> [*] olsrd-mod-arprefresh
                                 [*] olsrd-mod-jsoninfo
                                 [*] olsrd-mod-nameservice
                                 [*] olsrd-mod-txtinfo
                                 [*] olsrd-mod-watchdog
    Network ---> Web Servers/Proxies ---> [*] uhttpd
                          [*] uhttpd-mod-tls
                          [*] Build with debug messages

    Network ---> [*] ethtool    # if needed, e.g. 'Dell Truemobile 2300'
    Network ---> [*] mii-tool   # if needed, e.g. 'Ubiquiti Bullet M5'
    Network ---> [*] netperf
    Network ---> [*] ulogd ---> [*] ulogd-mod-extra     # if data retention needed

    Utilities ---> [*] px5g
               [*] rbcfg    # if needed, e.g. 'Linksys WRT54G/GS/GL'

how to development directly on a router

opkg update
opkg install git

echo  >/tmp/ '#!/bin/sh'
echo >>/tmp/ 'logger -s "$0: $*"'
echo >>/tmp/ 'ssh -i /etc/dropbear/dropbear_dss_host_key $*'

chmod +x /tmp/
export GIT_SSH="/tmp/"     # dropbear needs this for public key authentication

git config --global >/dev/null || {
    git config --global "Firstname Lastname"
    git config --global ""
    git config --edit --global

mkdir -p /tmp/dev; cd /tmp/dev
git clone <this_repo>
kalua/openwrt-build/ build_kalua_update_tarball
cd /; tar xvzf /tmp/tarball.tgz; rm /tmp/tarball.tgz

cd /tmp/dev/kalua
git add <changed_files>
git commit -m "decribe changes"
git push ...

piggyback kalua on a new router model without building from scratch

# for new devices, which are flashed with a plain openwrt
# from do this:

# plugin ethernet on WAN, to get IP via DHCP, wait
# some seconds, connect via LAN with 'telnet' and
# look with which IP was given on WAN, then do:
ifconfig $(uci get network.wan.ifname) | fgrep "inet addr:"
/etc/init.d/firewall stop
/etc/init.d/firewall disable

# plugin ethernet on WAN and connect to the router
# via 'telnet <routers_wan_ip>', then do:
opkg update
opkg install ip bmon netperf
opkg install olsrd olsrd-mod-arprefresh olsrd-mod-watchdog olsrd-mod-txtinfo olsrd-mod-nameservice
opkg install uhttpd uhttpd-mod-tls px5g
opkg install kmod-ipt-compat-xtables iptables-mod-conntrack iptables-mod-conntrack-extra iptables-mod-extra
opkg install iptables-mod-filter iptables-mod-ipp2p iptables-mod-ipopt iptables-mod-nat iptables-mod-nat-extra
opkg install iptables-mod-ulog ulogd ulogd-mod-extra

# build full kalua-tarball on server
kalua/openwrt-build/ build_kalua_update_tarball full

# copy from server to your router
scp user@yourserver:/tmp/tarball.tgz /tmp/tarball.tgz
# OR take this prebuilt one:
wget -O /tmp/tarball.tgz
# decompress:
cd /; tar xvzf /tmp/tarball.tgz; rm /tmp/tarball.tgz

# execute config-writer
Something went wrong with that request. Please try again.