Compiling Linux Kernel modules for Synology devices


Synology NAS are very versatile. They are running a stripped version of Linux with less kernel modules, but we can overcome this by compiling and adding modules (for instance the usbserial module used by usb serial converters).


How to proceed:

	computer$ tar -xzf yourToolChains -C /usr/local/
	computer$ tar -xzf yourNASGPLSource -C /usr/local/yourToolChains/
computer$ ssh -l root ipOfYourSynology
synology$ uname -a
Linux Syno youLinuxKernelVersion xxxxx yourSynologyArchi
computer$ cd /usr/local/yourToolChains/source/linux-youLinuxKernelVersion
computer$ cp synoconfigs/yourSynologyArchi .config
computer$ vi Makefile
edit the variable ARCH -> ARCH = yourSynologyAchi
edit the variable CROSS_COMPILE -> CROSS_COMPILE = /usr/local/yourToolChains/bin/yourToolChains-
computer$ make oldconfig
computer$ make menuconfig
computer$ make modules 
# or only a specific module: make M=./drivers/usb/serial
comments powered by Disqus