Development for DS107+ (and other Marvell ARM based systems)

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

Postby yinka » Thu Aug 09, 2007 9:53 pm

Well, I use the qemu-arm-0.8.2-sb2 (just because it looks like the most recent :D )

You do not need to move your libraries around - that's a recipe for disaster! Just add /usr/local/lib to your /etc/ld.so.conf and run ldconfig.

I guess following the tutorial is tedious. Just logging into scratchbox and running the sb-menu is quite straightforward.

HINT: I use firefox so I installed the FireFTP extension. This makes transferring the compiled programs to Diskstation a lot easier for me.

Mike wrote:I choose the qemu-arm-0.8.0-m2 . Not a clue if it is right or not :)

But the bottom line is IT WORKS!!

had to move the libs from /usr/local/lib to /lib but after that Midnight commander is working.

Moving on to rar now :)

Must say it's a bit tedious as im a total beginner on linux but i'm also quite proud having compiled my first linux file :)

//Mike
yinka
I'm New!
I'm New!
 
Posts: 9
Joined: Wed Aug 08, 2007 8:29 am

Postby yinka » Thu Aug 09, 2007 10:00 pm

For those interested, the GPL sources are available at the french forum here: http://www.nas-forum.com/wiki/index.php/Sourcesgpl

Lurch81 wrote:New GPL sources are now available! :D
yinka
I'm New!
I'm New!
 
Posts: 9
Joined: Wed Aug 08, 2007 8:29 am

Postby ed_x » Fri Aug 10, 2007 10:10 pm

Wow! Scratchbox is really cool, it even comes with an emulator! I'm trying it right now.
ed_x
Rookie
Rookie
 
Posts: 32
Joined: Tue Nov 21, 2006 12:31 am

Postby polarbear » Sat Aug 11, 2007 2:19 am

Is there by any chance a Windows hosted development environment, maybe based on cygwin?
polarbear
Beginner
Beginner
 
Posts: 28
Joined: Sun Aug 05, 2007 8:54 am

Postby flipflip » Sat Aug 11, 2007 11:58 am

I use coLinux (and Cygwin). It works perfectly.
User avatar
flipflip
Novice
Novice
 
Posts: 55
Joined: Mon Oct 23, 2006 9:55 pm

Postby ed_x » Thu Aug 16, 2007 10:53 am

Float don't seem to work properly. Did anyone manage to get floats working? When I try some float test program, it crashes on the DS with an 'Illegal Instruction'. Can't really find how to do a softfloat either...
ed_x
Rookie
Rookie
 
Posts: 32
Joined: Tue Nov 21, 2006 12:31 am

Postby ikeke » Tue Sep 04, 2007 10:10 pm

Mike wrote:Can report that I followed yinkas information and the basic tutorial on Scratchbox. Althoug I had to go into the First chapter as well and run sb-menu to find the right q-emu as the string from the tutorial didn't work. I choose the qemu-arm-0.8.0-m2 . Not a clue if it is right or not :)

But the bottom line is IT WORKS!!//Mike


Thanks for your help Yinkas and Mike, it works for me too.
Just one question:

I compiled glib, ncurse and nano by using ./configure then make and make install but how do i proceed to put the result in the syno ? is there a way to have a list telling where all the files have been created and copied in the scratchbox environment ?
CS-407 | HD Model: 4x Samsung HD501LJ 500GB Raid5
DS-1010+ | HD Model: 3x Seagate LP 1.5 TB
http://www.nas-forum.com - Communauté Française des utilisateurs de NAS Synology
User avatar
ikeke
Seasoned
Seasoned
 
Posts: 564
Joined: Wed Oct 25, 2006 2:26 pm
Location: Lille - France

Postby m.aicardi » Wed Sep 05, 2007 1:00 am

After a first "wow" having run the "hello world" on my CS407, I tried compiling some simple programs: prozilla and nano.

They correctly run under Scratchbox, but when transferred to the CubeStation this is the result:
Code: Select all
CubeStation> ./nano
Illegal instruction (core dumped)


This is the file information:
Code: Select all
[sbox-CS407: ~/nano/nano/src] > file nano
nano: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses shared libs), not stripped

Anybody have some clue?

Thanks.

Marco
User avatar
m.aicardi
Student
Student
 
Posts: 63
Joined: Tue May 29, 2007 2:37 pm

Postby Mike » Wed Sep 05, 2007 7:40 am

ikeke;

The suggestion which I got from Ed in this matter as I'm just as large a newbie as you are is to when running ./configure add -prefix=/opt/<package_name>

Then you just tar the binaries which are put there after make and make install. Move them to the Cubestation and untar them in /opt/local (suggestion). Please ensure that your path is updated to also include /opt/local/bin

Good Luck
Mike
Student
Student
 
Posts: 65
Joined: Thu Aug 02, 2007 10:11 am

Postby ikeke » Wed Sep 05, 2007 8:13 am

Mike wrote:ikeke;

The suggestion which I got from Ed in this matter as I'm just as large a newbie as you are is to when running ./configure add -prefix=/opt/<package_name>

Then you just tar the binaries which are put there after make and make install. Move them to the Cubestation and untar them in /opt/local (suggestion). Please ensure that your path is updated to also include /opt/local/bin

Good Luck


Thanks a lot Mike, i'll try this solution :wink:
When you say i have to modify the path, i guess that you mean in the Syno ? if so, ok i'll do it.

I find the source of ipkg, and compiled it. it works on scratchbox so if i can install it on the syno, i'll make ipkg package of each apps i compiled
CS-407 | HD Model: 4x Samsung HD501LJ 500GB Raid5
DS-1010+ | HD Model: 3x Seagate LP 1.5 TB
http://www.nas-forum.com - Communauté Française des utilisateurs de NAS Synology
User avatar
ikeke
Seasoned
Seasoned
 
Posts: 564
Joined: Wed Oct 25, 2006 2:26 pm
Location: Lille - France

Postby ed_x » Wed Sep 05, 2007 9:42 am

that's not it. I suspect that scratchbox tries to do hard-float for arm-linux, which won't work on arm-v5tejl
ed_x
Rookie
Rookie
 
Posts: 32
Joined: Tue Nov 21, 2006 12:31 am

Postby ldesnogu » Wed Sep 05, 2007 10:08 am

ed_x wrote:that's not it. I suspect that scratchbox tries to do hard-float for arm-linux, which won't work on arm-v5tejl

My understanding is that Feroceon has hardware FP, similar to ARM standard VFP, but not 100% compatible (look at traffic on Linux ARM kernel mailing-list regarding Orion platform).
ldesnogu
Novice
Novice
 
Posts: 57
Joined: Sat May 19, 2007 4:18 pm

Postby Mike » Wed Sep 05, 2007 10:24 am

Wouldn't it be possible to create a native compiler from source which is compiled on the CS itself to avoid the float problem?
Mike
Student
Student
 
Posts: 65
Joined: Thu Aug 02, 2007 10:11 am

Postby ldesnogu » Wed Sep 05, 2007 10:38 am

Mike wrote:Wouldn't it be possible to create a native compiler from source which is compiled on the CS itself to avoid the float problem?

That would not change the problem *at all*, re-think about what you wrote ;-)

As I already wrote somewhere, Marvell and hence Synology use a cross-compiler provided by CodeSourcery.

The undefined instruction might be caused by two problems:
1. our compiler generates an undefined instruction (either the code generator is not OK for Feroceon or we use wrong flags)
2. the C library (or part of the startup code) contains an undefined instruction.
ldesnogu
Novice
Novice
 
Posts: 57
Joined: Sat May 19, 2007 4:18 pm

Postby yinka » Wed Sep 05, 2007 3:19 pm

Well, ldesnogu, I do not know much about the technicalities of the VFP code generation issue, but when I did a canadian cross-compiler (by compiling crosstool-4.3 twice) to run natively on the DS107+, the "llegal instruction" problem largely disappeared. Probably some issues with scratchbox also :?:

The ELDK native tools also compile very well on the DS107+, but the libraries are a different version :cry:




ldesnogu wrote:
Mike wrote:Wouldn't it be possible to create a native compiler from source which is compiled on the CS itself to avoid the float problem?

That would not change the problem *at all*, re-think about what you wrote ;-)

As I already wrote somewhere, Marvell and hence Synology use a cross-compiler provided by CodeSourcery.

The undefined instruction might be caused by two problems:
1. our compiler generates an undefined instruction (either the code generator is not OK for Feroceon or we use wrong flags)
2. the C library (or part of the startup code) contains an undefined instruction.
yinka
I'm New!
I'm New!
 
Posts: 9
Joined: Wed Aug 08, 2007 8:29 am

PreviousNext

Return to Marvell mv5281 Development Room

Who is online

Users browsing this forum: No registered users and 0 guests