|12-17-2006, 10:18 PM||#1|
Join Date: Sep 2006
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:
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-mvl126.96.36.199.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.
|12-18-2006, 09:11 PM||#2|
creator of calibre
Join Date: Oct 2006
Location: Mumbai, India
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
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-mvl188.8.131.52.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.
|12-18-2006, 10:12 PM||#3|
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.
|12-19-2006, 12:51 AM||#4|
Join Date: Dec 2004
where did you find
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.
|12-26-2006, 09:53 AM||#6|
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.
P.S. Unfortunaly installation of pached rootfs on my reader breakes with errors
Last edited by Corwin; 12-26-2006 at 10:00 AM.
|12-26-2006, 01:11 PM||#7|
Join Date: Dec 2006
He he! hello-static works perfectly!
Last edited by Corwin; 12-26-2006 at 01:30 PM.
|Thread Tools||Search this Thread|
|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|