How to install Kernel modules on Synology DS1010

This is how I installed usb serial modules on my Synology SAN (my version is the DS1010+ and also a DS106)   All stuff source is grabbed from here, well documented by Davy, but just in case it dissapears one day and for my own informations, I add to my blog.

This is for DSM 4.0, since DSM 4.1 is now out, this procedure do not apply because Synology switched linux kernel 2.6 to 3.x, if you want the DSM 4.1 version, checkout this other post

What do you need ?

  • A linux box with at least 5GB free drive do host all Synology linux sources and development tools
  • The latest toolchains for your synology
  • The latest Synology source code

for my DS1010 (DSM 4) I took gcc420_glibc236_x64-GPL.tgz for the toolchain so Intel x86 Linux 2.6.32 (Pineview) and synogpl-2198-x64.tbz so DSM 4.0 and  2198 Branch x64 version)

for my DS106 (DSM 4) I took gcc334_glibc233_ppc-GPL.tgz] for the toolchain so PowerPC 824x Linux 2.4.22 and synogpl-2198-824x.tbz so DMS 4 and 2198 Branch for PowerPc

Go for compilation

assuming you put the two files on you linux box, now unzip them

now you have a folder named x86_64-linux-gnu under /usr/local/ and a folder powerpc-linux

go for a coffe….wait…

get which Linux kernel we have on the two Synology to compile the correct version. in the examples below the command prefix design on which synology the command has been issued (ds1010 or ds106) ssh to your Synology and issue a

Our kernel is 2.6.32 for DS1010 and 2.4.22 for DS106, now get back to the linux box and go to the Synology NAS GPL source folder corresponding to your Synology Linux kernel

For DS1010 (adapt it for the DS106)

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 right architecture and use the right tool chains. The following two lines need to be modified in the file named Makefile

Check the config file we just copied

Edit the config file add needed modules.

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

Compile all modules

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/

go ssh to your Synology box

create the folder hierarchy under /opt/lib/

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 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 !!!)

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 S50modules 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

PS : I would like to thanks Greg Numan who noticed me errors located on my original script

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

So you can download all compiled modules ds1010-dsm40 (for DS1010 DSM 4.0 Only). 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).




  1. Hi!
    Thanx for the tutorial.
    However when I’m trying to make module there is an error poping up with linux-gcc missing.
    Would much appreciate any help. Tnanx in advance.

    • Dima,

      Glad that can help.

      I think you need to install the developement environnement, from where did you try to compile, from the synology or from another linux box ?

      • I’ve installed ubuntu on a VM.
        The files with gcc seem to be in the folder however I keep getting an error

        • Dima,

          could you post the error message you’ve got ?

          for information I have done new tutorial for DSM 4.1 in this post


          done from scratch on a ubuntu VM, may be it will help you

          I went to some file not found problem, when created this post because 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 issuing a

          apt-get install libc6-i386

  2. When unpacking the NAS GPL I get an error can not mkdir out of disk space. When checking the disk space of the rootfs it is 2.5GB and completely full. Offcourse the NAS GPL is compressed already 1.2 GB. How do you get rootfs to increase or how do you fit it in ? Are there modules you can skip when using the NAS GPL ?

  3. Thanks for the fact that you made the tutorial. But it seems all a bit too difficult to me. Maybe you can explain some things for me, to build my confidence that I understand what I am about to do…

    Do I need an extra Linux computer, besides the Syno box, to do the compilation? Why?

    It seems to me that in your description the whole Linux and DSM software is being recompiled, just to get 3 modules. Why? Is it not possible to compile just the needed modules?

    In my case I want to connect my DS212 / DSM 4.3 to the inverter of my solar panel installation. currently I use a Raspberry Pi to poll the inverter every minute and extract the relevant information of the PV production. The inverter has a 9-pin RS232 connector, and I connect this port to one of the USB ports of the RPi. That went just fine, and apart from installing a few perl support packages the serial communication through the USB port runs without any extra work or problems. When I’m going to connect the DS212 what modules are required? All three as in your blog above, or just the usbserial.ko? Or any other(s)?


    • Hi,

      You are totally right, it is not cool to have a so “huge work” just to have few modules, but that is the deal, I did not tried to find a other method since this one was working, but so long.

      theorically you could be able to compile on syno, but his config is so “different” from a standard distrib and installing all necessary files could (or not) create some problem on the Syno that I prefer to avoid.

      To compile kernel modules, you need kernel files (as far as I understand) and the whole Syno distrib used to create Syno firmware. Thank to them to provide us the source code, even if GPL, not all do this. Your distrib should match the kernel version used in you Syno, so when you upgrade your Syno you could have to do the job again (that is what happened when they moved from 2.x kernel to 3.x kernel)

      The modules you need depends on usb adapter, there is 3 major chipset used, the FTDI, the Prolific (PL-2303) and the Silicon Labs CP210x, to be sure use these 3 modules like this if you change usb serail adapter it will still work in all cases.

      the modules are
      usbserial.ko (generic usb serial)

      But you can compile all usb serial modules, take not more time…


  4. Hi, im hoping someone make be able to help, I am looking to crosscompile the DVB modules for my DS410 (powerpc architecture)

    I am running 12.04 in a VM (also tried 13.10) and I have confirmed I am running a version of binutils higher than 2.20. All steps for this guide so far have gone through fine, except I get the following error when issuing the ‘make modules’ command:

    *** 2.6 kernels no longer build correctly with old versions of binutils.
    *** Please upgrade your binutils to 2.12.1 or newer
    make: *** [checkbin] Error 1

    Is there something I’m missing?


  5. To add a little more this, this is the exact output I receive when issuing the make modules command:

    root@ubuntu:/usr/local/powerpc-linux-gnuspe/source/linux-2.6.32# make modules
    make: /usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc: Command not found
    /usr/local/powerpc-linux-gnuspe/source/linux-2.6.32/scripts/gcc-version.sh: line 25: /usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc: No such file or directory
    /usr/local/powerpc-linux-gnuspe/source/linux-2.6.32/scripts/gcc-version.sh: line 26: /usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc: No such file or directory
    /usr/local/powerpc-linux-gnuspe/source/linux-2.6.32/scripts/gcc-version.sh: line 25: /usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc: No such file or directory
    /usr/local/powerpc-linux-gnuspe/source/linux-2.6.32/scripts/gcc-version.sh: line 26: /usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc: No such file or directory
    /usr/local/powerpc-linux-gnuspe/source/linux-2.6.32/scripts/gcc-version.sh: line 28: /usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc: No such file or directory
    *** 2.6 kernels no longer build correctly with old versions of binutils.
    *** Please upgrade your binutils to 2.12.1 or newer
    make: *** [checkbin] Error 1

    Thank you in advance for any assistance people can offer

Comments on this topic in community Forums.