Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : ROM Development


BrokenBird
07-29-2008, 11:51 AM
Hi, I would like to start developing for my PRS-505 and need some guidance, I would like to know where to start, what environment do I need (O/S, compiler, libraries, etc...).

What I want to do it replace to PRS-505 shell, I want to build a shell that will be folder based instead of meta-data based, and I want to make it more efficient so it won't crap out with 2000 books.

:thanks:

igorsk
07-29-2008, 12:08 PM
You need an ARM Linux toolchain. Try making a simple Hello, Wold app and run it using "Run Script" option in Universal Flasher.

BrokenBird
07-29-2008, 05:30 PM
Ok so I can make a simple application, but if I want to create a full ROM, how do I go about that? Is there a ROM depackager where I can extract existing ROM and modify some runtime behavior like removing the current shell and running mine?

Thanks

igorsk
07-29-2008, 06:39 PM
Yes, use cramfsck to extract the image and mkcramfs to make it.

BrokenBird
07-30-2008, 10:46 AM
Ok thanks.

Now I know how to decompress a ROM, I know how to upload with the flasher tool, but how do I extract the ROM from the PRS-505?

Thanks again.

igorsk
07-30-2008, 11:34 AM
Something like this:
cp /dev/mtdNN /Data/mtdNN
See /proc/mtd for the partition map.
N.B. never overwrite Loader, Linux2, Rootfs2 and Opt0 partitions - they handle the recovery mode which will allow you to unbrick the Reader with the official updater.

BrokenBird
07-30-2008, 03:12 PM
Not sure I follow, are you saying that partitions of the PRS will be mounted to my Linux when i plug it in? Or do I need some special tool to do this?

Also which Linux distribution do you suggest for development?

Thank you.

igorsk
07-30-2008, 04:43 PM
No, you need to run that command on the device (e.g. via "run script" option in the Universal Flasher).

BrokenBird
07-30-2008, 04:53 PM
Ok thanks.

And about the linux distribution, which one should I use?

Thanks

igorsk
07-30-2008, 04:57 PM
No idea, sorry. Just choose any for which there's a working ARM toolchain available.

BrokenBird
07-30-2008, 08:44 PM
Ok, since you asked this 2 years ago, I guess you have the answers: Which version of Crosstool do I need, and which gcc and glib versions. And should I go cygwin since I already have a windows setup?

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 (http://64.233.183.104/search?q=cache:www.public.asu.edu/~ajennin/librie.html) 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?.



Thanks a lot for your help.

porkupan
07-31-2008, 12:28 AM
Which version of Crosstool do I need, and which gcc and glib versions. And should I go cygwin since I already have a windows setup?
I believe you can use the instructions from here: http://www.public.asu.edu/~ajennin/librie.html

A couple of years ago I set up the latest version of crosstool on Cygwin, and it worked, but only after I shortened the directory names in the setup path and renamed the ones with spaces in them, as crosstool was having a hard time setting up and building the toolchain.

I also set up Crosstool on some real Linux systems, and it worked without a hitch.