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

Go Back   MobileRead Forums > E-Book Devices > Sony Portable Reader PRS-500/505 > Reader PRS-500 Dev Corner

Welcome to the MobileRead Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community today, you will have fewer ads, access to post topics, communicate privately with other members, respond to polls, upload content and access many other special features.

If you have any problems with the registration process or your account login, please contact us.

Hint: Don't have time to visit us daily? Subscribe to our main RSS feed to receive our frontpage posts at your convenience.

Notices

Reader PRS-500 Dev Corner Linux, hacking and development of software and hardware (specific to the PRS-500)

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-21-2006, 09:51 AM   #1
igorsk
Wizard
igorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankind
 
Posts: 3,111
Karma: 17432
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
lbhook.sh support patch

igorsk 1 - cramfs 0
Read the provided readme.txt for instructions.
Here's a sample script:
Code:
#! /bin/bash

PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/sony/bin:/usr/sbin"
LD_LIBRARY_PATH="/opt/sony/ebook/application:/lib:/usr/lib:/usr/local/sony/lib:/opt/sony/ebook/lib"
export PATH LD_LIBRARY_PATH

pstree -a -c -l >/tmp/pstree.log &
and its output (retrieved with "ebook.py get /tmp/pstree.log"):
Code:
init) 
  |-getty) console 
  |-(jffs2_gcd_mtd15)
  |-(jffs2_gcd_mtd16)
  |-(keventd)
  |-lbhook.sh) /tmp/lbhook.sh 
  |   `-pstree) -a -c -l 
  |-(msbdrv_thread)
  |-(mtdblockd)
  |-(sdbdrv_thread)
  `-tinyhttp.sh) /opt/sony/ebook/bin/tinyhttp.sh 
      `-tinyhttp)
Attached Files
File Type: zip PRSPatch-0.1.zip (78.3 KB, 791 views)
igorsk is offline   Reply With Quote
Old 10-21-2006, 10:12 AM   #2
gseryakov
Enthusiast
gseryakov began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Oct 2006
Device: Sony Reader
Quote:
Originally Posted by igorsk
igorsk 1 - cramfs 0
Read the provided readme.txt for instructions.
This is the breakthrough! Just a couple of questions to clarify.

Quote:
Originally Posted by readme.txt
1. dump the current Rootfs:
>ebook.py get /dev/mtd13 0x863000
...
5. upload new Rootfs:
>ebook.py pwrite "Rootfs" Rootfs.new
So Reader lets you read the flash partitions by addresses and write by names? Is there any way to read them by names?

What is the difference between cramfs from Reader and Librie? I mean - after mounting the cramfs-es.
__________________
GS
gseryakov is offline   Reply With Quote
Old 10-21-2006, 10:39 AM   #3
arivero
Guru
arivero doesn't litterarivero doesn't litter
 
arivero's Avatar
 
Posts: 607
Karma: 197
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
Quote:
Originally Posted by gseryakov
So Reader lets you read the flash partitions by addresses and write by names?
Amazed of this. I was afraid that you were going to need to dd it, and of course you can not dd if you can not to run scripts. But straight access to the partition is a bless! Moreover tiu need it, because a file by file extract is not able to recover ln files, /dev things and all these "minor" issues.

Quote:
Today 01:51 PM
Did you got to sleep, igorsk ?

Quote:
What is the difference between cramfs from Reader and Librie? I mean - after mounting the cramfs-es.
Judging from the filesystem dumps, the architecture of the aplication has changed, but it seems that the Operating System is the same. Meaning that perhaps the communication trick (console access via usb) could work straight from librie to reader without modification, and perhaps even the display utilities to upload jpg from scripts. Next steps are, in random order:

a) try for console access via USB.
b) try to show a picture in the display using command line utilities.
c) try my command line utilities for DJVU files.
d) review how to compile Andrew's "simple reader", of if it works straighforward.
e) if not console access, create a "SMS-phone" way to enter text to show it in the console. Note that the netpbm utilities, a lot of them, are included in the djvu package, and this includes some text display utility, I believe to remember.
arivero is offline   Reply With Quote
Old 10-21-2006, 10:55 AM   #4
Slava
Addict
Slava doesn't litterSlava doesn't litter
 
Slava's Avatar
 
Posts: 263
Karma: 129
Join Date: Sep 2006
Device: PRS-500 · DR1KS
Quote:
Originally Posted by arivero
... Next steps are, in random order:

a) try for console access via USB.
b) try to show a picture in the display using command line utilities.
c) try my command line utilities for DJVU files.
d) review how to compile Andrew's "simple reader", of if it works straighforward.
e) if not console access, create a "SMS-phone" way to enter text to show it in the console.
Next step will be to copy Russian fonts to /opt/....


Quote:
Originally Posted by igorsk
igorsk 1 - cramfs 0
Excellent
Slava is offline   Reply With Quote
Old 10-21-2006, 11:22 AM   #5
gseryakov
Enthusiast
gseryakov began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Oct 2006
Device: Sony Reader
Quote:
Originally Posted by Slava
Next step will be to copy Russian fonts to /opt/....
Yeah! It was a Russian party from the beginning, because the Reader hack is of terrible need for Russians to drink^Wsmoke^Wread Russian books!
__________________
GS
gseryakov is offline   Reply With Quote
Old 10-21-2006, 11:42 AM   #6
Slava
Addict
Slava doesn't litterSlava doesn't litter
 
Slava's Avatar
 
Posts: 263
Karma: 129
Join Date: Sep 2006
Device: PRS-500 · DR1KS
Igor,

I wonder if it's possible to create softlinks for directories under /opt tree to updatable filesystem like /Data? It will make updating fonts and graphics much easier.
Slava is offline   Reply With Quote
Old 10-21-2006, 11:46 AM   #7
NatCh
Gizmologist
NatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the end
 
NatCh's Avatar
 
Posts: 11,484
Karma: 31590
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: PRS600
igorsk, You Da Man! You Da Man!
NatCh is offline   Reply With Quote
Old 10-21-2006, 11:55 AM   #8
igorsk
Wizard
igorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankind
 
Posts: 3,111
Karma: 17432
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Quote:
Originally Posted by gseryakov
So Reader lets you read the flash partitions by addresses and write by names? Is there any way to read them by names?
Download /proc/mtd to see mapping between device numbers and partitions. Then you can use "ebook.py pinfo" command to get the partition info (there ain't much). You can also execute "/usr/local/sony/bin/nblsdm list" with redirection via the script hook.
Quote:
Originally Posted by gseryakov
What is the difference between cramfs from Reader and Librie? I mean - after mounting the cramfs-es.
You can always extract both and compare From what I've seen, they're almost the same - Reader has an extra SD driver but that's about it. The main difference is the reading application.
Quote:
Originally Posted by gseryakov
I wonder if it's possible to create softlinks for directories under /opt tree to updatable filesystem like /Data? It will make updating fonts and graphics much easier.
Probably the same trick as with /etc would work, i.e. copy files to ramdisk and remount under a subdir. However, currently the hook script runs after tinyhttp so I'm not sure if the updated fonts will be loaded.
igorsk is offline   Reply With Quote
Old 10-21-2006, 12:20 PM   #9
igorsk
Wizard
igorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankind
 
Posts: 3,111
Karma: 17432
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
For the brave, here's modified cramfs tools from Cygwin which I used to extract and reassemble the cramfs image. To make sure you get the same permissions in your new filesystem, use a devtable file (-d in cramfsk and -D in mkcramfs).
A few things to know to minimize a chance to brick your device:
1) Linux0 and Rootfs2 are kernel and root fs used in the recovery (update) mode. It's best not to touch them.
2) USB control is handled by switcher.so (loaded by tinyhttp) in normal mode, and by /opt0/UsbUpdater in recovery mode. So, disabling any of them will leave you without a way to control the unit via USB.
3) Using USB interface, in normal mode you cannot write flash partitions and in recovery mode you cannot read and write files.
Attached Files
File Type: zip cramfs-tools.zip (1.52 MB, 1323 views)
igorsk is offline   Reply With Quote
Old 10-21-2006, 03:49 PM   #10
arivero
Guru
arivero doesn't litterarivero doesn't litter
 
arivero's Avatar
 
Posts: 607
Karma: 197
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
Quote:
Originally Posted by igorsk
However, currently the hook script runs after tinyhttp so I'm not sure if the updated fonts will be loaded.
It can kill tinyhttp and relaunch it, in any case.
arivero is offline   Reply With Quote
Old 10-21-2006, 06:56 PM   #11
TadW
Uebermensch
TadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipseTadW can illuminate an eclipse
 
TadW's Avatar
 
Posts: 2,476
Karma: 8172
Join Date: Jul 2003
Location: Italy
Device: Kindle
Quote:
Originally Posted by igorsk
igorsk 1 - cramfs 0
You rock, igor!
TadW is offline   Reply With Quote
Old 10-21-2006, 08:19 PM   #12
porkupan
Addict
porkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheese
 
porkupan's Avatar
 
Posts: 251
Karma: 1226
Join Date: Sep 2006
Location: South Jersey, US
Device: REB1100, Sony Reader, nook
Igor,
Just wondering, why are you dumping 0x863000 bytes of Rootfs while the actual size of the filesystem is supposed to be 0x980000? Did you try dumping the whole 0x980000 bytes?
porkupan is offline   Reply With Quote
Old 10-21-2006, 09:57 PM   #13
igorsk
Wizard
igorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankindigorsk has exceeded all limitations known to mankind
 
Posts: 3,111
Karma: 17432
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
The partition size is 0x980000. However, the actual size used by the cramfs image is 0x863000. You can check it yourself, it's specified in the second dword of the image.
igorsk is offline   Reply With Quote
Old 10-23-2006, 11:20 PM   #14
porkupan
Addict
porkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheeseporkupan can extract oil from cheese
 
porkupan's Avatar
 
Posts: 251
Karma: 1226
Join Date: Sep 2006
Location: South Jersey, US
Device: REB1100, Sony Reader, nook
Thank you, igorsk!

porkupan is offline   Reply With Quote
Old 10-23-2006, 11:32 PM   #15
NatCh
Gizmologist
NatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the endNatCh knows the complete value of PI to the end
 
NatCh's Avatar
 
Posts: 11,484
Karma: 31590
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: PRS600
Y'all did it! Excellent!
NatCh is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TCPMP/Betaplayer sets standards with AVC support Alexander Turcic Handhelds and Smartphones 2 08-28-2007 11:32 PM
NetFront V3.3 Technical Preview with VGA support Colin Dunstan Handhelds and Smartphones 4 08-31-2005 08:41 AM
eReader 2.61 for Palm OS released Colin Dunstan Reading and Management 4 04-13-2005 08:05 PM
NetFront 3.2 for PPC with WM2003SE support released Alexander Turcic Handhelds and Smartphones 4 04-04-2005 02:04 PM
BetaPlayer 0.095 with aac and mp4 support Alexander Turcic Handhelds and Smartphones 2 12-22-2004 11:29 AM


All times are GMT -4. The time now is 04:35 PM.


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