Editing Overview on modifying the Synology Server, bootstrap, ipkg etc
Jump to navigation
Jump to search
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 | 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 | 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 | 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 | 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 30: | Line 30: | ||
===for compiled/binary programs=== | ===for compiled/binary programs=== | ||
Compiled/binary programs (compiled from source code programs, see below) are the most powerfull type of program you can install on the Synology Server. They can provide rich content and wide functionality but this comes with increased potential for corrupting the Server compared to php applications. The compiled programs are distributed as binaries (usually with no file name extension but sometimes with a .bin extension). Some of these binaries require other programs to be installed on your machine so they can run. If you want to use a binary it must have been compiled specifically for the processor used in your synology NAS, i.e. see [[ | Compiled/binary programs (compiled from source code programs, see below) are the most powerfull type of program you can install on the Synology Server. They can provide rich content and wide functionality but this comes with increased potential for corrupting the Server compared to php applications. The compiled programs are distributed as binaries (usually with no file name extension but sometimes with a .bin extension). Some of these binaries require other programs to be installed on your machine so they can run. If you want to use a binary it must have been compiled specifically for the processor used in your synology NAS, i.e. see [[Is my NAS an ARM or a PowerPC CPU model]]. Each of these processors require programs compiled specifically for them, a program compiled for PPC processors will not work on an ARM processor, and vice versa. | ||
To install a compiled/binary program you need to copy the binary file(s) in to a folder on your NAS, give the file(s) execution permission and then execute them. You can do this process manually as described below, but in most cases it is recomended you use a package management system like ipkg (as detailed below). | To install a compiled/binary program you need to copy the binary file(s) in to a folder on your NAS, give the file(s) execution permission and then execute them. You can do this process manually as described below, but in most cases it is recomended you use a package management system like ipkg (as detailed below). | ||
Line 42: | Line 42: | ||
#Run/execute the progran by entering "./XXXX.XXX" | #Run/execute the progran by entering "./XXXX.XXX" | ||
You can find compiled programs for the | You can find compiled programs for the ARM CPU [[Compiled_programs_for_Marvell_mv5281_ARM-based_Synology_Products|here]] | ||
You can find compiled programs for the | You can find compiled programs for the PPC CPU [[Compiled_programs_for_Power_PC_CPU_based_Synology_Products|here]] | ||
If you compile any of your own please add them. | If you compile any of your own please add them. | ||
The compiled program "screen" which you can find [[Compiled_programs_for_Marvell_mv5281_ARM-based_Synology_Products|here]] (for | The compiled program "screen" which you can find [[Compiled_programs_for_Marvell_mv5281_ARM-based_Synology_Products|here]] (for ARM CPU's) is an example, it has no other dependecies, so you can just copy the single file and imediately run the program. No need for ipkg, bootstrap or anything else. | ||
====Installing compiled/binary programs using ipkg==== | ====Installing compiled/binary programs using ipkg==== | ||
To make the installation, update and removal process of software easier the computing industry adopted the principle of [http://en.wikipedia.org/wiki/Package_management_system the Package Management System]. [http://en.wikipedia.org/wiki/Ipkg ipkg] is a dpkg-inspired, very lightweight Itsy Package Management System for small Linux systems and embedded devices, such as the Synology Servers. ipkg is often the easiest and most reliable way to install compiled binaries. Additionally ipkg will only use specified sources for binary packages, these sources are processor specific. Consequently you do not need to worry about | To make the installation, update and removal process of software easier the computing industry adopted the principle of [http://en.wikipedia.org/wiki/Package_management_system the Package Management System]. [http://en.wikipedia.org/wiki/Ipkg ipkg] is a dpkg-inspired, very lightweight Itsy Package Management System for small Linux systems and embedded devices, such as the Synology Servers. ipkg is often the easiest and most reliable way to install compiled binaries. Additionally ipkg will only use specified sources for binary packages, these sources are processor specific. Consequently you do not need to worry about [[Is my NAS an ARM or a PowerPC CPU model]] when selecting a program/package to install, ipkg will effectively do this for you. | ||
As Synology products do not currently come with ipkg installed the installation of ipkg is often the first recomended step to install binary/compiled programs/applications. | As Synology products do not currently come with ipkg installed the installation of ipkg is often the first recomended step to install binary/compiled programs/applications. | ||
Line 62: | Line 62: | ||
=====Bootstrap===== | =====Bootstrap===== | ||
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 [[ | 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 [[Is my NAS an ARM or a PowerPC CPU model]]. | ||
You | You are best checking the forum for the latest info on the best bootstrap to use. 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: | ||
For 8241 PPC models | For 8241 PPC models | ||
[http:// | [http://www.nslu2-linux.org/wiki/DS101/DS101BootStrap www.nslu2-linux.org/wiki/DS101/DS101BootStrap] 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 8543 PPC models | For 8543 PPC models | ||
[http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2- | [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 | For ARM mv5281 models | ||
[http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2- | [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. | ||
The bootstraps are normally .xsh files. To install a .xsh file (and therefore the bootstrap): | |||
#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 | #Change to a directory such as /volume1/public (note this directory is not created on all NAS's, if you dont have it you can create it in the web management GUI), i.e. enter the command "cd /volume1/public" | ||
#Get the NAS to download the bootstrap, e | #Get the NAS to download the bootstrap, i.e. if you have an 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>'''" | ||
#Now run the .xsh script, e.g. if you have an 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 | #After the script has finished you can delete the script file, e.g. for 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 | #Update the ipkg list of installed products using the command "ipkg update" | ||
#Update the 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. | |||
#Update the ipkg list of | |||
# | |||
#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: 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 94: | ||
====Toolchain==== | ====Toolchain==== | ||
A Toolchain is a | 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 102: | ||
==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.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] | ||
*[http://oinkzwurgl.org/diskstation flipflip's DiskStation Resources] | *[http://oinkzwurgl.org/diskstation flipflip's DiskStation Resources] | ||
*[http://www.freeos.com/articles/3102 An overview of the Linux filesystem] | *[http://www.freeos.com/articles/3102 An overview of the Linux filesystem] | ||