To improve the user experience on this site we use cookies. I agree | I disagree

Preparing build environment

You will need some parts of the build environment regardless you want to build a Router App (User Module) or to (re-)build any opensource component of an ICR-OS.

While preparing a build environment for our Routers is almost a trivial task for an SW developer, it may prove cumbersome for an ordinary user who does not know fundamental things regarding software development, especially when developing for a Linux-based operating system.

For the right start, you need a 64-bit Linux-based OS box. A virtual machine running 64-bit Linux-based OS does a fine job too.

The instructions below are prepared for and tested on an Ubuntu machine and they are also working for a Debian GNU/Linux. If you are running an rpm-based distribution, you should change installation commands to fit your package management tool. Also, the package names could be different a bit as not every distribution packages every project in the same way. That said, some of our developers do prefer Fedora and that is a fine choice as well. If you are using another distribution (possibly without deb/rpm packages) chances are you are quite skilled in Linux-based OSes so you should be able to find your way around.

As for the development resources needed, we do publish all the necessary parts using the Bitbucket.

Cross-compiler

The first thing you would need for a real development is a cross compiler so that you can use your Linux box to produce binaries executable on your router.

The preparation of a cross compiler is pretty straightforward:

git clone https://bitbucket.org/bbsmartworx/Toolchains.git
sudo dpkg -i Toolchains/deb/*.deb

The first line above fetches the toolchains (compiler tools) into the directory you execute the shell command from. The second line instructs the package manager to install the toolchains into the Linux box (requires administration privileges).

At this point, the toolchains should be fully functional.

If your aim is solely to build the opensource components, you can continue to page Building opensource components. However, it is recommended to install the SDK as well. Also in the case you want to build Router Apps (User Modules) in C or C++, using the SDK gives you a lot of advantages compared to the situation when you develop from scratch.

Installing SDK and compiling the examples is very easy:

git clone https://bitbucket.org/bbsmartworx/ModulesSDK.git
make -C ModulesSDK

The first line above takes care about fetching the SDK sources. The second line builds the SDK and the examples. The successful build also proves that the toolchains were installed correctly. In the case the build does not succeed, please check the errors - there is a big chance you missed some problem during toolchains installation.

At this point, you are ready to start the development of Router Apps (User Modules) which you can later run on v2 and v3 generation of routers. If you are not a professional developer please refer to the simple Router Apps (User Modules) examples which are bundled with the ModulesSDK. You can have an easy start from one of these examples - at least to see how the build is done etc.