2015-06-02

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/

35 comments:

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

    ReplyDelete
    Replies
    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!

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

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

    ReplyDelete
  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 ?

    ReplyDelete
  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

    ReplyDelete
  6. Here you go:
    https://dl.dropboxusercontent.com/u/104542872/Blog/bzip2_1.0.6-1_arm.ipk

    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 @@
    LDFLAGS=

    BIGFILES=-D_FILE_OFFSET_BITS=64
    -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'
    PREFIX=/usr/local

    ReplyDelete
  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]'

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

    ReplyDelete
  9. This comment has been removed by the author.

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

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

    10bb4b15c92d3412ac63d2301b4b911f

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

    ReplyDelete
  13. That is strange
    are you sure your disk isn't full?
    Try to download the files one by one from this folder:
    https://www.dropbox.com/sh/otz6iawdz7khvp3/AADMRtijBnybxWe4kMpjXPkfa?dl=0

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

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

    ReplyDelete
  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 ?

    thx

    ReplyDelete
  17. This comment has been removed by the author.

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

    ReplyDelete
  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
    Dany

    ReplyDelete
  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 :)

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

    ReplyDelete
  22. Dany, so far I was able to compile glib but I need to take another shot at the other packages:
    https://dl.dropboxusercontent.com/u/104542872/Blog/glib_2.20.4-1_arm.ipk

    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:
    http://www.osboxes.org/debian/

    ReplyDelete
  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?
    Thanks
    Olivier

    ReplyDelete
  24. Hi Olivier,
    i have found better CFLAGS compilation flags for the target arm-linux-gnueabihf: -fPIC -marm
    i updated the toolchain template:
    https://dl.dropboxusercontent.com/u/104542872/Blog/toolchain-ds2015xs.mk
    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! :)

    ReplyDelete
  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;; \
    esac
    ./buildpython/python: 1: ./buildpython/python: Syntax error: word unexpected (expecting ")")
    Makefile:346: recipe for target 'sharedmods' failed
    make: *** [sharedmods] Error 2

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

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

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

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

    ReplyDelete
  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:
    https://www.cphub.net/?id=40&pid=519

    According to this post, the DS216play is supported:
    http://www.synology-forum.de/showthread.html?68335-EBI-Easy-Bootstrap-Installer/page12&p=599414&viewfull=1#post599414

    ReplyDelete
  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

    ReplyDelete
  32. Hi, try this:

    https://dl.dropboxusercontent.com/u/104542872/Blog/iptraf_3.0.0-1_arm.ipk

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

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

    ReplyDelete