How to install Kernel modules on Synology DS1010 DSM 4.1, 4.2, 4.3, 5.0, 5.1 or 5.2

This is how I installed USB serial modules on my Synology DS1010+ with DSM 4.1 ,DSM 4.2, DSM 4.3, DSM 5.0, DSM 5.1 and DSM 5.2

Edit 06/12/2015 : Today I updated my Syno to DSM 5.2 and Synology team for this release changed kernel  version from 3.2.40 to 3.10.35. This makes old modules not loadable anymore. I think the procedure described in this post is still working but I needed to remove my old virtual machine so I can’t check anymore and do any compilation to validate. If anyone done it, just let me know so I can update this post according.

I think today it could be easier using new technique such as docker or chrooting a debian environment on the synology. then install all build process and compile the module on the Synology itself.

Anyway, today I just needed all USB serial driver for my Syno and found them working with 5.2 on Synology forum for my DS1010+. Yo can download from there just in case (only x86_64 arch)

Edit 12/27/2014 : Added DSM 5.1, use the same procedure than DSM 5.0. Modules are still compatible.
Edit 03/21/2014 : Added DSM 5.0

I cross-compiled the modules on another box than the Synology box, more safe, I do not want to install all development environement on the Synology box, I like to keep it safe and working.

This is for DSM 4.1, 4.3, 4.3, 5.0 or 5.1, for older DMS version see my other post

What do you need ?

  • A linux box with at least 10GB free drive do host all Synology linux sources and development tools. I used Clouded Virtual Machine Linux Ubuntu 12.04 LTS server provided by Windows Azure. Other distribution could differs in command line and may not work.
  • The latest toolchains for your synology
  • The latest Synology source code

For my DS1010 DSM 4.1 I took gcc420_glibc236_x64-GPL.tgz for the toolchain so Intel x86 Linux 3.2.11 (Pineview) and so DSM 4.1 and  synogpl-2636-x64.tbz 2636 Branch x64 version)

For my DS1010 DSM 4.2 I took gcc420_glibc236_x64-GPL.tgz and synogpl-3201-x64.tbz.

For my DS1010 DSM 4.3 (update 2) I took  gcc420_glibc236_x64-GPL.tgz  and synogpl-3776-x64.tbz

For my DS1010 DSM 5.0/5.1 I took gcc473_glibc217_x86_64-GPL.tgz and synogpl-4458-x64.tbz

Install the building environment on the linux box

Go for compilation

assuming you put the two files on you linux box, now unzip them. Take the file name and version of the one you previously downloaded

now you have a folder named x86_64-pc-linux-gnu under /usr/local/ (or x86_64-linux-gnu for old version, in this case, change the line below with the correct path)

go for a coffe….wait…

Get which Linux kernel we have on the two Synology to compile the correct version. So ssh to your Synology and issue a :

Our kernel is 3.2.11, now get back to the linux box and go to the Synology NAS GPL source folder corresponding to your Synology Linux kernel. But before, it is also time to become root to avoid permission denied in the future.

Copy the config file created by Synology to configure the kernel (the one corresponding to your synology architecture here x86_64)

Edit the Makefile ARCH and CROSS_COMPILE variables to compile for the correct architecture and use the right toolchains. The following two lines need to be modified in the file named Makefile

For DSM 5.0/5.1 : I tried to change the line above, but does not exist and tried to change CONFIG_CROSS_COMPILE didn’t worked either, so I decided to do it dirty way, I added the two following lines directly in the Makefile located in current folder

Check the config file we just copied

DSM 5.0/5.1 : press enter on each question (let default values)

Launch the configuration menu to select what we need.

Take care, the Makefile on DSM 4.2 seems corrupt on line 179 you need to edit it and change the 2 lines

by only one line

Then issue a

I went to Device Driver / USB Support / USB Serial Converter support and checked all as Module, then exited.

Now we can compile all modules (no need to compile all kernel), issue a :

Here, I went to some file not found problem, my 64 bits compile platform was unable to launch 32 bits applications and fired me a error “file not found on the file x86_64-linux-gnu-gcc even if the file was here. To correct this you need to install 32 bits libraries (yeah, if you don’t know that you’re stuck !!). downloading 64 bits toolchains contains 32 bits programs, and even worse, on the Synology, there are a lot of 32 bits files even if it is a 64 bits kernel.

then re-issue

If all went fine (and it should :-)) Your modules are in the corresponding subfolder drivers/usb/serial/

Installation of the modules on the synology

I have ipkg optware installed to my Synology so you need it if you want to do the following. The procedure is located on another post on my blog

You can do it without ipkg also, copying the module into /lib/modules/ of the synology and adding the startup script (see below) into /usr/syno/etc/rc.d/ But I prefer separate and put them into ipkg, this will prevent erasing the modules with futur firmware update.

So if using ipkg, go ssh to your Synology box and create the folder hierarchy under /opt/lib/. For DSM 4.3 the folder is 3.2.40 (the matching kernel version)

copy the needed modules to this folder (unfortunatly synology can’t do native scp) so I copied then from my linux box to the Synology share NetBackup (/volume1/NetBackup/modules) and then issued from the Synology

Remember I just needed USB serial converter, Prolific, cp210x and FTDI so as the Synology do not populate /dev/ttyUSBx we need to create them (here for 3 simultaned devices)

then issued a insmod for the needed modules (usbserial first !!!)

All went fine

Then I plugged one PL2303 chip and one FTDI and voila !!!

Auto load modules on boot

May be you want the modules to be loaded at boot time, sure this is what I wanted

create the following script S10modules in /opt/etc/init.d/ folder. Change the MODULES_DIR and MODULES var to fit with your configuration.

Do not forget to set this script executable with

Do not want to do this stuff, I’ve done it for this documentation

So you can download all compiled modules. The archive contains all USB Serial Modules compiled during this topic. (may be you will need to change the .gz extension to .tgz after download).

  • DSM 4.1 compiled modules for DS1010
  • DSM 4.2 compiled modules for DS1010
  • DSM 4.3 compiled modules for DS1010
  • DSM 5.0 / 5.1 compiled modules for DS1010

Have fun

I have more and more demand of custom compilation, I can do it when I have time but it take some time to do this, so if you want to donate, feel free to do it using the following paypal button.