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.





  1. Hello

    I would like to use a 1-wire master hub RS232 with an Serial-RS232 adapter (Prolific 2303)

    I’d like to obtain the PL2303 drivers dor my Synology DS211. CPU is Marvell Kirkwood mv6282. I found the toolchain here http://sourceforge.net/projects/dsgpl/files/DSM%204.1%20Tool%20Chains/Marvell%2088F628x%20Linux%202.6.32/

    But I wonder which source should I use ?

    I never cross-compiled any module for synology. Do you think I can find it somewhere on the net ? I never succeed it

    Thank you


    • Thomas,

      The toolchain you mention is the correct toolchain.

      The source code you need is here http://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/2636branch/ and the file seems to be the file synogpl-2636-6281.tbz

      Following my tutorial will help you, the difference is that your kernel version is 2.6.32 (mine 3.x) so you need to do some adjustement in the command line. Idem for the cross compilation I think you will need to replace x86_64 by arm-none-linux-gnueabi

      But, even if we are far for christmas, I done it for you, you will find all modules here

      Enjoy !


  2. Hi !

    you’re a boss ! It works great ! I can mount owfs on my Synology DS211 and the master hub !

    I need to understand how to browse the different legs of my 1-wire lan with owfs now.

    Do you think this modules will still work if I do an Synology firmware upgrade ?

    Thank you again 🙂


    • Thomas,

      Thank you, glad to help you working on your syno.

      About firmware upgrade, I think it will work until Synology do not change the kernel version to 3.x. That is what happened to me with my DS1010 the DSM 4.1 went from 2.6 to 3.x. but as DSM 4.1 stay on 2.6 on your DS211, I think it will work.
      But, may be you will need to install again the modules after FW upgrade. If you installed ipkg, your scripts sould be preserved but you will need to re install optware to your Syno. If you modified Syno startup scripts you will need to modify them again.

      I ve done a post on how to compile owfs on debian, may be it can help you. Check the end of the post if you already have installed owfs. It it here http://hallard.wikidot.com/owfs

      Have fun


      • Hi Charles

        I will check you website about owfs. Because now, I’m using a old release 2.8p14 compiled by russian guy on synology DS211. (2.8p20 is last one not yet available for my syno)

        I’m using a hobby-board 6 channels hubs, including Serial interface and then the PL2303 serial to usb adapter. But since few days, I’ve some problem with this config:

        if I launch owhttpd directly on my serial interface
        owhttpd -d /dev/ttyUSB0 -p 3001

        It works fine I can browse the 1-wire

        If I use owserver to serve multiple ow client later it does not work

        owserver -d /dev/ttyUSB0
        owhttpd -s -p 3001

        ==> owhttpd does not start correctly because it seems it cannot contact owserver (on same machine, default 4304 port)

        Any idea ?


        I tried cross-compilation but without sucess till now 🙁

        • Thomas,

          It took me some time to understand how owfs is working. What can I say is that you need only one daemon owserver and the other such as owhttpd, owfs, … need to listen on this daemon. If not this can cause trouble. I do not know if you are doing like that but the idea is :
          start owserver daemon with -d /dev/ttyUSB0
          then start owhttpd and/or owfs listening on the owserver daemon you started just before, you must not have 2 daemon using the device /dev/ttyUSB0 in the same time.

          By the way, did you tried to install ipkg (or opkg) on your syno and then install already compiled owfs package ?


  3. Charles,

    Would you mind spend some more time on x-mas gifts? I tried to create my own bootable CD for Ubuntu, but my laptop is not allowing me to boot from there (Company policy).

    I would love to have the same compiled for the DS210+
    Uname -a : Linux nas #2647 Wed Sep 26 03:51:01 CST 2012 ppc GNU/Linux synology_ppc853x_210+

    Hopefully you can help me with it.


  4. Hi Charles,

    Somehow I cannot see my reply anymore (maybe because you have WP approval active, not sure).
    Hope you want to do some more pre-xmas gifts 😉 I tried to make a bootable CD Ubuntu to create my own drivers for Serial USB on Synology DS210+, but my company laptop does not allow me to reboot from CD.

    You would make my day if you can help me with the files for my NAS.
    Uname -a :
    Linux nas #2647 Wed Sep 26 03:51:01 CST 2012 ppc GNU/Linux synology_ppc853x_10+

    Hopefully you can help me.

  5. Hello,

    thanks for your great guide – there is one for DSM4.0 with Linux 2.6.x and one with DSM4.1 with Linux 3.x. My one is a DS410, uname -a gives “Linux r2d2 #2647 Wed Sep 26 03:51:01 CST 2012 ppc GNU/Linux synology_ppc853x_410”

    I am unsure, with guide do I need to follow? This is my very first time in cross-compiling – and I even do not have a second linux PC, ist it possible to do that on the DS only? But i can not find apt-get. I can install ipkg only.

    Thank you,

      • Looks like it’s working :d



  6. Hi Charles,

    I came across your blog when I was searching for installing kernel modules within a Synology NAS. I just purchased a DS213 running DSM4.1 with the purpose of running a TV server on it. I got it to recognize my HDHomerun tuner, but not my Hauppage HVR-1950 USB tuners and I think the reason might be because the V4L modules could be missing in the kernel. Do you agree? If so, then how would I be able to auto load the V4L modules on boot with my DS213? I guess I’m still a Linux noob because the instructions here seem a little over my head!

  7. Great tutorial, thank you Charles Henri. Got my DS412+ to recognize USB serial!

    Was wondering, I know this may be off topic but I sort of guess you got this working on your Synology so as to run teleinfo module. Did you manage to get the c programme running as well (the one pushing data onto mysql db) ?

    Read a few comments, it seems that it’s not possible to make it work with default instance of Synology mysql. Quite a pity as I would prefer to keep it that way rather than installing ipkg mysql.


    • François,

      Sorry for my late response but I was very busy last weeks.

      Yes, I’m using the teleinfo broadcast that I wrote. But not on the Synology, cross compilation is always a headache and worse when you need to cross compile with Library because they need to be the same version that on the target (trust me I spend lot of time when trying to cross compile with mysqlient Library). The best way to achieve this is to install compiling Tools on the target and to the stuff on the target, but you will need to also compile mysqlclient. So I decided to use a easier method
      What did I do to achieve this ?

      I used the ser2sock program that translate the serial to network (I did not done on my syno but it is just a .c program so easy to cross compile I think)

      So on the target where (in your case the syno) the teleinfo is connected at init just do to initialize the serial port for teleinfo (just change the /dev/teleinfo by your serial device)
      /bin/stty -F /dev/teleinfo 1200 cs7 -cstopb parenb -icrnl -ixon -ixoff -echo

      then after use ser2sock to redirect serial trafic to your network (in this case on network TCP port 11200)
      /usr/local/bin/ser2sock -p 11200 -s /dev/teleinfo -n -d

      Once done, on the target computer at startup just use the socat command (change serverbox by the name of your station where you launched ser2sock)
      /usr/bin/socat pty,link=/dev/vteleinfo,raw tcp:serverbox:11200

      This will create a new virtual device vteleinfo that you can access by /dev/vteleinfo in any application you want.
      Hope this help

  8. Well, I think I followed your instructions correctly. First, I downloaded ‘gcc421_glibc25_88f6281-GPL.tgz’ and ‘synogpl-2636-6281.tbz’. Then I followed your instructions and was able to do a ‘make menuconfig’. I first selected “System Type” and changed it to “ARM System Type (Marvell Kirkwood)”. Then I went to “Device Drivers” and selected “Multimedia Support”. I then selected “Video For Linux” and “DVB for Linux”. Then I selected “Video Capture Adapters” and chose “Conexant cx23416/cx23415 MPEG encoder/decoder support”. I then selected “V4L USB devices” and chose “USB Video Class (UVC)” and “Hauppage WinTV-PVR USB2 support”. After exiting the menu and saving the configuration, I did a ‘make modules’ which successfully finished and built all of the KO files. I then copied all of the KO files under the ‘media’ folder and subfolders over to the ‘/opt/lib/modules/2.6.32’ folder on my DS213. I did a ‘mknod /dev/video0 c 81 0’ and a ‘mknod /dev/video1 c 81 1’ and then an ‘insnod’ for every KO file that I copied over following the order in the ‘modules.order’ file under the ‘media’ folder of my linux machine (CentOS 6.3). Only 4 of the 45 modules didn’t get an error. Do you have any idea of what I might be doing wrong? I would really like to get my TV server switched over to the NAS, but if I can’t get all of my tuners working on it soon then I’m going to have to return it. Thanks in advance! 😉

  9. hi Charles

    I’m trying to compile virtual box modules without success. Everything looks fine but vboxdrv.ko is not created. Did you give a try ?

    • Hello,

      Did you find the vboxdrv in any section when you launched the make menuconfig ?

      If so maybe issuing a make instead of make modules will recompile everything and you could find your driver ?

      Just give a try


  10. I would like to use 3ware SATA controller driver with my XPEnology(Synology-on-PC). I followed your article but I can’t find my 3ware driver in the sellection in makemenu. 3ware drivers can be downloaded for linux kernel 2.6, but how to implement them in XPEnology_DS3612xs_2668 with kernel 3.2.11 Bromolow?

    Please help as this is one big step towards making the perfect NAS…

  11. Hi Eduardo,

    One problem in sourceforge the latest available version of Toolchains and code Source is for Linux kernel 3.2.11 (Bromolow) and branch 3201

    I need kernel 3.2.30 and source 3202.

    DiskStation> uname -a
    Linux DiskStation 3.2.30 #1 SMP Tue Mar 5 22:47:29 MSK 2013 x86_64 GNU/Linux synology_bromolow_3612xs

    where I could find it??

    I need to compile the Virtualbox modules.


  12. Hello Charles,

    I’m doing an Arduino project and would, for a first step, need to serial-usb connect to my Syno 213+. I’ve followed your great tutorial but I’m blocked at the “make oldconfig” step. I’m getting this error;

    root@ubuntu:/usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32# make config
    Makefile:449: /usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32/arch/ppcQorIQ/Makefile: No such file or directory
    make: *** No rule to make target /usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32/arch/ppcQorIQ/Makefile'.  Stop.

    My guess is that I'm not running the right package!?

    Here are the my Syno details;

    Linux ??? #3202 SMP Fri Mar 1 01:04:06 CST 2013 ppc GNU/Linux synology_qoriq_213+
    DSM 4.2 Tool Chains: gcc4374_eglibc2874_qoriq-GPL.tgz
    Synology NAS GPL Source:  synogpl-3201-qoriq.tbz


    Ubuntu 12.04 LTS
    Intel® Core™2 CPU T7200 @ 2.00GHz ×
    OS Type 32-bit
    Disk 120 giga


    sudo tar -xvzf gcc4374_eglibc2874_qoriq-GPL.tgz -C /usr/local/

    sudo tar -xvjf synogpl-3201-qoriq.tbz -C /usr/local/powerpc-none-linux-gnuspe/
    sudo su -

    cd /usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32
    cp synoconfigs/ppcQorIQ .config
    root@ubuntu:/usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32# gedit Makefile
    ARCH        ?= ppcQorIQ
    CROSS_COMPILE    ?= /usr/local/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-

    Save & Close gedit

    root@ubuntu:/usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32# make oldconfig
    Makefile:449: /usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32/arch/ppcQorIQ/Makefile: No such file or directory
    make: *** No rule to make target
    /usr/local/powerpc-none-linux-gnuspe/source/linux-2.6.32/arch/ppcQorIQ/Makefile’.  Stop.

    Thank you for any suggestions




  13. Hello Charles,

    Thank you for your reply and follow up. As request here is my folder structure for my “arch”

    Looks like the ppcQorIQ folder is not being created… ?!

    BTW is my

    the correct one?
    Thanks a lot, much appreciated.



  14. Hello,


    I have a DS1010+  with

    Linux DiskStation 3.2.30 #3202 SMP Fri Mar 1 01:04:47 CST 2013 x86_64 GNU/Linux synology_x86_1010+


    I’m using the compiled modules from eduardo:

    “USB to Serial x86 (Pineview) DSM 4.2 (Kernel 3.2.30)” that were posted in March 8.

    With this modules, I started to have a problem:

    I’m using the pl2303 usb-serial to catch the information from an Inverter (solar system) that writes a line every 10 seconds.

    After upgrading the synology (previously was on 3.2) and started using this new driver mudules (for DSM 4.2) , the information that came from this modules /dev/ttyUSB0) appear to STOP without any reason.


    Can someone help me solving his problem?

    Are those drivers real compiled  for 3.2.30 ? Isabido, could you get a diferent drivers?

  15. Hi, Thank you for putting this guide together. Basically, I am having success with all the steps except the part where the USB stick would be detected. I’m trying to get Aeon Labs Z-stick S2 working (it uses the cp210x driver).

    My dmesg shows all the modules successfully loaded (just like your dmesg shows). However putting the USB stick in or plugging it out, doesn’t do anything! The part where it would be detected in dmesg doesn’t happen:
    I’m trying to see if I can turn on debugging messages so I can figure out why the driver is not attaching to the USB device. I’ve so far tried the following:

    Using insmod with params “debug=1” (no change in logging)
    Tried using modprobe instead of insmod (fails with some error about chdir not found).
    The blue light is on on the z-stick indicating a good connection.
    Tried different ports on the motherboard.
    Tried different order of module-loading (no effect).
    Tried updating the cp210x.c to have debug=1 in the variable declaration (recompiling etc. – no effect).

    I’m kind of out of ideas on what to try next.

    I verified the z-stick is working fine under a windows environment after using the driver supplied by the company.

    Hi mate, apparently, we share the same problem.
    Please let me know if you find the correct files that i also need. 🙂


  17. Impressive elements the following. Now i am very delighted to check your current article. Many thanks and I’m having a look in front to consult anyone. Do you want to you need to shed me a e-mail?

  18. Please can somebody help me?

    I’m looking for a cedarview ( 1512+) 4.2 driver for my usb to serial cable.

    I’m using this cable (p1) for my dutch smart meter and domoticz (domoticz.com) but I’m a real linux compile noob. Evertime i get errors (no target, disk full, wrong files etc.)

    Does somebody have already compiled this driver?

  19. Hi.

    Congratulations on incredibile tutorial !
    I’m trying to compile some kernel modules for my Synology DS213+ that are required for StrongSwan(VPN server) to work.
    Here is list of modules:

    I’ve followed your tutorial and everything went fine till last step:
    – make menuconfig … I selected modules that I think I need
    – make modules:
    I get following error:

    /usr/local/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-ld: arch/powerpc/lib/crtsavres.o: No such file: No such file or directory
    make[1]: *** [crypto/aes_generic.ko] Error 1
    make: *** [modules] Error 2

    Problem is probably in Cryptograpic module.
    I’ve googled for answer and tried manualy build this file with:
    make arch/powerpc/lib/crtsavres.o

    but I get error:
    $ make arch/powerpc/lib/crtsavres.o
    *** 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

    Now I’m stuck at this point.

    Could you please help me ?

    My computer/nas is:NAS Synology:
    – model DS213+
    – CPU: Freescale QorIQ P1022
    – Arch: PowerPC
    – Endianness: Big Endian
    – Linux 2.6.32
    – uname -a:
    Linux XXXX #3776 SMP Sat Aug 17 02:11:24 CST 2013 ppc GNU/Linux synology_qoriq_213+

    – gcc4374_eglibc2874_qoriq-GPL.tgz (DSM 4.3 Tool Chains / PowerPC QorIQ Linux 2.6.32)

    Synology NAS source:
    – synogpl-3776-qoriq.tbz


  20. Hi Charles,

    I built with your helpFTDI USB-driver for my DS 213+ and it works. This is really a great tutorial!

    Thank you very much!

  21. Hi Charles,


    After a DSM upgrade to the latest release (no kernel change what so ever!) my serial device stopped working.. Maybe you have some indepth knowledge that I am lacking 😉


    Hope you have an idea 🙂



  22. Hi,


    just tried to compile for new ds214play but got stuck here when i try to make modules:


    HOSTCC  arch/x86/tools/relocs
    CHK     include/linux/version.h
    UPD     include/linux/version.h
    CHK     include/generated/utsrelease.h
    UPD     include/generated/utsrelease.h
    CC      kernel/bounds.s
    kernel/bounds.c:1:0: error: code model âkernelâ not supported in the 32 bit mode
    kernel/bounds.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
    make[1]: *** [kernel/bounds.s] Error 1
    make: *** [prepare0] Error 2

    • Sven,

      May be the problem is coming from wrong version or architecture x86 and x64 I already encounter this problem one day, I think I gave the command to avoid this in my original post, Have you tried it out ?

      The command was before compilation :

      apt-get install libc6-i386


  23. Dear,

    I am trying to compile the ftdi and USB modules for my Synology DS210+ running on DSM4.3.

    somehow I only get the .o and .c files in the ./driver/usb/serial folder and not the .ko files.

    What I did:
    Downloaded and extracted the following files in /usr/local

    and this one in /usr/local/powerpc-linux-gnupse/ :
    synogpl-3776-853x.tbz of the 3776 Branch.

    Afterward copied the config file to the source/linux-2.3.6 dir
    run make old config by command line (somehow editing the Makefile is not working for me properly).

    From the linux-2.3.6 dir:
    make ARCH=powerpc \ CROSS_COMPILE=/usr/local/powerpc/linux-gnuspe/bin/powerpc/linux.gnuspe- oldconfig


    Next menu config:

    make ARCH=powerpc \ CROSS_COMPILE=/usr/local/powerpc/linux-gnuspe/bin/powerpc/linux.gnuspe- menuconfig


    make ARCH=powerpc \ CROSS_COMPILE=/usr/local/powerpc/linux-gnuspe/bin/powerpc/linux.gnuspe- modules

    Looks like it is doing something:

    Scripts/kconfig/conf -s arch/porwerpc/Kconfig
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    CALL scripts/checksyscalls.h
    CC [M] drivers/usb/serial/usb-serial.o
    CC [M] drivers/usb/serial/usbserial.o
    CC [M] drivers/usb/serial/ftdi_sio.o


    But afterward no .KO files are present.. who can help me out???

    It is frustrating as I tried this a couple of times now on different VM’s (Debian 7 , Ubuntu 10.4 and 12.4)


  24. Patrick,

    Hummm, strange thing with the crtsavres, thank you for the head up, it could help a lot if we encounter this specific problem.

    Glad you succeded to compile, always not simple 😉


  25. Hi Lucus, did you find a fix to this? I am suffering from the same problem.

    I am running 12.04 in a VM, and all other steps 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

    I have done some research and it appears that 12.04 is supposed to have version 2.20 at least. I also cannot display the version of binutils I have, does anyone know of a command to show this?


  26. Hello, As far as I know I followed everything that you have
    written here. But I still can get it to work. I get the following
    error: **************************** [ 1039.361429] usbip
    2-2.4.4:1.0: Enter [ 1039.361438] usbip 2-2.4.4:1.0: 2-2.4.4 is not
    in match_busid table… skip! [ 1039.368633] cp210x 2-2.4.4:1.0:
    cp210x converter detected [ 1039.526235] usb 2-2.4.4: reset
    full-speed USB device number 40 using ehci_hcd [ 1039.632899] usb
    2-2.4.4: device firmware changed [ 1039.696604] usb 2-2.4.4: cp210x
    converter now attached to ttyUSB1 [ 1039.737871] usb 2-2.3.4: USB
    disconnect, device number 38 [ 1039.770065] cp210x ttyUSB3: cp210x
    converter now disconnected from ttyUSB3 [ 1039.827365] cp210x
    2-2.3.4:1.0: device disconnected [ 1040.023071] usb 2-2.3.4: new
    full-speed USB device number 41 using ehci_hcd [ 1040.128837]
    drivers/usb/core/hub.c (2154) Same device found. Change serial to
    0000 [ 1040.203830] usbip 2-2.3.4:1.0: Enter [ 1040.203841] usbip
    2-2.3.4:1.0: 2-2.3.4 is not in match_busid table… skip! [
    1040.211049] cp210x 2-2.3.4:1.0: cp210x converter detected [
    1040.385874] usb 2-2.3.4: reset full-speed USB device number 41
    using ehci_hcd [ 1040.490557] usb 2-2.3.4: device firmware changed
    [ 1040.556073] usb 2-2.3.4: cp210x converter now attached to
    ttyUSB3 [ 1040.590262] usb 2-2.4.1: USB disconnect, device number
    39 [ 1040.615956] cp210x ttyUSB2: cp210x converter now disconnected
    from ttyUSB2 [ 1040.685560] cp210x 2-2.4.1:1.0: device disconnected
    [ 1040.889917] usb 2-2.4.1: new full-speed USB device number 42
    using ehci_hcd [ 1040.994485] drivers/usb/core/hub.c (2154) Same
    device found. Change serial to 0000 [ 1041.002281]
    drivers/usb/core/hub.c (2154) Same device found. Change serial to
    0001 [ 1041.010030] drivers/usb/core/hub.c (2154) Same device
    found. Change serial to 0002 [ 1041.055851] usbip 2-2.4.1:1.0:
    Enter [ 1041.055861] usbip 2-2.4.1:1.0: 2-2.4.1 is not in
    match_busid table… skip! [ 1041.063037] cp210x 2-2.4.1:1.0:
    cp210x converter detected [ 1041.189382] usb 2-2.4.1: reset
    full-speed USB device number 42 using ehci_hcd [ 1041.296677] usb
    2-2.4.1: device firmware changed [ 1041.357395] usb 2-2.4.1: cp210x
    converter now attached to ttyUSB2 [ 1041.391070] usb 2-2.4.4: USB
    disconnect, device number 40 [ 1041.433106] cp210x ttyUSB1: cp210x
    converter now disconnected from ttyUSB1 [ 1041.499037] cp210x
    2-2.4.4:1.0: device disconnected [ 1041.695311] usb 2-2.4.4: new
    full-speed USB device number 43 using ehci_hcd [ 1041.803312]
    drivers/usb/core/hub.c (2154) Same device found. Change serial to
    0000 [ 1041.811098] drivers/usb/core/hub.c (2154) Same device
    found. Change serial to 0001 [ 1041.818805] drivers/usb/core/hub.c
    (2154) Same device found. Change serial to 0002 [ 1041.826569]
    drivers/usb/core/hub.c (2154) Same device found. Change serial to
    0003 ********************************* I hope somebody can help me
    to solve this problem.

  27. Hi there,

    I was wondering if you could create DVBC drivers, i have this DVBC card:

    In the source /usr/local/x86_64-linux-gnu/source/DVB/ i find drivers and i think it contains all drivers also for my card.. But when i run menuconnfig i cant find it to enable..

    Can you please create the files for me.. I have:

    3.2.30 #3202 SMP Fri Mar 1 01:03:15 CST 2013 x86_64 GNU/Linux synology_bromolow_3612xs

    (its a http://xpenology.com dsm 4.2 (normal pc))

    Im willing to donate you 20$ if you create this for me.

  28. First, great article. Congrats. One quick doubt: What do
    you mean by “I went to Device Driver / USB Support / USB Serial
    Converter support and checked all as Module, then exited.” ? Where
    are these “Device Driver”, “USB Driver”, …? Was it supposed to be
    on my screen for me to select after running the “make

    • Hi rsc,
      Thank that you like my post, always fine for me if it can help.
      Yes you’re right, it is the menu that appears when you do
      make menuconfig

      Then you should have a menu on the screen to select the items, first select device drivers, then USB Drivers sub menu and so on.
      When in last menu check all drivers so that driver should be preceded by [*] or [M] instead of [ ]


  29. Great tutorial. Helped me a lot in addition to the
    “Synology_DiskStation_Manager_3rd_Party_Apps_Developer_Guide”. I
    want to use my DS 1512+ for having access to my home automation
    system KNX/EIB-Bus, which needs linknx and eibd to control it.
    Unfortunately theese are available compiled for Debian or RaspBerry
    systems only. So I’m going now to cross-compile the source code for
    the DS’s Atom-Cedar based BusyBox OS. ‘I’m just trying it – don’t
    know where it ends up.

  30. Hi – I am not sure how I work out what Synology sourcecode I need to download from sourceforge ? I am using a Synology 1513+ running:

    Linux diskStation 3.2.40 #3827 SMP Tue Feb 11 19:48:28 CST 2014 x86_64 GNU/Linux synology_cedarview_1513+

    Any help would be appreciated. I am tryign to get the PL2303 USB to Serial converter working. Cheers

  31. Hello Charles-Henri

    I just discover your article and great tutorial when searching on how to compile Synology source files.

    I know that I will probably be out of current topic (cross compilation) but here is my question(s) to you :

    Based on Synology NAS GPL Source files located on Sourceforge, is it possible to compile on another linux machine (real or vm) and then get this “nice” DSM web interface running on this linux machine ?

    I know that some people are able to run DSM on virtual machines (VMware or Virtualbox) but this is based on an existing vm image.
    So I am wondering if it is possible to build a machine from scratch and then run DSM based on “official” Syno source files ?

    Thanks in advance.
    Bonne journée.

    • Hello Supercopter,

      that’s a good question indeed. To be honest, it should be possible but may need some hack (minor or major) since the DSM should verify some hardware presence (I think). If you find how to do it I will be very interested on how to achieve this, could be interesting.


  32. Hi,

    thx for the guide and the links!
    MY additional remarks trying to connect a Arduino UNO to a DS211j, 4.3 DSM, 2.6.32 Kernel:
    – Compiling the kernel and modules worked withour errors in a 2.6.32 external Linux Distro (Fedora 12 on a Virtual Box VM)
    After I had the necesary .ko files:
    – I only had to insert the usbserial.ko module and then the /lib/modules/cpc_acm.ko module
    – then do a mknod /dev/usb/ttyACM0 c 166 0
    – then do a stty -F /dev/usb/ttyACM0 ispeed 9600 ospeed 9600

    reading from the serial.println of the arduino worked with cat /dev/usb/ttyACM0
    writing worked with echo “a” > /dev/usb/ttyACM0

    dmesg output:
    [ 6443.160000] usb 1-1.1: new full speed USB device using orion-ehci and address 8
    [ 6443.270000] usb 1-1.1: configuration #1 chosen from 1 choice
    [ 6443.280000] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device

  33. I have same question as Bonne.

    Based on Synology NAS GPL Source files located on Sourceforge, is it possible to compile on another linux machine (real or vm) and then get this “nice” DSM web interface running on this linux machine ?

    I know that some people are able to run DSM on virtual machines (VMware or Virtualbox) but this is based on an existing vm image.
    So I am wondering if it is possible to build a machine from scratch and then run DSM based on “official” Syno source files ?

    What it takes to build such machine for personal use ? i bet if some one figures out step by step procedure it will help many people as Freenas and openfiler do not offer features which synology offers.

  34. great guide. can i use it for dsm 5.0 4493 on ds3612xs?reat Great guide. can i use it for DSM 5.tutorial

  35. Hello , i can’t install the synogpl-paket, because “cannot mkdir: No space left on device” .
    I use putty and ssh for my diskstation 213j. i havent found a solve.
    I hope you can help me ..


    • Drakon,
      the packet is really huge, and as I mentioned into my post, it’s better to try to do the compilation onto another device (any linux box with some space). I’m not even sure that you can compile on the NAS directly and even if it may me possible, not sure it will work.

  36. Hello
    I am also looking urgently for dsm 5.0 4493 on ds3612xs
    I installed latest xpenology on N54L then synozwave but cannot loasd usbserial so I am wondering if you have any time/possibility to compile adequate modules
    Thanks a lot

  37. I am trying to compile for the N54L arch:
    DiskStation74> uname -a
    Linux DiskStation74 3.2.40 #4 SMP Wed Aug 20 13:04:11 CST 2014 x86_64 GNU/Linux synology_bromolow_3612xs

    I choose:

    cp synoconfigs/bromolow .config
    and keep:
    ARCH ?= x86_64
    CROSS_COMPILE ?= /usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-

    as there is no bromolow arch dir, am I right ?
    Thanks for your suppor

  38. Can I use this guide to make my wifi dongle USB-N13 (Rev B1) work? Only revision A1 is supported by default.

    Thanks in advance,


  39. Hi im a noob at linux and have no idea about any of this im trying to get both tuners of sony playtv and pctv 929e and a Leadtek WinFast DTV mini d working in tvheadend any help would be greatful thanks

  40. Hello,

    I proudly using your compilation for the pl2303.ko drivers in my DS1010+ NAS.

    Do you happen to have a compilation for DSM 5.1?
    Or, are the ones compiled for DSM 5.0 compatible?

    Best Regards,
    Merry Christmas and a
    happy new year.

    • Hi Jose,

      I also have a DS1010+ NAS and running DSM 5.1, the modules compiled in the tutorial are working fine (The one I have have been compiled more than 1 year ago).

      DiskStation> uname -a
      Linux DiskStation 3.2.40 #5004 SMP Sat Nov 29 01:35:20 CST 2014 x86_64 GNU/Linux synology_x86_1010+
      DiskStation> lsmod | grep serial
      usbserial 29535 3 cp210x,pl2303,ftdi_sio
      usbcore 160424 16 snd_usb_hiface,snd_usb_audio,snd_usbmidi_lib,cp210x,pl2303,ftdi_sio,usbserial,usbhid,usblp,usb_storage,etxhci_hcd,xhci_hcd,ehci_hcd,uhci_hcd

      I wish you a Merry Christmas and a happy new year.


  41. Sorry to post this here, I’ve installed DSM 5.1 and I’m having problems.
    I cannot load usbserial modules anymore.
    DiskStation> uname -a
    Linux DiskStation 3.2.40 #5021 SMP Fri Dec 19 20:37:17 CST 2014 x86_64 GNU/Linux
    DiskStation> insmod /opt/lib/modules/3.2.40/usbserial.ko
    insmod: error inserting ‘/opt/lib/modules/3.2.40/usbserial.ko’: -1 Invalid module format

    [ 4115.679182] usbserial: version magic ‘3.2.40 mod_unload ‘ should be ‘3.2.40 SMP mod_unload ‘

    I’ve got the drivers from your link of compiled drivers for DSM 5.0.

    Please help,
    Best regards,
    Jose Martins

  42. Charles,

    Sorry again, I was able to run your compiled drivers for DSM 4.3.

    Like you said, you were running one compiled for more than one year ago.

    The ones compiled for DSM 5.0 gave that error, and I was unable to use them.

    Anyway, thank you very much for your support.

    I have another problem.
    I have 2 usb serial adapters connected to my ds1010+.
    Sometimes the one gets the /dev/ttyUSB0, and sometimes /dev/ttyUSB1, this after reboot.

    Is there a way to force the serial usb to be always on the same port? (/dev/ttyUSB0) ?


    • Jose,

      for information just updated to latest DSM version 5.1 update 2 and modules still work.

      For connecting 2 devices, Under classic linux you would be able to set up them to be always the same /dev/ttyUSBx numbering using udev rules (see this link, very good explanation on how to).

      Unfortunately, Syno does not manage UDEV rules so you won’t be able to do this. I think if you don’t change your module from different USB port nor plug/unplug them, then when booting, the number will be preserved.

      If you have a better way to do this, let me know 😉


      • Hi Charles-Henri, looks like your comment on udev is no longer 100% correct. On my DS1511+ running DSM5.1, udev rules are used, and there’s no need to create the /dev/ttyUSB0 anymore at startup. Unfortunately I am unable to find out at what version this behaviour changed as I started with USB drivers on DSM5.1.

        I’d be interrested to see if DSM5.0 and older actually still needs the mknod and chmod actions or if /lib/udev/rules.d files could take care of the permissions(and potentially persistent naming) actually upon that search I stumbled on this post.

        • Geert,

          Oh, thanks for this point, it’s nice that now DSM have udev right out of the box, good news, newt time I will modifiy the post I will mention it.


  43. Oh ho!
    I made use of this guide, along with a tool called vagrant (https://www.vagrantup.com/) to create an ubuntu development environment.
    I then ssh’d into that environment and followed your guide for my DS1513+ running DSM 5.1-5021 Update 2.

    I set up my Makefile with the required variables directly (as I won’t be compiling for anything else, atm).

    I currently have no plans on using any additional devices on my synology atm, but I wanted this to work since I needed the compilation tools for my unit anyways (will be compiling programs instead).

    I do use an Arduino UNO (and a Nano just recently to create a controller for my aftermarket heated seats and my stock auto a/c controller) and I intend to create something dealing with home automation, so I needed this to work anyways (would love some tips about arduino development on a Synology – do I develop in my OS of choice while using Serial to communicate between the DS and the Arduino, meaning I need to create a set of commands for both to recognize in between?).

    Anyways, your guide helps a lot, because if a kernel source or module compiles, then surely a c program will as well.

    Also, please look into vagrant;
    I do most of my development now on a school issue macbook pro with only os x installed (windows 8.1 trashed my last dual boot setup), and I like having access to my os x applications during development.
    Vagrant is essentially a tool to create clean and reproducible development environments.
    I literally just used it for the first time while reading your tutorial.
    There are other benefits like being able to share my environment with others or being able to use my OS X development applications to write my code while being able to compile them with Ubuntu (or your prefered distro).
    There is even a way to have vagrant load every single prep command you did on this tutorial until the point of actual compilation.

    I think I will start running a blog on my synology and show the steps to get that done.

    Anyways, enough selling;
    For those interested in USB Serial drivers (FTDI, PL2303, USB Serial and some other things) for a Synology DS1513+ with DSM 5.1 (cedarview) built with gcc473_glibc217 and synogpl-5004 sources, here is the link: http://avnet.ws/shared/gcc473_glibc217_x86_64_cedarview-5004-drivers_usb_serial.zip
    I am not 100% sure if they work, I just built them, and I need someone to test them (I’m not sure how to just yet, and busy with developing a website atm).
    So please download, test and report back~

    Also, to the poster of this awesome tutorial:
    Merry Christmas and Happy New Year!

    • Hi Luis,

      Thank you for your great head up, I wasn’t aware about Vagrant, seems to really be fine, I really need to take a look closer, because setting up multiple dev env is really a mess, this tool should be able to solve this.

      Using this tutorial can also help you to compile classic C program, until they do not want link to other libraries. Most pain I had was with my SQL client, because you need the same version as the one provided by Synology and it’s really complicated to get this all working together. I still do not know why Synology does not provide the default USB Serial drivers into the DSM distrib, it could save us lot of time and it would cost nothing for them.

      Thank you for sharing your link, I’m sure it will help others 😉

      I wish you also a Merry Chritmas and Happy New Year !!!


  44. I have been working pretty much nonstop since I discovered Vagrant creating the required Vagrantfile, provision.sh (my provision script) and other files like an edited copy of Makefile (still figuring out sed) and a text file holding links to the tools that correspond to your diskstation.

    I’m not 100% done, but it works quite well so far.
    And as you might have read, it recreates environments as configured every single time.
    Really liking that I am taking your instructions and adapting them for my DS1513+ on Vagrant, and all I type is ‘vagrant up to get the host started, then ‘vagrant ssh’ to interact with it.

    If you are interested, I can send you what I have so far for you to check out (the way I have it set up should make it obvious as to what you need to replace for different synology boxes).

  45. Charles,

    Yes, In my DSM 5.1 instalation, I’m only able to run your compilation for DSM 4.3.

    The ones for compiled for 5.0 give that error on “insmod”…
    DiskStation> insmod /opt/lib/modules/3.2.40/usbserial.ko
    insmod: error inserting ‘/opt/lib/modules/3.2.40/usbserial.ko’: -1 Invalid module format

    [ 4115.679182] usbserial: version magic ‘3.2.40 mod_unload ‘ should be ‘3.2.40 SMP mod_unload ‘


  46. Jose,
    What is your “uname -a” output?
    Let me take a stab at building your files to see if my scripts and environment is working properly.
    Can’t guarantee if the files will work if the source itself is no good, but I will give it a try.
    What modules do you need?

  47. Hello,

    We have a DS 214+ running DSM 5.1-5022 Update 4, and a Leonics UPS with a RS232 port.

    You tutorial seems clear but it also seems to be beyond my capabilities, so any help would be appreciated.




  48. No I don’t have it. This is what I have in /opt/etc/:

    CeerdLocalServ> cd /opt/etc/

    Box1> dir

    drwxr-xr-x    3 root     root          4096 Mar 30 18:07 .

    drwxr-xr-x    6 root     root          4096 Mar 30 18:09 ..

    drwxr-xr-x    2 root     root          4096 Mar 30 17:39 ipkg

    -rw-r–r–    1 root     root          1040 Feb 16  2012 ipkg.conf

    -rw-r–r–    1 root     root          8728 Feb 14  2012 nanorc

    • Hello Charles,

      Me again! I removed ipkg then restarted the whole procedure again with a slightly different tutorial (https://github.com/basmussen/ds414-boostrap-dsm5) — Note: this also works for DS214+ —. I now have the /init.d directory in place and order and was able to create the S10modules script for the modules to load at boot time. BTW, I appended the ‘.sh’ extension to the file although I am not entirely sure it is necessary.

      Anyhow, I am not sure why with the previously used tutorials it didn’t create the /init.d directory although ipkg seemed functional since I was able to install nano.

      Thank you for having taken the time to answer and keep up the good work.


  49. Bonjour,

    je suis bloqué depuis quelque jours sur un probleme de compilation pour SMSC75xx.ko (driver USB LAN Gbit) je suis sur Xpenology DSM 5.1 sur plateforme x86_64 (Intel Atom 230) le module compilé se charge mais la carte ne fonctionne pas (link down alors que cable branchés et diodes fixes)


    Any advice ?

    • Bruno,

      Si le module se charge avec insmod, c’est que la compilation est OK, et c’est le plus compliqué.

      Je ne connais pas Xpenology mais peut être serait-il judicieux de voir dans leur forum comment cette version détecte la carte réseau. As tu essayé de faire un ifup eth0 pour voir une fois le module chargé ?

  50. Merci pour cette réponse rapide qui me redonne du baume au coeur !

    Xpenology = trick pour utiliser DSM sur du materiel non Synology, donc globalement ca reste du DSM classique (je pense)

    mes test :

    Dmesg : carte detectée , nom : eth1 (j’ai plus les extraits du dmesg mais je peux mettre la main dessus)
    ifconfig eth1 up : ok

    La ou ca déconne : ethtool eth1 => link : no ,
    Alors que le cable est branché et LED ON (??!?)

    Du coup j’ai recompilé le module, maintenant ethtool me detecte bien le link mais IP Fixe ou DHCP impossible à joindre, (testée sur Ubuntu 14.04 , l’adaptateur marche très bien)

    je désespère…

    • Salut Bruno,

      Ouais je comprends ta frustration, mais je ne vais pas pouvoir d’aider sur ce point. C’est super curieux, mais pourquoi n’est-elle pas détectée en eth1, tu as une autre carte présente ?

Comments on this topic in community Forums.