LibreMesh firmware build tool
LiMe build is a tool to easily and locally compile a LibreMesh firmware image. It also creates a development environment.
It consists in a Makefile file, so it is executed using the GNU "make" command.
CopyRight libremesh.org / Distributed under license GPLv3
Get in Touch with LibreMesh Community
The project offers the following mailing lists
- firstname.lastname@example.org - This list is used for general development related work.
- email@example.com - This list is used for project organizational purposes. And for user specific questions.
The project uses an IRC channel on freenode.net
- #libremesh-dev - a public channel for everyone to join and participate
Preparing the Compilation Environment
sudo apt-get install \ git subversion zlib1g-dev gawk flex unzip bzip2 gettext build-essential \ libncurses5-dev libncursesw5-dev libssl-dev binutils cpp psmisc docbook-to-man
Additionally, if your system is 64bits
sudo apt-get install gcc-multilib
An example of basic usage would be:
make T=ar71xx P=generic J=4
- T indicates the target
- P indicates the profile
- J indicates the number of cores to use
Target makes reference to hardware architecture or a specific hardware device.
Profile references to a libremesh flavour, the generic one is the standard but each community network might has its own.
To see the list of targets/profiles available type:
To compile an image for hardware with less than 4 MB of flash memory
make T=ar71xx-mini P=basic
To include more packages than the profile ones
make T=ar71xx PACKAGES="pkg1 pkg2..."
To specify manually the list of the packages using a void profile
make T=ar71xx P=custom PACKAGES="pkg1 pkg2..."
To work in developer mode (uses lime read-write repository)
make DEV=1 T=ar71xx P=generic
Or to use your own LiMe packages git repository and/or OpenWRT/LEDE (must be executed the first time make is invoked or after a make clean).
make LIME_GIT="http://foo.git" T=ar71xx P=generic OWRT_GIT="http://foo.git"
To synchronize config files from configs/ dir to existing target
make T=ar71xx sync_config
If you need extra packages launch menuconfig before compiling (from openwrt):
make T=ar71xx menuconfig
After that, the new config file will be applied to destination target and also it will by copied to build/configs directory
To run kernel menuconfig (from openwrt), in this case config file will be not copied because it is not directly compatible with configs/target/kernel_config:
make T=ar71xx kernel_menuconfig
To run just the initial code checkout:
make T=ar71xx checkout
To clean all:
To clean just lime packages from a target
make T=ar71xx clean_lime
Branches in lime-build
The idea behind lime-build is to use one branch per each lime-packages branch. So to compile the lime-packages branch "develop" the lime-build branch develop must be used (same for releases).
The default branch is always the last stable release. If you need to compile another branch of LibreMesh (list of the existing branches) you can easy change it using git. To list the available branches:
git branch -a
To switch to a specific lime-build branch:
git checkout <your favorite branch>
Note that a lime branch involves a specific OpenWRT/LEDE branch and also a specific set of feeds. So using lime-build branch develop to compile lime-packages branch release XX.YY would probably result in a non working firmware. Anyway if you want to try this you can specify which branch of lime-packaged has to be used in combination with current lime-build branch (UPDATE=1 might be required in order to fetch the branch files).
make T=ar71xx LIME_GIT_BRANCH=develop UPDATE=1
There are several directories and files. This is the functionality for each of them:
Makefile: the main makefile
targets.mk: contains all information related with targets.
profiles.mk: contains all information related with profiles.
build: directory with source files
build/configs: if you do some change in config file using "menuconfig" option, the new config is saved here
dl: download folder for OpenWRT packages
targets: config files for each kind of hardware.
output: output directory for compiled images firmwares
files: everything inside will be directly copied to the root of the system firmware image
scripts: special directory to execute scripts before and/or after the compilation process, see scripts/README