{"id":715,"date":"2015-01-02T23:40:08","date_gmt":"2015-01-02T21:40:08","guid":{"rendered":"http:\/\/thogersens.net\/?p=715"},"modified":"2015-01-02T23:40:08","modified_gmt":"2015-01-02T21:40:08","slug":"bootstrap-ds414-on-dsm-5-0","status":"publish","type":"post","link":"https:\/\/jakobsens.net\/?p=715","title":{"rendered":"Bootstrap DS414 on DSM 5.0"},"content":{"rendered":"<h2>Install ipkg on a ds414 DSM 5<\/h2>\n<p>Actually there is no xsh bootstrap for the ds414 (Marvell Armada XP armv7l) although the existing Marvell Kirkwood mv6281 binaries &#8220;are ~ compatible&#8221; (<a href=\"http:\/\/ipkg.nslu2-linux.org\/feeds\/optware\/cs08q1armel\/\">http:\/\/ipkg.nslu2-linux.org\/feeds\/optware\/cs08q1armel\/<\/a>). So this is a small guide to setup manually the optware environment, which based partly on <a href=\"https:\/\/github.com\/trepmag\/ds213j-optware-bootstrap\">trepmag&#8217;s guide<\/a> &#8211; many thanks.<\/p>\n<h2>Create optware root directory<\/h2>\n<pre>$ mkdir \/volume1\/@optware\r\n$ mkdir \/opt\r\n$ mount -o bind \/volume1\/@optware \/opt\r\n<\/pre>\n<h2><a class=\"anchor\" href=\"https:\/\/github.com\/trepmag\/ds213j-optware-bootstrap#setup-ipkg\" name=\"user-content-setup-ipkg\"><\/a><\/h2>\n<pre><code>wget http:\/\/ipkg.nslu2-linux.org\/feeds\/optware\/cs08q1armel\/cross\/stable\/syno-mvkw-bootstrap_1.2-7_arm.xsh\r\nchmod 700 syno-mvkw-bootstrap_1.2-7_arm.xsh\r\nsh syno-mvkw-bootstrap_1.2-7_arm.xsh\r\n<\/code><\/pre>\n<p>Edit the bootstrap.sh file<\/p>\n<pre><code>vi bootstrap.sh\r\n<\/code><\/pre>\n<p>disable these lines by adding the # as line prefix<\/p>\n<pre><code>#if [ -e \"$REAL_OPT_DIR\" ] ; then\r\n#    echo \"Backup your configuration settings, then type:\"\r\n#    echo \"  rm -rf $REAL_OPT_DIR\"\r\n#    echo \"  rm -rf \/usr\/lib\/ipkg\"\r\n#    echo \"This will remove all existing optware packages.\"\r\n#    echo\r\n#    echo \"You must *reboot* and then restart the bootstrap script.\"\r\n#    exit 1\r\n#fi\r\n\r\n#if ! grep Feroceon-KW \/proc\/cpuinfo &gt;\/dev\/null 2&gt;&amp;1; then\r\n#    echo \"Error: CPU not Marvell Kirkwood, probably wrong bootstrap.xsh\"\r\n#    exit 3\r\n#fi\r\n<\/code><\/pre>\n<h2>Run bootstrap<\/h2>\n<pre><code>sh bootstrap.sh\r\n<\/code><\/pre>\n<p>Reboot your diskstation<\/p>\n<p><code>\/opt\/bin\/ipkg update <\/code><\/p>\n<p><code>\/opt\/bin\/ipkg list <\/code><\/p>\n<p><code>\/opt\/bin\/ipkg install pkg<br \/>\n<\/code><\/p>\n<h2>Set PATH<\/h2>\n<p>Add the following line to \/etc\/profile:<\/p>\n<pre>PATH=\/opt\/bin:\/opt\/sbin:$PATH\r\n<\/pre>\n<h2><a class=\"anchor\" href=\"https:\/\/github.com\/trepmag\/ds213j-optware-bootstrap#create-init-scripts\" name=\"user-content-create-init-scripts\"><\/a>Create init scripts<\/h2>\n<p>The following steps will allow to automatically bind the \/volume1\/@optware directory to \/opt and trigger the \/opt\/etc\/init.d\/* scripts.<\/p>\n<p>Create the \/etc\/rc.local file (chmod 755) and insert:<\/p>\n<pre>#!\/bin\/sh\r\n\r\n# Optware setup\r\n[ -x \/etc\/rc.optware ] &amp;&amp; \/etc\/rc.optware start\r\n<\/pre>\n<p>Create the \/etc\/rc.optware file (chmod 755) and insert:<\/p>\n<pre>#! \/bin\/sh\r\n\r\nif test -z \"${REAL_OPT_DIR}\"; then\r\n# next line to be replaced according to OPTWARE_TARGET\r\nREAL_OPT_DIR=\/volume1\/@optware\r\nfi\r\n\r\ncase \"$1\" in\r\n    start)\r\n        echo \"Starting Optware.\"\r\n        if test -n \"${REAL_OPT_DIR}\"; then\r\n            if ! grep ' \/opt ' \/proc\/mounts &gt;\/dev\/null 2&gt;&amp;1 ; then\r\n                mkdir -p \/opt\r\n                mount -o bind ${REAL_OPT_DIR} \/opt\r\n            fi  \r\n        fi\r\n    [ -x \/opt\/etc\/rc.optware ] &amp;&amp; \/opt\/etc\/rc.optware\r\n    ;;\r\n    reconfig)\r\n    true\r\n    ;;\r\n    stop)\r\n        echo \"Shutting down Optware.\"\r\n    true\r\n    ;;\r\n    *)\r\n        echo \"Usage: $0 {start|stop|reconfig}\"\r\n        exit 1\r\nesac\r\n\r\nexit 0\r\n<\/pre>\n<p>(source: a working optware env)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;are ~ compatible&#8221; (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&#8217;s guide &#8211; many thanks. Create optware root [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-715","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/jakobsens.net\/index.php?rest_route=\/wp\/v2\/posts\/715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jakobsens.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jakobsens.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jakobsens.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jakobsens.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=715"}],"version-history":[{"count":3,"href":"https:\/\/jakobsens.net\/index.php?rest_route=\/wp\/v2\/posts\/715\/revisions"}],"predecessor-version":[{"id":718,"href":"https:\/\/jakobsens.net\/index.php?rest_route=\/wp\/v2\/posts\/715\/revisions\/718"}],"wp:attachment":[{"href":"https:\/\/jakobsens.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jakobsens.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jakobsens.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}