User Tools

Site Tools


soft:confine-dist

Confine-dist

Confine-dist is the SDK used to generate the images for CONFINE nodes based on OpenWrt.

Confine-dist has its own Git repository and Redmine project site.

Starting from scratch with a Debian machine

Please install the Debian system leaving out extra software. A base system with SSH access will do. After you have finished the installation, please install the following software:

# apt-get install git subversion g++ ncurses-dev zlib1g-dev gawk flex \
      unzip bzip2 gettext build-essential \
      libncurses5-dev libncursesw5-dev \
      binutils cpp gcc make psmisc \
      linux-headers-$(uname -r) docbook-to-man

(Later on you will be able to run make defconfig in the openwrt/ directory of confine-dist to check for additional dependencies.)

How to compile

The following commands show how to use Git to check out a particular version of confine-dist and build a node image from it:

$ git clone http://git.confine-project.eu/confine.git confine-dist
$ cd confine-dist
$ git checkout VERSION  # optional, build a particular version
$ make all V=99

About the Makefile

Targets

make target
Execute everything needed to have the CONFINE node image. This is the default make target.
make prepare
Download OpenWrt source and package descriptions, update and fetch package descriptions in feeds.conf, and prepare a default configuration.
make menuconfig
Execute an ncurses menuconfig from OpenWrt and copy the resulting .config file inside my_configs/.
make kernel_menuconfig
Execute an ncurses menuconfig from the Linux kernel and copy the resulting .config file inside my_configs/.
make sync
Update and fetch package descriptions in feeds.conf, and prepare a default configuration. Needed when you update confine-dist code (git pull).
make clean
Cleans the bin/ and build_dir/ directories from OpenWrt's build directory.
make dirclean
Cleans the bin/, build_dir/, staging_dir/ and toolchain/ directories from OpenWrt's build directory.
make distclean
Removes everything you have compiled and configured -- it leaves OpenWrt's build directory like after a clean checkout.
make mrproper
Removes everything leaving just the original checked out files.

Variables

J
The number of parallel processes for compilation time.
V
Verbosity level.

For instance: make all V=99 J=4.

Directories

files/
All files you put inside this directory will be copied to OpenWrt's root filesystem.
packages/
All packages here will be copied inside OpenWrt's package/ directory. If you add a new package, remember to run make menuconfig to enable it.
my_configs/
When you execute a menuconfig or kernel_menuconfig, the new configuration files will be copied here.
images/
Output image directory.
openwrt/
OpenWRT source tree.

Warning: If you put or change any file in the my_configs/, files/ or packages/ directories, you need to run make sync for the OpenWrt build process to note the changes.

Output image

When compilation finishes, you will find the output images inside the images/ directory. If you need other kind of images (VMware, VirtualBox and so on) check inside the openwrt/bin/TARGET/ directory (where TARGET can be e.g. x86).

To copy the image in a compact flash or USB stick:

# dd if=images/IMAGE_FILE of=/dev/sdX
soft/confine-dist.txt · Last modified: 2013/02/19 16:40 by ivilata