Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-17-2006, 10:18 PM   #1
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Compiling for Reader: setting up the toolchain?

I want to try writing some code for the Reader. However, I'm not very familiar with Linux development, so I would like some advice from the more experinced MobileReaders.
As far as I know, firstly I need a cross-compiler toolchain. I found instructions for setting up a toolchain for Librie, but Librie uses older versions of gcc ang glibc, so I think that won't work too well.
From the listing of files in the Sony's source download repository:
hhl-target-gcc-3.2.1-mvl3.0.0.5.20.src.rpm
hhl-target-glib-1.2.10-mvl3.0.0.7.src.rpm
hhl-target-glibc-2.2.5-mvl3.0.0.15.14.src.rpm
So I guess I need to configure for gcc-3.2.1 and glibc-2.2.5, right?
Can I use those RPMs somehow? Or I'll have to use crosstool? I also found hhl-cross-gcc-3.2.1-mvl3.0.0.5.20.src.rpm, is this better than "target"? I have installed Ubuntu, will it work? Or it's better to get Redhat as it seems to be a preferred distro for Montavista? If so, which version? How about Cygwyn?

Last edited by igorsk; 12-17-2006 at 10:30 PM.
igorsk is offline   Reply With Quote
Old 12-18-2006, 09:11 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,796
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I have to admit, I've never done any cross compiling, but I do know that most people consider it to be a pin. I would recommend using crosstool from here
http://kegel.com/crosstool/

If you dont want to use crosstools, you can use the rpms...installing them into some directory like /usr/local/cross-prs500 with the --prefix options.

I think hhl-cross-gcc-3.2.1-mvl3.0.0.5.20.src.rpm is the cross compiler SONY used though I'm not sure. the target RPMs probably refer to the compiler/tool chain on the prs-500.

Ubunti is fine you can use rpm2targz http://www.fship.com/demos/rpm2targz to convert RPMs into tarballs or sudo apt-get install alien to install binary rpms on Ubuntu.

Hope that helps.
kovidgoyal is online now   Reply With Quote
Old 12-18-2006, 10:12 PM   #3
porkupan
Fanatic
porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.
 
porkupan's Avatar
 
Posts: 556
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
I've built crosstool for ARM on Cygwin, seems to work. Had to set the build directory to some real short path as the thing used to blow up on me with longer directory names. Current crosstool version comes with glibc 2.2.2 . I don't see any reason why you wouldn't be able to build glibc 2.2.5 with it. Unless the compiler couldn't handle it... I haven't tried compiling anything and running it on the Reader yet. The crosstool is able to compile and build ARM executables - testing it is part of the installation.

It's possible Sony was so nice as to distribute the installable binaries for the gcc (cross-compiler) in the Reader's source depository. After all, what do they have to lose? I would try installing those RPMs on RedHat or Fedora, hopefully the binaries would be compatible.
porkupan is offline   Reply With Quote
Old 12-19-2006, 12:51 AM   #4
jakeluck
Groupie
jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.jakeluck could sell banana peel slippers to a Deveel.
 
jakeluck's Avatar
 
Posts: 193
Karma: 3252
Join Date: Dec 2004
where did you find

hhl-cross-gcc-3.2.1-mvl3.0.0.5.20.src.rpm

i only see hhl-target at http://www.sony.net/Products/Linux/D.../PRS-500U.html

per recommendation of more redhat like distros, try centos, i use it for development for clients who requires redhat compliance.
jakeluck is offline   Reply With Quote
Old 12-19-2006, 03:48 AM   #5
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
jakeluck
Here's the cross-gcc rpm. However, it depends on binutils rpm, which I was unable to find.
igorsk is offline   Reply With Quote
Old 12-26-2006, 09:53 AM   #6
Corwin
Junior Member
Corwin began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2006
Igorsk, I've compiled sipmle program with crosstol. Can you trie to run it with your lbhook.sh ? This program prints "Hello world" to stdout.

http://max.hosting.ru/hello
http://max.hosting.ru/hello-static
P.S. Unfortunaly installation of pached rootfs on my reader breakes with errors

Last edited by Corwin; 12-26-2006 at 10:00 AM.
Corwin is offline   Reply With Quote
Old 12-26-2006, 01:11 PM   #7
Corwin
Junior Member
Corwin began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2006
He he! hello-static works perfectly!

http://www.the-ebook.org/forum/viewt...?p=64904#64904

Last edited by Corwin; 12-26-2006 at 01:30 PM.
Corwin is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Online Libraries on a Reader thebelljar Which one should I buy? 5 09-27-2010 09:49 AM
Is It Possible To Read Books From Net Libraries on the Sony Reader? Vienna01 Sony Reader 3 03-02-2010 08:22 AM
Toolchain Problems benjaminvm Sony Reader Dev Corner 3 12-02-2008 10:03 PM
iLiad Compiling iLiad toolchain for MacOSX Mike Kostousov iRex Developer's Corner 3 09-20-2007 11:54 PM
PRS-500 Compiling for the Reader alex_d Sony Reader Dev Corner 29 07-15-2007 12:29 PM


All times are GMT -4. The time now is 06:33 AM.


MobileRead.com is a privately owned, operated and funded community.