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
Once 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 :-)
- DNS 320 & 325 - Extend your NAS possibilities with Funplug 0.7
- DNS 325 - Funplug 0.7 : Install Transmission p2p client
- DNS 325 - Funplug 0.7 : Install Twonkymedia Server 7
- DNS 323 & 325 - Funplug : Send mail from shell scripts using your Gmail account
- DNS 325 - Funplug 0.7 : Move Fun plug to a USB key
- DNS 320 & 325 - Funplug 0.7 : Install Compilation Environment
- DNS 325 - Funplug 0.7 : Compile x264, lame, shine, fdk-aac, twolame, ffmpeg and sox
- DNS-325 - Funplug 0.7 : Subsonic server with realtime MP3 and AAC transcoding
- DNS 325 - Funplug 0.7 : SSLH ... share port 443 for Https, Ssh, OpenVPN and Tinc
- DNS 325 - Funplug 0.7 : Administrate your NAS with Ajaxterm
- DNS 325 - Funplug 0.7 : Supervise your NAS thru SNMP
- DNS 325 - Funplug 0.7 : Supervise Fan Speed and Case & HDD temperature with SNMP
- DNS 320, 323 & 325 - Funplug 0.7 : Install a Munin node with Muninlite
- DNS 325 - Funplug 0.7 : Setup your NAS as a Permanent BTSync Peer
- DNS 320L - Funplug 0.7 : Supervise Fan Speed and Case & HDD temperature with Munin
- DNS 320 & 325 - Funplug 0.7 : Update wget to handle latest SSL & TLS