Editing Overview on modifying the Synology Server, bootstrap, ipkg etc

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
==Welcome==
==Welcome==
Welcome to the [http://forum.synology.com/wiki/index.php/Modifications modifications] section of the Synology Wiki. In the [http://forum.synology.com/wiki/index.php/Modifications modifications] section you will find content produced by '''users''' of Synology Servers enabling you to expand on or change the functionality provided by the standard Synology Firmware.
Welcome to the modifications section of the Synology Wiki. In this section you will find content produced by '''users''' of Synology Servers enabling you to expand on or change the functionality provided by the standard Synology Firmware.


This wiki page will help you understand what is involved and help you to get started modding your Synology server. It is assumed you have already read the [[General Disclaimer on Modifying the Synology Server]]?!
This wiki page will help you understand what is involved and help you to get started modding your Synlogy server. It is assumed you have already read the [[General Disclaimer on Modifying the Synology Server]]?!


Again the [http://forum.synology.com/wiki/index.php/Modifications modifications] Wiki area is produced by users like you, if you find a Wiki page unclear or lacking detail, or you find out how to do something that is not covered by a Wiki, then please improve this wiki area, it is simple to do and helps us all.
Again this Wiki area is produced by users like you, if you find a Wiki page unclear or lacking detail, or you find out how to do something that is not covered by a Wiki, then please improve this wiki area, it is simple to do and helps us all.


==What is a Synology Server==
==What is a Synology Server==
Line 12: Line 12:
Despite not being a PC, using the provided management web interface and the [[Modifications|Command Line Interface]] you can take full control of the device, change the way it operates and install additional software. Much of the software is available free of charge produced by users like you. There can be many advantages to using a device such as a Synology Server rather than a PC, small footprint, low power consumption, and dedication to the set tasks.
Despite not being a PC, using the provided management web interface and the [[Modifications|Command Line Interface]] you can take full control of the device, change the way it operates and install additional software. Much of the software is available free of charge produced by users like you. There can be many advantages to using a device such as a Synology Server rather than a PC, small footprint, low power consumption, and dedication to the set tasks.


However, modifying your NAS will invalidate your software support warranty, although not normally your hardware warranty, as described in [[General Disclaimer on Modifying the Synology Server]]. Modifying your Synology Server is also not without considerable risk of making it either temporarily unstable or temporarily unuseable. In virtually all cases the Synology Server can be returned to its former as new condition (in software terms) by fully re-installing the Synology firmware. Re-installing the firmware can (but not normally) result in losing your data, so ensure you have a backup of your data before modifying the NAS.
However, modifying your NAS will invalidate your software support warranty, although not normally your hardware warranty, as described in [[General Disclaimer on Modifying the Synology Server]]. Modifying your Synology Server is also not without considerable risk of making it either temporarily unstable or temporarily unuseable. In virtually all cases the Synology Server can be returned to its former as new condition (in software terms) by fully re-installing the Synology firmware. Re-installing the firmware can (but not normally) result in loosing your data, so ensure you have a backup of your data before modifying the NAS.


==What do I need to do==
==What do I need to do==
Line 64: Line 64:
A bootstrap is a script that installs ipkg. The bootstraps are specific to the processor in your Synology Server, so make sure you use a compatible one, see [[What kind of CPU does my NAS have]].
A bootstrap is a script that installs ipkg. The bootstraps are specific to the processor in your Synology Server, so make sure you use a compatible one, see [[What kind of CPU does my NAS have]].


You may want to check the forum to see if there are any latter bootstraps than those given below. However the ones below have been widely used and are known to work. If you are an experienced linux user the page [[How to Install Bootstrap]] gives clear instructions how to install '''ipkg''', you may find it more concise and therefore quicker to follow than the more detailed information provided below for beginers.
You may want to check the forum to see if their are any latter bootstraps than those given below. However the ones below have been widely used and are known to work. If you are an experienced linux user the page [[How to Install Bootstrap]] gives clear instructions how to install '''ipkg''', you may find it more concise and therefore quicker to follow than the more detailed information provided below for beginers.


Popular Bootstraps are:
Popular Bootstraps are:
Line 70: Line 70:
For Intel XScale FW IXP420 BB ARM Processor
For Intel XScale FW IXP420 BB ARM Processor
[http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ds101-bootstrap_1.0-4_armeb.xsh http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ds101-bootstrap_1.0-4_armeb.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/] as its feed.
[http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ds101-bootstrap_1.0-4_armeb.xsh http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ds101-bootstrap_1.0-4_armeb.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/] as its feed.
For Intel Atom CPU's: D410, D425, D510, D525 and D2700 Processors
[http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/] as its feed.


For 8241 PPC models
For 8241 PPC models
[http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/ds101-bootstrap_1.0-4_powerpc.xsh http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/ds101-bootstrap_1.0-4_powerpc.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/] as its feed.
[http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/ds101-bootstrap_1.0-4_powerpc.xsh http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/ds101-bootstrap_1.0-4_powerpc.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/] as its feed.
For 8533 PPC models - Please use the bootstrap for the 8543 PPC CPU (see below). That bootstrap is compatible with both 8533 and 8543 CPU's


For 8543 PPC models
For 8543 PPC models
[http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-7_powerpc.xsh http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-7_powerpc.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/] as its feed.
[http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-5_powerpc.xsh http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-5_powerpc.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/] as its feed.


For mv5281 ARM models
For mv5281 ARM models
[http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/] as its feed.
[http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-5_arm.xsh http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-5_arm.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/] as its feed.


For Marvel Kirkwood mv6281 ARM models
For Marvel Kirkwood mv6281 ARM models
[http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/] as its feed.
[http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-5_arm.xsh http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-5_arm.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/] as its feed.
 
For Marvel Kirkwood mv6282 ARM models (which are compatible with the mv6281 for as far as we can tell)
a modified syno-mvkw-bootstrap_1.2-7_arm.xsh with a bit more relaxed CPU checking:
[http://web.archive.org/web/20121005035819/http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh http://web.archive.org/web/20121005035819/http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh] which uses [http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/] as its feed.


For Freescale PowerPC QorIQ P1022 - Please use the same boostrap as for 8543 and 8553 PPC CPUs. Since they are all e500 CPUs, they share the same compiled binaries.
The bootstraps are .xsh files. To install a .xsh file (and therefore the bootstrap):
 
The steps to install the bootstrap (provided as .xsh files) are below, you should replace the text in '''bold''' with the relevant text for your CPU's bootstrap file (listed above).
#Reboot your NAS.
#Reboot your NAS.
#Enable and then Login to the [[Modifications|Command Line Interface]] as user "root", password is the same as for admin.
#Enable and then Login to the [[Modifications|Command Line Interface]] as user "root", password is the same as for admin.
#Change to a directory such as "/volume1/@tmp", i.e. enter the command "cd /volume1/@tmp"
#Change to a directory such as "/volume1/@tmp", i.e. enter the command "cd /volume1/@tmp"
#Get the NAS to download the bootstrap, e.g. if you have an mv5281 ARM model enter the command "wget '''<nowiki>http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh</nowiki>'''", alternatively download the bootstrap to your PC and then copy it to a shared folder on the NAS
#Get the NAS to download the bootstrap, i.e. if you have an mv5281 ARM model enter the command "'''<nowiki>wget http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-5_arm.xsh</nowiki>'''"
#Set the .xsh script to be executable "chmod +x '''syno-x07-bootstrap_1.2-7_arm.xsh'''"
#Now run the .xsh script, e.g. if you have an mv5281 ARM model and used the bootstrap above enter the command "sh syno-x07-bootstrap_1.2-5_arm.xsh"
#Now run the .xsh script, e.g. if you have an mv5281 ARM model and used the bootstrap above enter the command "sh '''syno-x07-bootstrap_1.2-7_arm.xsh'''"
#After the script has finished you can delete the script file, e.g. for mv5281 ARM users using the bootstrap above enter the command "rm syno-x07-bootstrap_1.2-5_arm.xsh"
#After the script has finished you can delete the script file, e.g. for mv5281 ARM users using the bootstrap above enter the command "rm '''syno-x07-bootstrap_1.2-7_arm.xsh'''"
#Update the ipkg list of installed products using the command "ipkg update"
#'''NEW:''' If you have DSM 4.0 there is an additional step. In the file /root/.profile you need to comment out (put a # before) the lines "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin" and "export PATH". To do this enter the command "vi /root/.profile" to open the file in [http://forum.synology.com/wiki/index.php/Linux_VI_Editor vi]. Now change [http://forum.synology.com/wiki/index.php/Linux_VI_Editor vi] to edit mode by pressing the "i" key on your keyboard. Use the down cursor key to move the cursor to the start of the line "PATH=/sbin..." and put a "#" infront of this line so it is now "#PATH=/sbin...". Do the same for the line below so it is now "#export PATH". Now press the escape key (to exit edit mode) and type "ZZ" (note they are capitals) to tell [http://forum.synology.com/wiki/index.php/Linux_VI_Editor vi] to save the file and exit. For background info on why this is neccessary for DSM 4 refer to http://forum.synology.com/enu/viewtopic.php?p=185512#p185512 <p>(Alternatively, you can modify the PATH statement by prepending the existing $PATH. You can do this in vi by typing the following while in command mode: ":%s/PATH=/PATH=$PATH:/" and then "ZZ" to save and exit (or ESC and then ":q!" to quit without saving if you made a mistake.))</p>
#Update the ipkg installed packages to the latest versions using the command "ipkg upgrade"
#Note 1: If you have the following error: "Cannot satisfy the following dependencies for wget-ssl: libidn", you need to manually download libidn and install with ipkg: Eg. for Synology DS108j: "wget '''<nowiki>http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/libidn_1.21-1_powerpc.ipk</nowiki>'''" (wget should be already present on the system) and enter the command "ipkg install '''libidn_1.21-1_powerpc.ipk'''". Run the ipkg bootstrap process again (press yes when it asks to overwrite config file). For a procedure to install ipk packages without ipkg, see [http://buffalo.nas-central.org/wiki/Install_an_.ipk_package_without_having_the_ipkg_package_management_system_(for_end-users) http://buffalo.nas-central.org/wiki/Install_an_.ipk_package_without_having_the_ipkg_package_management_system_(for_end-users)]
#Finished, you can now install ipkg packages using the command "ipkg install xxxx" where xxxx is the name of the package. You can list all the available packages using the command "ipkg list". As this is a long list you can filter it using the command "ipkg list | grep xxxx" where xxxx is the text you want to search for.
#Note 2: When you have an error that /opt cannot be mount, unmount the previous mount ("umount -f /opt" check with command "mount") and delete both old /opt and /volume1/opt folders. 
#Reboot the NAS and login again to the [[Modifications|Command Line Interface]] as user "root"
#Update the ipkg list of available packages using the command "ipkg update"
#Note 1: When "ipkg update" fails, it can be that the older existing wget is used. Ensure that the right paths are selected in classpath with "$PATH", if not: "export PATH=$PATH:/opt/bin:/opt/sbin". Install wget manually: for Synology DS108j: "wget '''<nowiki>http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/wget_1.12-2_powerpc.ipk</nowiki>'''" and "ipkg install '''wget_1.12-2_powerpc.ipk'''". Check version with "/opt/bin/wget -V". Check location with "which wget".     
#Upgrade any ipkg installed packages to the latest versions using the command "ipkg upgrade"
#Finished, you can now install ipkg packages using the command "ipkg install xxxx" where xxxx is the name of the package. You can list all the available packages using the command "ipkg list". As this is a long list you can filter it using the command "ipkg list | grep xxxx" where xxxx is the text you want to search for. Alternatively, you view one page at a time using the "more" pipe, e.g. "ipkg list | more"
 


Note: ipkg expects to find your ipkg files/programs in the path "/opt". As the synology NAS's put all your files in "/volume1" the bootstraps put your IPKG files/programs in "/volume1/@optware" but then mount this directory so it ALSO appears as "/opt". Hence, do not think that "/volume1/@optware" and "/opt" are duplicated files, they are not duplicated, they are in fact exactly the same directory.
Note: ipkg expects to find your ipkg files/programs in the path "/opt". As the synology NAS's put all your files in "/volume1" the bootstraps put your IPKG files/programs in "/volume1/@optware" but then mount this directory so it ALSO appears as "/opt". Hence, do not think that "/volume1/@optware" and "/opt" are duplicated files, they are not duplicated, they are in fact exactly the same directory.
Line 118: Line 100:


====Toolchain====
====Toolchain====
A Toolchain is a set of tools that allows programmers to compile programs for target systems, in our case the Synology Servers.  
A Toolchain is a developers plugin that allows programmers to compile programs for target systems, in our case the Synology Servers.  


You can now compile source code applications directly on the Synology Server. First install '''ipkg''' using the [ [[Overview_on_modifying_the_Synology_Server%2C_bootstrap%2C_ipkg_etc#Bootstrap|Bootstrap]] ]. Now you can log into the command line and install all the tools necessary to perform local builds in one step: <pre>cs407> ipkg install optware-devel</pre> When performing local builds remember that by default '''./configure''' will set up the build to install to '''/usr/bin''' etc whereas it is sensible to make it install into the '''/opt''' root. Generally you can just get away with doing this: <pre>cs407> ./configure --prefix=/opt</pre>however, unfortunately, other command switches and flags may be needed (see ./configure --help).
You can now compile source code applications directly on the Synology Server. First install '''ipkg''' using the [ [[Overview_on_modifying_the_Synology_Server%2C_bootstrap%2C_ipkg_etc#Bootstrap|Bootstrap]] ]. Now you can log into the command line and install all the tools necessary to perform local builds in one step: <pre>cs407> ipkg install optware-devel</pre> When performing local builds remember that by default '''./configure''' will set up the build to install to '''/usr/bin''' etc whereas it is sensible to make it install into the '''/opt''' root. Generally you can just get away with doing this: <pre>cs407> ./configure --prefix=/opt</pre>however, unfortunately, other command switches and flags may be needed (see ./configure --help).
Line 126: Line 108:
==Other usefull sources of info==
==Other usefull sources of info==
This Synology Wiki area and the Synology forum are your main sources, however, other very usefull areas are:
This Synology Wiki area and the Synology forum are your main sources, however, other very usefull areas are:
*[http://www.optware-project.org optware-project.org as originally started by NSLU2-LINUX]
*[http://www.nslu2-linux.org NSLU2-LINUX]
*[http://www.nslu2-linux.org NSLU2-LINUX]
*[http://synology.nas-central.org/index.php/Main_Page NAS-Central]
*[http://synology.nas-central.org/index.php/Main_Page NAS-Central]
Line 132: Line 113:
*[http://www.freeos.com/articles/3102 An overview of the Linux filesystem]
*[http://www.freeos.com/articles/3102 An overview of the Linux filesystem]
*[http://www.justlinux.com/nhf/Filesystems/Directory_Navigation.html An overview of the Linux Directory Structure]
*[http://www.justlinux.com/nhf/Filesystems/Directory_Navigation.html An overview of the Linux Directory Structure]
[[Category:SynologyWiki]]
[[Category:ToBeExported]]
Please note that all contributions to wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wiki:Copyrights for details). Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)