Optware, ipkg and Bootstrap for Synology DS715,DS1515,DS2015xs,DS215+,DS416 (armv7l) [UPDATED CFLAGS]

This article has moved here: https://kryptogeld24.de/blog/2015/02/06/optware-ipkg-bootstrap-synology-armv7l/


  1. Work this for alpine4k CPU (ds215+)?

    1. Yes, just installed it on my brand new DS215+, worked like a charm. In fact, it's the only manual that actually worked. Thanks so much for all of your efforts creating it!

  2. Hi, I think it works since it should be the same architecture, try it! I don't have a DS215+ to test though.

  3. I testet your Compiling HowTo:

    touch builds/invalid.xsh is not possible by folder does not exists (on first Package). => First "mkdir builds", than touch builds/invalid.xsh

    I must install following package on new Ubuntu 14.02 :
    apt-get install flex (Error: lex is insufficient to compile libpcap)
    apt-get install byacc (Error byacc: Command not found)

  4. I have some packages following problems:
    make bzip2-ipk

    blocksort.o: relocation R_ARM_THM_MOVW_ABS_NC against `stderr' can not be used when making a shared object; recompile with -fPIC
    blocksort.o: could not read symbols: Bad value
    recompile with -fPIC

    How i can build it with -fPIC ?

  5. try to modify the settings of "configure" in the source directory of bzip2. configure.in I think but there are two files - I cannot remember exactly. Maybe I have some time tomorrow to take a look and try to compile it

  6. Here you go:

    I had to modify the Makefile, here is the patch/diff:

    --- builds/bzip2/Makefile_orig 2015-06-27 10:23:25.474941792 +0100
    +++ builds/bzip2/Makefile 2015-06-27 10:20:44.682936842 +0100
    @@ -21,7 +21,7 @@

    -CFLAGS=$(CPPFLAGS) -Wall -Winline -O2 -g $(BIGFILES)
    +CFLAGS=$(CPPFLAGS) -Wall -Winline -O2 -g $(BIGFILES) -fPIC

    # Where you want it installed when you do 'make install'

  7. Thank you! -fPIC was the right flag to compile successfull.

    I have my main packages successfull compile (it was tricky). Only python27/Python3, glib, gnupg1, gnupg it's not able to compile. I get following error Message:

    Error: selected processor does not support Thumb mode `swpb r2,r7,[r4]'

  8. Hi, I will take a look when I have some time

  9. This comment has been removed by the author.

  10. Hi,
    I've downloaded your bootstrap and tried to do your step-by-step on a DS215+.
    While "untaring" the package "bootstrap-alpine.tgz", I have the following error message:
    tar: A lone zero block at 155

    Could there be an issue while "untaring" the package ?

    Even with this error message, the package is unpaccked so I tried to do "sh bootstrap.sh" but I have the follwoing error message :
    : not foundh: line 2:
    : not foundh: line 5:
    bootstrap.sh: line 65: syntax error: unexpected end of file (expecting "then").

    Could it be an issue with the tgz package ?

    Thanks !

  11. Hi, i guess your download is corrupted. please re-download the file and check the MD5sum:


  12. Hi,
    I have checked the MD5sum and it matches with 10bb4b15c92d3412ac63d2301b4b911f so I have no idea what could be the issue :(

  13. That is strange
    are you sure your disk isn't full?
    Try to download the files one by one from this folder:

  14. Thanks.
    My disk is not full. I've downloaded them one by one and then try "sh bootstrap.sh" but I have an error message
    : not foundh: line 2:
    : not foundh: line 5:
    bootstrap.sh: line 65: syntax error: unexpected end of file (expecting "then")

    but I think it's linked to the fact that i'm trying this on DS215+ Synology which has a different CPU than yours.

  15. chniko, I encountered the same error as you. Upon "vi bootstrap.sh" there was an "^M" at the end of every line. When I removed them manually, everything worked fine!
    Must have been some sort of charset conversion issue...

  16. @Pascal: thanks, it's also working after removing those characters.

    The script is asking to backup the configuration. Is it enough to copy the folders "/volume1/@optware" and "/usr/lib/ipkg" to another directory ?
    In case the rest does not work, it's ok to just restore my backup folders ?


  17. This comment has been removed by the author.

  18. Hi,
    Now it's working. I had to edit "/root/.profile" and add the following path "/opt/bin"

  19. Thank you for your time. But without your help I would not have come so far. Take your time, the summer will be faster over :-)

    I think some packages can not be easily created. libpth i one of one dependencies of gnupg and i become following Message: (Unknown Linux (g)libc version and/or platform)

    But I am happy, the main packages are available:
    screen, iftop, mc, htop, bash4.3-39, namp, unrar, vim, etc.

    Greatings from Zurich

  20. Thanks Pascal for noticing. That's what you get when you edit scripts on windows.. I uploaded a new package.

    Dany, I don't have time this weekend but I will take a look next week :)

  21. I followed the steps to setup the build environment. However, on "make hello-ipk" the following error is produced:
    configure:3719: error: in `/home/pi/optware/ds2015xs/builds/hello':
    configure:3721: error: C compiler cannot create executables
    See `config.log' for more details

    Could you help me point out what to be looking for? NB: I tried this from a RPi/Raspbian, as it's my only "always-on" Linux machine available...

  22. Dany, so far I was able to compile glib but I need to take another shot at the other packages:

    Pascal, I don't know if this works on a Raspi. But do you really want to use it as a building machine, it's so slow! :D
    I used this Debian 8 VirtualBox:

  23. Hi,

    I want to backup my DS215+ with duplicity.

    I managed to compile the hello package. Now I try to compile py-duplicity. I corrected the makefile for bzip2 with your patch. Now I have this error:

    {standard input}: Assembler messages:
    {standard input}:95: Error: selected processor does not support Thumb mode `swpb r2,r7,[r4]'
    Makefile:1370: recipe for target 'mut_tas.lo' failed

    Could you help me?

  24. Hi Olivier,
    i have found better CFLAGS compilation flags for the target arm-linux-gnueabihf: -fPIC -marm
    i updated the toolchain template:
    put in in optware/platforms/

    to try again, delete the .configured file for libdb and try to compile it again:
    cd ds2015xs
    rm builds/libdb/.configured
    make libdb-ipk

    let me know if it works! :)

  25. PS: I could compile libdb but failed at python :(
    There were a couple of errors and some I could fix but i got stuck here:

    *-s*) LD_LIBRARY_PATH=/home/optware/optware/ds2015xs/builds/python24: CC='/home/optware/optware/ds2015xs/toolchain/arm-linux-gnueabihf//arm-linux-gnueabihf//bin/arm-linux-gnueabihf-gcc' LDSHARED='/home/optware/optware/ds2015xs/toolchain/arm-linux-gnueabihf//arm-linux-gnueabihf//bin/arm-linux-gnueabihf-gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./buildpython/python -E ../Python-2.4.6/setup.py -q build;; \
    *) LD_LIBRARY_PATH=/home/optware/optware/ds2015xs/builds/python24: CC='/home/optware/optware/ds2015xs/toolchain/arm-linux-gnueabihf//arm-linux-gnueabihf//bin/arm-linux-gnueabihf-gcc' LDSHARED='/home/optware/optware/ds2015xs/toolchain/arm-linux-gnueabihf//arm-linux-gnueabihf//bin/arm-linux-gnueabihf-gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./buildpython/python -E ../Python-2.4.6/setup.py build;; \
    ./buildpython/python: 1: ./buildpython/python: Syntax error: word unexpected (expecting ")")
    Makefile:346: recipe for target 'sharedmods' failed
    make: *** [sharedmods] Error 2

  26. Thanks a heap – was able to get ipkg and rsnapshot up and running with your compiled packages on my DS215+.
    Don't need to compile anything right now so that already did the trick for me.

  27. Thanks a lot! I built and installed mc for my DS416. Works like a charm!

  28. Chalk up another win for the DS416. After finding nothing helpful on the Synology wiki I stumbled across this. Hopefully other DS416 owners end up here as well, or Synology links to your blog from their wiki!

  29. Hello,

    According to this site : http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have and the result of the command "cat /proc/cpuinfo" the DS216play have a Processor ARMv7 Processor rev 0 (v7l) Cortex-A9.

    1) Is this step by step tutorial will lead to a certain fail?
    2) If it's the case (what i'm suspecting) what should I change in the process?
    3) Does anyone knows if the DSM6.0 (RC) will include ipkg?

    Thx you in advance.

  30. Hi, i can tell you it's pretty hard to do this for a new architecture. you need the right Toolchain and the correct compiling parameters.
    I don't think DSM will ever include ipkg.

    But i found this, it seems promising:

    According to this post, the DS216play is supported:

  31. Hi,

    thanks for all the effort to provide this info. I have a DS2015xs and got your pre-compiled tools to work easily. When I tried to compile iperf myself, I got stuck when I tried to access the svn repository on svn.nslu2-linux.org. It seems to be down. Any ideas? Could someone who has it all working compile iperf for me?

    Thanks in advance

  32. Hi, try this:


  33. Thanks, but the DS2015XS is Alpine not ARM, so I assume it will not work?

  34. It is arm, just a different Variant :)
    I compiled the package for the alpine CPU