12

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

Charles

Charles