« Previous - Version 11/15 (diff) - Next » - Current version
Ilario Gelmetti, 05/31/2015 08:42 am
added link to configuration page


Compile Manually

Starting from a new compilation of OpenWrt

Resources needed:

Probably a Linux based operating system.

Some tools for the compilation process, on Debian:

apt-get install git build-essential libncurses5-dev zlib1g-dev gawk subversion

About 9 GB of disk space.

About 3 hours of compilation time.

Download OpenWrt 14.07.

git clone git://git.openwrt.org/14.07/openwrt.git

Add our repositories to the default ones.

cd openwrt
cp feeds.conf.default feeds.conf
echo "src-git libremap git://github.com/libremap/libremap-agent-openwrt.git" >> feeds.conf
echo "src-git lime https://github.com/libre-mesh/lime-packages.git" >> feeds.conf

If you want to use a specific branch of lime-packages specify it adding ;nameofthebranch at the end of the last line. For example:

src-git lime https://github.com/libre-mesh/lime-packages.git;develop

Download all these packages and put sources in the right place.

scripts/feeds update -a
scripts/feeds install -a

Then enter the OpenWrt configuration menu.

make menuconfig

Go in "Base system" and deselect "dnsmasq" (this is the IPv4 version which conflicts with Libre-Mesh, the IPv6 version will be automatically selected).

Exit from "Base system" end enter in "LiMe", select what you want (for example everything or everything except reghack and lime-full), exit.

If you need to compile images only for one type of devices you could specify the type in the menu "Target system" and "Target profile", otherwise keep the default and images for each profile will be produced. Exit and save.

Launch the compilation. The make -j [number] makes the compiler use multiple cores. If you have more than 2 cores, change to the appropriate number.

make -j 3

But if you encounter some errors (maybe related to network connectivity problems) it's better to clean up with

make clean

and compile without the -j option.

make

Flash on your devices, optionally change the default configuration, and enjoy!

Using lime-build

Resources needed:

Probably a Linux based operating system.

Some tools for the compilation process, on Debian:

apt-get install git build-essential libncurses5-dev zlib1g-dev gawk subversion

About 9 GB of disk space.

About 3 hours of compilation time.

Download the lime-build source:

git clone https://github.com/libre-mesh/lime-build.git

Have a look at the list of devices supported by lime-build:

make list_targets

if you see your device you can continue with this guide, otherwise you have to use the instructions in the section "Starting from a new compilation of OpenWrt".

Compile specifying the target device in T= and roughly the number of CPU cores plus one in J=. That is, for compiling on a dual core computer the image for Ubiquiti NanoStation M5:

make J=3 T=nsm5 build

You'll find the compiled images in the directory images.

Other options for lime-build are documented here: https://github.com/libre-mesh/lime-build/blob/master/README.md

Updating a previous compilation of Libre-Mesh

Enter the base directory of the previous compiled image, for example

cd ~/openwrt

Remove the unnecessary previously compiled files.

make clean

Update the OpenWrt source code.

git pull

Update the Libre-Mesh package source code.

scripts/feeds update -a
scripts/feeds install -a

Launch the compilation. The make -j [number] makes the compiler use multiple cores. If you have more than 2 cores, change to the appropriate number.

make -j 3

If you encounter some errors try compiling without the -j option or cleaning completely the installation environment

make clean
make dirclean
rm -rf feeds/*

and restart from the top of this section about updating.