Bootstrap DS414 on DSM 5.0

Install ipkg on a ds414 DSM 5

Actually there is no xsh bootstrap for the ds414 (Marvell Armada XP armv7l) although the existing Marvell Kirkwood mv6281 binaries “are ~ compatible” (http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/). So this is a small guide to setup manually the optware environment, which based partly on trepmag’s guide – many thanks.

Create optware root directory

$ mkdir /volume1/@optware
$ mkdir /opt
$ mount -o bind /volume1/@optware /opt

wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/syno-mvkw-bootstrap_1.2-7_arm.xsh
chmod 700 syno-mvkw-bootstrap_1.2-7_arm.xsh
sh syno-mvkw-bootstrap_1.2-7_arm.xsh

Edit the bootstrap.sh file

vi bootstrap.sh

disable these lines by adding the # as line prefix

#if [ -e "$REAL_OPT_DIR" ] ; then
#    echo "Backup your configuration settings, then type:"
#    echo "  rm -rf $REAL_OPT_DIR"
#    echo "  rm -rf /usr/lib/ipkg"
#    echo "This will remove all existing optware packages."
#    echo
#    echo "You must *reboot* and then restart the bootstrap script."
#    exit 1
#fi

#if ! grep Feroceon-KW /proc/cpuinfo >/dev/null 2>&1; then
#    echo "Error: CPU not Marvell Kirkwood, probably wrong bootstrap.xsh"
#    exit 3
#fi

Run bootstrap

sh bootstrap.sh

Reboot your diskstation

/opt/bin/ipkg update

/opt/bin/ipkg list

/opt/bin/ipkg install pkg

Set PATH

Add the following line to /etc/profile:

PATH=/opt/bin:/opt/sbin:$PATH

Create init scripts

The following steps will allow to automatically bind the /volume1/@optware directory to /opt and trigger the /opt/etc/init.d/* scripts.

Create the /etc/rc.local file (chmod 755) and insert:

#!/bin/sh

# Optware setup
[ -x /etc/rc.optware ] && /etc/rc.optware start

Create the /etc/rc.optware file (chmod 755) and insert:

#! /bin/sh

if test -z "${REAL_OPT_DIR}"; then
# next line to be replaced according to OPTWARE_TARGET
REAL_OPT_DIR=/volume1/@optware
fi

case "$1" in
    start)
        echo "Starting Optware."
        if test -n "${REAL_OPT_DIR}"; then
            if ! grep ' /opt ' /proc/mounts >/dev/null 2>&1 ; then
                mkdir -p /opt
                mount -o bind ${REAL_OPT_DIR} /opt
            fi  
        fi
    [ -x /opt/etc/rc.optware ] && /opt/etc/rc.optware
    ;;
    reconfig)
    true
    ;;
    stop)
        echo "Shutting down Optware."
    true
    ;;
    *)
        echo "Usage: $0 {start|stop|reconfig}"
        exit 1
esac

exit 0

(source: a working optware env)

2 thoughts on “Bootstrap DS414 on DSM 5.0

Leave a Reply