User Tools

Site Tools


How to compile the CONFINE distribution

This documentation tries to give a first time approach to compile the CONFINE distribution compilation. For more details on the OpenWRT Buildroot please see the following link. Besides the packages recommended there, you may also need to install gettext.

From Confine-dist SDK

First clone the CONFINE image source to your local machine.

git clone confine-dist
cd confine-dist
git checkout testing

The last parameter is the name of the folder that will contain the project. As Git permits branching in project creation, we may want to switch to the testing branch. This allows us to have the most updated version of the project (other versions may be outdated). For this we can type git checkout testing. The git status command may be used for checking what branch we're working on.

To prepare your workspace for the following steps run:

make SPECIFICS=i686 prepare

This will also download the OpenWRT files. For more details see the Makefile. Doing the third step directly will include the make prepare.

Note that enabling i686 support adds some kernel features such as SMT, SMP and PAE that require a Pentium Pro-compatible CPU. If you don't need these features or you only have a Pentium-compatible CPU (like those in older Alix boards), use SPECIFICS=i586. You may also skip the SPECIFICS option altogether and it will compile a generic 486 image.

By default the basic packages required to run a Community-Lab node will be selected, but if you want to select extra packages you can run:

make menuconfig

In addition if you want to configure the kernel options (to enable 64bit support for instance) you can run:

make kernel_menuconfig

When everyting is propperly configured you can start the compilation process:

make SPECIFICS=i686 J=2 all

This will compile the image using two parallel processes (J=2). You can also specify the verbosity level (V=99). If you want to prepare an OpenWrt Image Generator archive you may also specify IMAGEBUILDER=y (this is enabled when building mainstream CONFINE images).

The compilation can last an hour or more depending your computer.

From raw OpenWRT as a feed

Compiling from raw OpenWRT means mainly to do manually what the Makefile from confine-dist does. It might be useful if you are already using a specific OpenWRT Buildroot and you want to add the Community-Lab packages.

This method is only for advanced users.

The current CONFINE testing branch is compatible only with OpenWRT 14.07 (Barrier Braker).

These are the steps to follow if you want to compile CONFINE as a feed for OpenWRT:

git clone git://
cd openwrt/
cp feeds.conf.default feeds.conf
echo "src-git confine gitosis at;testing" >> feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
echo "CONFIG_TARGET_x86=y" > .config
echo "CONFIG_TARGET_x86_generic=y" >> .config
echo "CONFIG_TARGET_x86_generic_Generic=y" >> .config
echo "CONFIG_PACKAGE_confine-community-lab=y" >> .config
make defconfig
make -j2

As expected, you must add your our specific configuration typing make menuconfig. At this point we need to find out which architecture will be running on our OS.

A package selected with [M] denotes that it will be compiled but won't be included with the resulting image, but [*] will do so.

We should at least choose in the Base System main menu option the confine-system package. For more features choose confine-community-lab which includes the confine-system package.

This Makefile also allows compiling using more processors via the -j flag.

More documentation

soft/howto-compile-confine.txt · Last modified: 2016/10/25 13:27 by ivilata