Skip to content

bastbnl/ds213j-optware-bootstrap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

ds213j-optware-bootstrap (manual)

Synology ds213j optware manual bootstrap guide.

Introduction

Actually there's no xsh bootstrap for the ds213j (Marvell Armada 370 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 (ipkg, PATH and init scripts). You should be able to login as root on your Synology.

Create optware root directory

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

Setup ipkg

$ feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
$ ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}'`
$ wget $feed/$ipk_name
$ tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -
$ mkdir -p /opt/etc/ipkg
$ echo "src cross $feed" > /opt/etc/ipkg/feeds.conf

(source http://www.nslu2-linux.org/wiki/Optware/HomePage)

Set PATH

Add the following line to /etc/profile before the export PATH line:

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

Source the profile if you want to able to use ipkg from now on:

. /etc/profile

You'll be able to use ipkg anyway when you logon to the Synology.

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)

Check init scripts

Make sure the scripts you've just created are syntax error free:

sh -n /etc/rc.local
sh -n /etc/rc.optware

These commands should not produce any output.

About

Synology ds213j (manual) optware bootstrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published