How to build megadl on your Synology DS215j

Optware Bootstrap

Set up 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

Create the optware root directory

mkdir /volume1/@optware
mv /opt/* /volume1/@optware/
rm -r /opt
ln -s /volume1/@optware /opt

Add /opt
to PATH

Add the following line to /root/.profile or if you are using a user-account to get SSH access /home/username/.bashrc or the ZSH equivalent /home/username/.zshrc.

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

Set up the init-scripts

Create the folder where the script will be placed.

mkdir -p /usr/local/etc/rc.d/

/usr/local/etc/rc.d/optware.sh
:

#!/bin/sh
#
# Optware setup
# Alternatives Optware Startup und Shutdown Script #/usr/local/etc/rc.d/optware.sh
#
case $1 in
start)
       [ ! -h /opt -a ! -d /opt ] && ln -s /volume1/@optware /opt
       for i in /opt/etc/init.d/S??* ;do
#
               # Ignore dangling symlinks (if any).
               [ ! -f "$i" ] && continue
#
               case "$i" in
                  *.sh)
                       # Source shell script for speed.
                       (
                               trap - INT QUIT TSTP
                               set start
                               . $i
                       )
                       ;;
                  *)
                       # No sh extension, so fork subprocess.
                       $i start
                       ;;
               esac
       done
       ;;
#
stop)
#
       for i in /opt/etc/init.d/S??* ;do
#
               # Ignore dangling symlinks (if any).
               [ ! -f "$i" ] && continue
#
               case "$i" in
                  *.sh)
                       # Source shell script for speed.
                       (
                               trap - INT QUIT TSTP
                               set stop
                              . $i
                       )
                       ;;
                  *)
                       # No sh extension, so fork subprocess.
                       $i stop                       ;;
               esac
         done
         ;;
#
*)
         echo "Usage: $0 [start|stop]"
         ;;
esac
#
# End

Make it executable.

chmod +x /usr/local/etc/rc.d/optware.sh

Then reboot.

reboot

Install packages with ipkg

Update the packages list and install packages that you need (like gawk
etc.).

ipkg update
ipkg install [YOUR PACKAGES] # I forget to take notes

Build megadl

Download toolchains from sourceforge
and export correct paths.

Download megatools
, unzip, configure, make, and you can build now.

稿源:Perfect Freeze! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 移动互联 » How to build megadl on your Synology DS215j

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录