Setup a fixed ip-address:

root@raspberrypi:~# vi /etc/network/interfaces
auto eth0
allow-hotplug eth0
iface eth0 inet static
  address 192.168.1.84
  netmask 255.255.255.0
  network 192.168.1.0
  broadcast 192.168.1.255
  gateway 192.168.1.1

Setup DNS servers:

root@raspberrypi:~# vi /etc/resolv.conf
# Generated by resolvconf
domain waoo.dk
nameserver 80.71.82.82
nameserver 80.71.82.83

Set hostname:

root@raspberrypi:/etc# vi /etc/hosts

192.168.1.84    cncctrl
192.168.1.200   media

Remove DHCP:

root@cncctrl:~# apt-get purge dhcp3-client dhcp3-common isc-dhcp-client isc-dhcp-common
root@cncctrl:~# update-rc.d -f dhcpcd remove

Add yourself as user:

root@cncctrl:~# adduser --ingroup dialout michael
Adding user `michael' ...
Adding new user `michael' (1001) with group `dialout' ...
Creating home directory `/home/michael' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for michael
Enter the new value, or press ENTER for the default
    Full Name []: Michael Jacobsen
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
Is the information correct? [Y/n] y

root@cncctrl:~# visudo

michael ALL=(ALL) NOPASSWD: ALL

Disable the 'pi' user:

root@cncctrl:~# passwd -l pi
root@cncctrl:~# visudo

#pi ALL=(ALL) NOPASSWD: ALL

Build the BOSSAC tool:

root@cncctrl:~# apt-get install libwxgtk2.8-dev libx11-dev libreadline-dev
root@cncctrl:~# mkdir bossac-arduino
root@cncctrl:~# cd bossac-arduino
root@cncctrl:~/bossac-arduino# git clone https://github.com/shumatech/BOSSA.git
root@cncctrl:~/bossac-arduino# cd BOSSA
root@cncctrl:~/bossac-arduino/BOSSA# git checkout arduino
root@cncctrl:~/bossac-arduino/BOSSA# vi Makefile
Change WXVERSION=3.0 to WXVERSION=2.8
root@cncctrl:~/bossac-arduino/BOSSA# make
root@cncctrl:~/bossac-arduino/BOSSA# cp bin/* /usr/bin

Get USB helper tool:

root@cncctrl:~# apt-get install python-pyudev screen
root@cncctrl:~# cd /opt
root@cncctrl:/opt# mkdir find_port
root@cncctrl:/opt# cd find_port/
root@cncctrl:/opt/find_port# wget https://raw.githubusercontent.com/dhylands/usb-ser-mon/master/find_port.py
root@cncctrl:/opt/find_port# chmod +x find_port.py

To get Native Port:

root@cncctrl:/opt/find_port# ./find_port.py --vid 1d50
/dev/ttyACM1

-- or --

root@cncctrl:/opt/find_port# ./find_port.py --vendor Synthetos
/dev/ttyACM1

To get Programming port:

root@cncctrl:/opt/find_port# ./find_port.py --vid 2341
/dev/ttyACM0

Build GO:

root@cncctrl:~# cd /opt
root@cncctrl:/opt# git clone https://go.googlesource.com/go
root@cncctrl:/opt# cd go
root@cncctrl:/opt/go# git checkout go1.4.2
root@cncctrl:/opt/go# cd src
root@cncctrl:/opt/go/src# ./all.bash
root@cncctrl:/opt/go/src# vi /etc/profile

Build Serial Port JSON Server:

root@cncctrl:~# cd
root@cncctrl:~# mkdir go
root@cncctrl:~# cd go
root@cncctrl:~/go# GOPATH=/root/go;export GOPATH
root@cncctrl:~/go# go get github.com/johnlauer/serial-port-json-server
root@cncctrl:~/go# src/github.com/johnlauer/serial-port-json-server
root@cncctrl:~/go/src/github.com/johnlauer/serial-port-json-server# go build
root@cncctrl:~/go/src/github.com/johnlauer/serial-port-json-server# mkdir /opt/serial-port-json-server_1.82
port-json-server# mkdir /opt/serial-port-json-server_1.82
root@cncctrl:~/go/src/github.com/johnlauer/serial-port-json-server# cp serial-port-json-server /opt/serial-port-json-server_1.82
root@cncctrl:~/go/src/github.com/johnlauer/serial-port-json-server# ln -s /opt/serial-port-json-server_1.82 /opt/serial-port-json-server
root@cncctrl:~# vi /etc/init.d/serial-port-json-server

#! /bin/sh
### BEGIN INIT INFO
# Provides:          serial-port-json-server
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Manage my cool stuff
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

case "$1" in
  start)
    log_begin_msg "Starting Serial Port JSON Server service"
    /opt/serial-port-json-server/serial-port-json-server -regex usb &
    log_end_msg $?
    exit 0
    ;;
  stop)
    log_begin_msg "Stopping the Serial Port JSON Server"

    # do something to kill the service or cleanup or nothing
    killall serial-port-json-server
    log_end_msg $?
    exit 0
    ;;
  *)
    echo "Usage: /etc/init.d/serial-port-json-server {start|stop}"
    exit 1
    ;;
esac

root@cncctrl:~# chmod +x /etc/init.d/serial-port-json-server
root@cncctrl:~# update-rc.d serial-port-json-server defaults
root@cncctrl:~# service serial-port-json-server start

Create a script to help in flashing the Arduino Due:

root@cncctrl:~# mkdir /opt/flash
root@cncctrl:~# cd /opt/flash
root@cncctrl:/opt/flash# vi flash.sh

#!/bin/bash
set -x
sudo service serial-port-json-server stop

PORT=$(/opt/find_port/find_port.py --vid 2341)

# Activate the bootloader
stty -F ${PORT} 1200
stty -F ${PORT} 9600
sleep 3

# Program
bossac -e -w -v -i -b -R /mnt/media/cncctrl/flash/$1

sudo service serial-port-json-server start

root@cncctrl:/opt/flash# chmod +x flash.sh

Setup fileshare:

root@cncctrl:~# cd
root@cncctrl:~# mkdir /mnt/media
root@cncctrl:~# echo username=you > .smbpasswd
root@cncctrl:~# echo password=YourPassword >> .smbpasswd
root@cncctrl:~# chmod 600 .smbpasswd
root@cncctrl:~# vi /etc/fstab
//media/data    /mnt/media    cifs    auto,gid=users,file_mode=0664,dir_mode=0775,iocharset=iso8859-15,credentials=/root/.smbpasswd 0 0
root@cncctrl:~# mount -a