Let the Good Times Roll !
Ici et là, au gré des vents – Daymz.com

I’ve been meaning to use my DNS323 NAS as some Private Cloud Sync for files I wanted to share-and-sync across several computers on my LAN, while retaining a centralized backup with weekly snapshots.

Unison is the perfect tool for this operation. It has a client and server model and runs on Linux and Windows. Problem #1: Unison is not available as a package for the DNS-323. Problem #2: Unison’s source is coded in OCAML. Problem #3: OCAML is not available as a DNS-323 package. Problem #4: Lack of any howto to build the OCAML compiler.

Installing OCAML v3.12.1 on the DNS-323

Step 1: Prerequisites

First, you must have fun_plug installed with all up-to-date packages rsync’d. I will not cover this as it’s already widely available from numerous blogs.

Second, let’s make sure you have all the necessary build tools. I hope I didn’t miss any.

# cd /ffp/pkg/packages
# funpkg -i binutils- automake-1.10.1-2.tgz autoconf-2.61-2.tgz flex-2.5.33-5.tgz bison-2.3-3.tgz patch-2.5.9-3.tgz gcc-4.1-2.tgz gettext-0.17-2.tgz make-3.81-3.tgz uclibc-0.9.29-7.tgz kernel-headers- bash-3.2-3.tgz

Step 2: Getting the source code for OCAML v3.12.1

At the time of writing, OCAML v4.01 is available. I decided to stick with v3.12 as I feared some potential backward compatibility issues with a new (recent) major revision.

# mkdir /mnt/HD_a2/build
# cd /mnt/HD_a2/build
# wget http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.1.tar.gz
# tar xvzf ocaml-3.12.1.tar.gz

Step 3: Build and install OCAML v3.12.1

In the commands below, we will first set the temporary directory to point to that of ffp’s tmp on the hard disk, in order to avoid out of space errors. Second, we will configure the build process specifically for the DNS-323.

# cd /mnt/HD_a2/build/ocaml-3.12.1
# export TMPDIR=/ffp/tmp
# ./configure -prefix /ffp -no-curses -no-tk -no-shared-libs -host arm-unknown-linux-uclibc -cc gcc\ -msoft-float

Next we will start the build process. I will leave out the « opt » builds (native) since I got too many errors and just gave up on it. You will notice an error while building « world » and « opt » (./build/ocamlbuild-byte-only.sh / make[1]: *** [ocamlbuild.byte] Error 1). Just ignore it, the most important components are still properly built. As a result, make install will also fail, but then again, the binaries we’re after have already been successfully built at that point.

# make world
# make opt
# make install

Done. OCAML v3.12.1 is now (at least partially) installed on your DNS-323.

Installing Unison v2.40 for the DNS-323

Unison’s home is http://www.cis.upenn.edu/~bcpierce/unison/. The latest stable version at time of writing is 2.40.102

# cd /mnt/HD_a2/build/
# wget http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.40.102.tar.gz
# tar xvzf unison-2.40.102.tar.gz

We will now start the build and install process.

# cd /mnt/HD_a2/build/unison-2.40.102
# make UISTYLE=text NATIVE=false STATIC=true
# make UISTYLE=text NATIVE=false STATIC=true install

The make will produce some errors as it will attempt to copy the executable (and other files) to the home directory of the current user. We don’t mind, we just need the « unison » executable.

# cd /mnt/HD_a2/build/unison-2.40.102
# cp ./unison /ffp/bin/
# chmod +x /ffp/bin/unison


You have now installed Unison v2.40 successfully on your D-Link DNS-323 NAS.

Next: Install and Configure Unison on your Windows 8 Computers

Here is the follow-up to this article: Installing Unison for 2-way Sync between Windows 8 and a DNS-323 NAS


  • http://forum.dsmg600.info/viewtopic.php?id=6678
  • http://www.crutzi.info/unison/binary/armel

Articles similaires


1 commentaire à propos de «Building Unison for the D-Link DNS-323 NAS for 2-way Sync»

  1. […] This part has been covered in details in the First Part of this Howto. Please read the following article: « Building Unison for the D-Link DNS-323 NAS for 2-way Sync » […]

Répondre à cet article

Tags HTML autorisés: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>