DNS 320 & 325 - Funplug 0.7 : Install Compilation Environment

Contents[Hide]

dropcap-dns325-gnu

This article explains how to easily setup a complete GNU compilation environment on your DNS-320 or DNS-325.

This will allow you to compile natively some very interesting applications to enhance your NAS possibilities.

This guide is based on fun_plug 0.7 which has to be installed as a pre-requisite.
Installation can be done following DNS 320 & 325 - Extend your NAS possibilities with Fun plug 0.7.
All following operations suppose that your are connected to the DNS-320 or DNS-325 console thru SSH or Telnet.

Thanks to Fonz, all compilation tools (GNU compiler, GNU autotools, Subversion tools & GIT) can be installed easily thru slacker.

1. GNU compiler & tools

Within slacker, you need to install (if not already) the following packages :

# slacker -a s:autoconf- s:automake- s:bash- s:binutils- s:bison- s:cmake- s:coreutils- s:curl- s:diffutils- s:flex- s:freetype- s:gcc- s:gcc-solibs- s:gettext- s:grep- s:gzip- s:icu4c- s:libiconv- s:libxml2- s:linux-headers- s:libtool- s:m4- s:make- s:mpfr- s:ncurses- s:patch- s:pcre- s:perl- s:pkg-config- s:readline- s:sed- s:shadow- s:uClibc- s:uClibc-solibs- s:tar- s:tcp_wrappers- s:textinfo- s:util-linux- s:wget- s:xz- s:zlib-

Make sure that all packages are installed, if not install them.

2. Subversion & GIT

Within slacker, you need to install (if not already) the following packages :

# slacker -a kylek:apr- kylek:apr-util- kylek:subversion- uli:neon-

# slacker -a uli:git- uli:sqlite-

3. Declare Compilation Environment

dropcap-gnuOnce all packages are installed, you need to declare the default variables used by GNU compilers.

The most important configuration is :

  • We are dealing with an armv5te CPU
  • Optimisation will be done with maximum 03 option
  • Include files are available under /ffp/include
  • Temporary compilation directory is on the HD under /ffp/tmp

For these variables to be available any time by any shell, we have to declare them at the end of default profile /ffp/home/root/.profile

/ffp/home/root/.profile

# set compilation environment
export CC="gcc"
export CXX="g++"
export GCC="-O3"
export CFLAGS="-march=armv5te -O3 -I/ffp/include"
export CCFLAGS="-march=armv5te -O3 -I/ffp/include"
export TMPDIR=/ffp/tmp
export CONFIG_SHELL=/ffp/bin/sh

4. Disable Optware

In case you have enabled Optware, it is advised to disable it during compilation time.

In fact, Optware may provide some compilation tools packages identical to slacker, but with older version.

To avoid any conflict, it is better to disable Optware during compilation process. You can disable it easily with :

# chmod -x /ffp/start/optware.sh

5. Reboot

Reboot your DNS-320 / DNS-325 and you are now ready to compile your first source code.

 

You are now ready to compile many interesting packages on your NAS   :-)

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus