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 10-08-2013, 07:58 AM   #1
ebmr
Connoisseur
ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.
 
Posts: 94
Karma: 34554
Join Date: Aug 2012
Device: none
To rupor: Enable ADB

Would you mind telling the commands necessary to create both new
  • u-boot RAMDisk Image
  • Boot environment
as you did in your enable-adb, for example. (PM is ok.)

It would be a time saver to me.

Thanks in advance.

EDIT: Just the commands to create newly after I've made changes.

Last edited by ebmr; 10-08-2013 at 09:55 AM.
ebmr is offline   Reply With Quote
Old 10-09-2013, 01:59 PM   #2
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: 554
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
Making a ramdisk image:
Code:
# find . -print | cpio -o -H newc | gzip -v9 > ../ramdisk-adb.gz
# mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x70308000 -e 0x70308000 -n "Normal Rootfs" -d ramdisk-adb.gz ramdisk-adb.uimg
Unpacking and extracting a ramdisk image:
(for PRS-T2):
Code:
# dd if=T2_NAND_dump_1.0.03.09110.dd of=ramdisk.uimg bs=1024 skip=5120 count=1024
# dd if=T2_NAND_dump_1.0.03.09110.dd of=nboote.bin bs=1024 skip=15360 count=128

# mkdir ramdisk
# dd if=uramdisk.img of=ramdisk.gz bs=64 skip=1
2834+1 records in
2834+1 records out
181410 bytes (181 kB) copied, 0.0168186 s, 10.8 MB/s
# cd ramdisk
# gunzip -c ../ramdisk.gz | cpio -i -v
porkupan is offline   Reply With Quote
Old 10-09-2013, 05:39 PM   #3
ebmr
Connoisseur
ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.
 
Posts: 94
Karma: 34554
Join Date: Aug 2012
Device: none
Quote:
Originally Posted by porkupan View Post
Making a ramdisk image:
Code:
# mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x70308000 -e 0x70308000 -n "Normal Rootfs" -d ramdisk-adb.gz ramdisk-adb.uimg
Thanks a lot. (Nice to read of you again, btw.)

Hopefully you don't mind some further questions:
  • Why 0x70308000? Isn't 0x00500000 the entry point? (OTOH, the end of the reader partition (mmcblk2p4) would have to be 0x74C08000.)

Is there a tool to make a new Boot Env nboote.bin? If not:
  • The first 4 bytes are a checksum? Calculated by what method?
  • What is the meaning of the changed parameter 0x290 (from 0x1F4) in
    Code:
    mmc read 2 ${loadaddr_ramdisk} 0x2800 0x290
If there is documentation available somewhere, a link as reply would be appreciated as well.
ebmr is offline   Reply With Quote
Old 10-09-2013, 08:23 PM   #4
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: 554
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
Quote:
Originally Posted by ebmr View Post
Why 0x70308000? Isn't 0x00500000 the entry point? (OTOH, the end of the reader partition (mmcblk2p4) would have to be 0x74C08000.)
Well, this is the address in RAM, so the flash offset doesn't matter. Why that particular address? I dumped the parameters of the original ramdisk image, and copied them.

Quote:
Is there a tool to make a new Boot Env nboote.bin? If not:
  • The first 4 bytes are a checksum? Calculated by what method?
  • What is the meaning of the changed parameter 0x290 (from 0x1F4) in
    Code:
    mmc read 2 ${loadaddr_ramdisk} 0x2800 0x290
If there is documentation available somewhere, a link as reply would be appreciated as well.
I modified u-boot's fw_printenv/fw_setenv to allow working on a regular disk file (as opposed to going directly into the flash, which is what's normally done). Not sure the exact format of the environmental block, but you are probably right about the checksum. See the sources of u-boot to be sure. The environmental parameter that I changed had to do with length of the flash ramdisk image to be loaded into the RAM. Sony had specified very tight 0x1F4 blocks, we increased it to 0x290, since we added some files into the ramdisk, and it became bigger.
porkupan is offline   Reply With Quote
Old 10-09-2013, 08:37 PM   #5
rupor
Addict
rupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toysrupor shares his or her toys
 
rupor's Avatar
 
Posts: 204
Karma: 5658
Join Date: Jul 2007
Location: USA
Device: PRS 500,505,900,650,T1,T2, Nook ST
I was not able to use porkupan's method (modified fw_setenv) - so out of curiosity I simply used hex editor on my windows computer and verified that result is the same as he provided Second number (if I remember correctly) is number of blocks to be loaded and I believe checksum is CRC32 - I googled this.
rupor is offline   Reply With Quote
Old 10-10-2013, 07:42 AM   #6
ebmr
Connoisseur
ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.
 
Posts: 94
Karma: 34554
Join Date: Aug 2012
Device: none
porkupan, rupor .

This information is what I was looking for.
ebmr is offline   Reply With Quote
Old 10-11-2013, 03:16 PM   #7
ebmr
Connoisseur
ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.
 
Posts: 94
Karma: 34554
Join Date: Aug 2012
Device: none
Quote:
Originally Posted by porkupan View Post
Quote:
Originally Posted by ebmr
Why 0x70308000? Isn't 0x00500000 the entry point? (OTOH, the end of the reader partition (mmcblk2p4) would have to be 0x74C08000.)
Well, this is the address in RAM, so the flash offset doesn't matter. Why that particular address? I dumped the parameters of the original ramdisk image, and copied them.
I see (and should have worked it out for myself). I was thinking too much about real addresses and forgetting about the mmu.

BTW, it is interesting that the compression type header entry of the original ramdisk is 0 (no compression) where it should be 1 (gzip) since, in fact, it is gzip compressed.
ebmr is offline   Reply With Quote
Old 10-16-2013, 05:06 PM   #8
ebmr
Connoisseur
ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.ebmr is out to avenge the death of his or her father, Domingo Montoya.
 
Posts: 94
Karma: 34554
Join Date: Aug 2012
Device: none
Quote:
Originally Posted by porkupan View Post
Sony had specified very tight 0x1F4 blocks, we increased it to 0x290, since we added some files into the ramdisk, and it became bigger.
Is there a special reason for the extra 15 Blocks? 0x281 would have been enough.

Sony probably had added 10 extra blocks so that they can increase the rootfs image without updating the u-boot environment data, but if anyone of us provides a new rootfs image he must provide a new and appropriate u-boot environment anyway, because he doesn't know what the current u-boot environment looks like. So there seems no point in adding extra blocks.
ebmr 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
PRS-T1 Update rupor's AMR SonyReaderT1 Sony Reader Dev Corner 29 06-27-2013 08:07 AM
PRS-T2 Difference jailbreak.zip/rupor-jailbreak.7z & minimal-root-zeam.zip/rupor-minimal.7z? hyperstruct Sony Reader Dev Corner 9 01-06-2013 02:05 PM
Rupor GUI ? Schauberger Sony Reader Dev Corner 2 09-10-2012 09:48 AM
PRS-T1 Testmode / Enable ADB on stock (non-rooted) readers! uboot Sony Reader Dev Corner 2 08-19-2012 07:00 AM
Development Possible way to enable ADB during next update kveroneau enTourage Archive 20 12-23-2010 09:32 AM


All times are GMT -4. The time now is 09:05 PM.


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