This guide describes the procedure to compile old images for Reseau Libre before we adopted the Commotion firmware.

See firmware for usage instructions.

Deprecated!

This page needs an update. We have adopted the Commotion firmware.

Recommended: Create an image using "image builder"

Main documentation: http://wiki.openwrt.org/doc/howto/obtain.firmware.generate

  • Pros: avoids the long build time of openwrt from source, useful for building against an architecture not provided by reseaulibre
  • Cons: if you want to build a specific package (ex: reseaulibre-base, reseaulibre-mesh), you will still need to compile most of OpenWRT anyway, because it will build all the dependancies (although maybe we can reduce the dependancies?).

In short, for the ar71xx architecture:

mkdir ~/openwrt && cd ~/openwrt
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2
tar -xvjf OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2
cd OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486

The build command:

make image PROFILE=Default PACKAGES="kmod-ipv6 ip radvd tcpdump ip6tables iperf babeld tinc wireless-tools luci luci-theme-bootstrap luci-i18n-french" FILES="../reseaulibre-feed/reseaulibre-mesh/files/"

The resulting firmware can be found in, for example:

~/openwrt/bin/ar71xx/openwrt-ar71xx-generic-ubnt-bullet-m-squashfs-factory.bin
~/openwrt/bin/ar71xx/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin

For the full instructions on how it is built on our build machines: rlbuild

Alternative: Compile openwrt from source

Warning: this is the full process to build OpenWRT and takes more time/resources. The documentation below may not be fully up to date.

Make sure you have all prerequisites for building openwrt

Follow the instructions at the beginning of the page http://wiki.openwrt.org/doc/howto/buildroot.exigence

i.e. most importantly:

sudo apt-get update
sudo apt-get install git-core subversion build-essential

Setup the Reseau libre build environment

Obtain the reseau libre build environment then prepare the environment with the following commands:

git clone git://gitorious.org/reseau-libre-openwrt/reseau-libre-openwrt.git
cd reseau-libre-openwrt
./setup.sh

Follow the instructions on screen

Compile openwrt

From the git repository downloaded at previous step, do the following

cd openwrt
make menuconfig # to add or change packages or modify material to build for
make V=99

The resulting images are located in, for example:

openwrt/bin/ar71xx/openwrt-ar71xx-generic-ubnt-bullet-m-squashfs-factory.bin
openwrt/bin/ar71xx/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin
openwrt/bin/ar71xx/openwrt-ar71xx-generic-ubnt-bullet-m-squashfs-sysupgrade.bin
openwrt/bin/ar71xx/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-sysupgrade.bin

To compile only a specific package

Main article: http://wiki.openwrt.org/doc/howtobuild/single.package

cd ~/path/to/reseau-libre-openwrt/openwrt
make tools/install
make toolchain/install

Our reseaulibre packages are in a feed, so we need to update the feed (will do a "git pull") and compile:

scripts/feeds update -a
make package/feeds/reseaulibre/reseaulibre-base/compile
make package/feeds/reseaulibre/reseaulibre-base/install
make package/feeds/reseaulibre/reseaulibre-mesh/compile
make package/feeds/reseaulibre/reseaulibre-mesh/install

Resulting packages are in ~/path/to/reseau-libre-openwrt/openwrt/bin/ar71xx/packages/reseaulibre-{base,mesh}[...].ipk

Reseau libre package information

The reseaulibre-feed repository is available with the following git command:

git clone git://gitorious.org/reseau-libre-openwrt/reseaulibre-feed.git

Here are the details on what the Reseau libre packages do:

reseaulibre-base

This package just lists dependencies, to make sure all packages required or recommended by the Reseau Libre volunteers are included in the image, to avoid having to go through the whole menuconfig

The packages this package depends on are:

kmod-ipv6 ip kmod-ip6tables ip6tables babeld radvd nano iperf opkg

If you want to remove any of those packages from the image, you'll first have to disable the reseaulibre-base package by running 'make menuconfig'.

reseaulibre-mesh

This package includes a few user contributed scripts useful when running the image. These scripts can be executed directly from a command line on the device.

These packages are all source-controlled at https://gitorious.org/reseau-libre-openwrt/reseau-libre-openwrt/trees/master/reseaulibre-feed/reseaulibre-mesh/files/usr/bin but some of those have their master source somewhere else. In those cases, the main repository is mentioned.

babeldstate

Sends the kill signal to the babel process and reads the latest logs

author: bgm?

sources: ?

Usage: babeldstate

setup_babel

Updates the babel config file for the interfaces in arguments, so there is no need to manually edit the babel configuration for it to work with respectable defaults.

author: tahini

Usage:

setup_babel interface [interface ...]

Arguments:
    List of interfaces to put on the mesh

EXAMPLE:
    This command line adds the wireless interface and wired interface eth0 to the mesh"
    setup_babel wlan0 eth0"

setup_reseaulibre

Configures IPv6 with an fd64::/64 (from numbering) and radvd. This way, you can use this IP block to broadcast an IPv6 route on the mesh, and this route will also be broadcasted on your local network, so devices supporting IPv6 will automatically get access to the mesh.

If your router has access to the Internet, the script will try to automatically find a free IPv6 block in our fd64::/48 block. So you don't need to know anything about IPv6 in order to use this.

Note that in order to use this setup, it is recommended that your br-lan interface be configured as "static". Otherwise, br-lan will send route announcements (RA), and it will assign itself an IP.

author: bgm

Usage:

setup_reseaulibre interface [ipv6 /64 net block]

Arguments:
    interface: interface to configure (radvd)"
    ipv6 /64 net block (optional): IP block to assign

EXAMPLE:
    setup_reseaulibre br-lan
    setup_reseaulibre br-lan fd64:2c08:9fa7:5::

If you have an Internet connection, the script will try
to find the first free netblock.

The /64 IP block will be selected from:
http://wiki.reseaulibre.ca/policy/numbering/

The block will be announced on your local network, so that the other
devices on that network can access the mesh.

Warning to technical users: the script does a few assumptions. For example, if you are specifying your own /64 block, type it as, for example, "fd64:2c08:9fa7:5::", not "fd64:2c08:9fa7:5::/64". The aim is to automate a simple and most common use-case.

TODO:

  • chain with setup_babel
  • currently, setup_babel will add all IPs on br-lan, so it will also create IPv4 routes, we also want to make sure babel only exports the fd64::/64 route.
  • make sure the firewall configuration is strict, in order to avoid exposing internal services by mistake.

bat-signal

Displays signal levels from connected Wi-Fi stations. It works with the wifi device and has nothing to do with batman.

author: bgm, deuxpi

sources: ?

ubnt-leds

Use the leds on the ubiquiti device to show the strength of the link to one given station. This was batman dependent, but we leave it here in case somebody wants to update/modify it.

author: ?

sources: ?

Bugs, todo ?

We do not have a bug tracker at the moment.. feel free to add things here, but try to keep it tidy and realistic.

  • Create a script to automatically configure IPv6 with a unique-local fd64 address block?

Also see the brainstorm on network topology:

  • http://www.flickr.com/photos/elecnix/8289464397/in/set-72157629757019923/
  • http://www.flickr.com/photos/elecnix/8289465011/in/set-72157629757019923/
  • http://www.flickr.com/photos/elecnix/8290525058/in/set-72157629757019923/
  • http://www.flickr.com/photos/elecnix/8289466231/in/set-72157629757019923/