Tutorial (small) how to compile a linux source for DS109

All discussions/development regarding the Marvell mv6281 Chip can be placed here.
Forum rules
Please note the disclaimer before modifying your Synology Product.

Tutorial (small) how to compile a linux source for DS109

Postby Sigma.nl » Tue Aug 11, 2009 2:02 pm

I've wrote a small tutorial on how to compile programs (from source), I've got little experience in compiling stuff but with the help of my
friend gooooogle and the synology "NAS Server 3rd-Party Apps Integration Guide" I've succesfully compiled some small programs:
antiword
pdftohtml
ppttohtml
xlhtml

I needed these programs for my knowledgebase to index doc, xls, ppt, and pdf files.
I hope it's usefull for them who want to compile some programs for there synology, Keep in mind that I use a DS109 with a marvell 88F6281 ARM
processor, I think this tutorial can also be usefull for people with other synology products but the need to do some modification (different toolchain,etc)
This (small) tutorial exists of a Cross_compile tutorial on Ubuntu and a tutorial How to compile on the synology box itself.

good luck.
Grtz
Sigma


Synology Ds109 Cross Compile package on ubuntu:

(need a ./configure file in the source package)

.) Install compiler tools in ubuntu: sudo aptitude install build-essential
.) Download toolchain from: http://downloads.sourceforge.net/projec ... 281.tar.gz
.) Extract: tar zxpf gcc343_glibc232_88f5281.tar.gz –C /usr/local/
.) Extract source files (from the program you want to compile) to: /usr/local/arm-none-linux-gnueabi/bin/ ; Just to make it easier to find the program
.) open terminal as [root] (sudo su) and enter: export PATH="${PATH}:/usr/local/arm-none-linux-gnueabi/bin:/usr/bin:/bin"
.) go the directory where the source files are: cd /usr/local/arm-none-linux-gnueabi/bin
.) run configure as follow: ./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i686-pc-linux --prefix=/usr/local
.) run make as follow: make CC=arm-none-linux-gnueabi-gcc ARCH=arm


Compile on synology box (need Optware installed):

.) ipkg install gcc
.) ipkg install make automake autoconf libtool binutils
.) ipkg install crosstool-native optware-devel (ignore the following error:

Configuring zlib
An error ocurred, return value: 1.
Collected errors:
Cannot find package crosstool-native.
Check the spelling or perhaps run 'ipkg update'
ERROR: The following packages conflict with wget-ssl:

.) Download source files of the package to FS_root (file system root)
.) "cd" to the directory where the package is installed
.) if you got a configure file just type: .configure
.) if you haven't got a configure file run: make ARCH=arm
.) try if you can start the compiled program with <program name> or ./<program name> if it works copy it to where you need it (example: /usr/bin)

If you have problems compiling on the synology box then use cross_compile on Ubuntu
I haven't figured out how to Cross_compile on Ubuntu without a configure file I've tried:
make CC=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
but is doesn't seems to work (program is still i686 based)

EDIT: modified the 1 version of this post and checked the compile on box tutorial
Sigma.nl
I'm New!
I'm New!
 
Posts: 6
Joined: Tue Aug 11, 2009 1:32 pm

Re: Tutorial (small) how to compile a linux source for DS109

Postby LA_ » Wed Jun 23, 2010 5:25 pm

did you manage to learn how the program can be compiled if configure file is not provided? if yes, could you please describe it. believe, autoconf can generate configure file.
Asus RT-N16 1.9.2.7-rtn-r1375 | Asus O!Play Air 1.09P | Synology DS210j
User avatar
LA_
Student
Student
 
Posts: 62
Joined: Mon Mar 08, 2010 3:23 pm

Re: Tutorial (small) how to compile a linux source for DS109

Postby DShoek » Wed Jul 21, 2010 6:23 pm

Did you manage to compile the antiword package for the Marvell Kirkwood processor? Would you mind post it somewhere?
I've been trying to compile the antiword source for hours, but didn't succeed. I would like to run the Owl DMS on my Synology 110j.
DShoek
I'm New!
I'm New!
 
Posts: 1
Joined: Wed Jul 21, 2010 6:17 pm

Re: Tutorial (small) how to compile a linux source for DS109

Postby menagerp » Sat Oct 16, 2010 6:58 pm

Hello,
I follow your tutorial, but when I try to run the configure command I have the following error
Code: Select all
> ./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i686-pc-linux --prefix=/usr/local
-ash: ./configure: not found

The configure command is not found.
What's the matter.
Thanks for your reply
menagerp
I'm New!
I'm New!
 
Posts: 2
Joined: Fri Oct 15, 2010 11:45 pm

Re: Tutorial (small) how to compile a linux source for DS109

Postby tom_almere » Sun Apr 14, 2013 8:16 am

I'm trying to instyall the native compiler on my synology as well,.
It's the DS209, which has the same cpu.

I'm having trouble understanding your last steps for the native compiler:

) ipkg install crosstool-native optware-devel (ignore the following error:

Configuring zlib
An error ocurred, return value: 1.
Collected errors:
Cannot find package crosstool-native.
Check the spelling or perhaps run 'ipkg update'
ERROR: The following packages conflict with wget-ssl:

.) Download source files of the package to FS_root (file system root)
.) "cd" to the directory where the package is installed

where do you download the package from, and where will it be installed ?
tom_almere
I'm New!
I'm New!
 
Posts: 4
Joined: Wed Jan 16, 2013 11:34 pm


Return to Marvell mv6281 Development Room

Who is online

Users browsing this forum: No registered users and 1 guest