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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-07-2012, 07:55 AM   #46
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,219
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Edit: Thanks geekmaster :-) The following is a reply to Kraqh3d above:
Yep, that sounds about right. However, I did not manage to bring Yifanlu's rescue kernel into a mode where it exports the partitions as it promises. This is probably just me not having stumbled over the right bits of documentation. Kernel is at 0x00041000, that's right. You need Yifanlu's kindletool, too, in order to unpack the update package that Yifanlu provides for his kernel - you need to flash the raw uImage. (And probably, you need to rename it so it has a ".bin" suffix, since ATK knows more than one source format.)

I have been running ATK *only* in WinXP on VirtualBox, since I don't even have a non-virtual installation of Windows XP. I've planned to try on Windows 7 on my notebook, but will not get to do that before monday.

Last edited by hawhill; 07-07-2012 at 08:00 AM.
hawhill is offline   Reply With Quote
Old 07-07-2012, 08:00 AM   #47
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by kraqh3d View Post
... I know, I know, I know. I really need to purchase a 1.8v TTL serial/usb cable. Why is the one from FTDI so expensive? I've got five PL-2303 based CA-42 cables that I've re-purposed for my other ARM boxes. It's too bad but they are 3.3v.

Any help will be appreciated, and I don't mind working up a detailed procedure from my experiences.

If this works, I'll need to break the Kindle again. Any suggestions on how to do it? I also should probably flash the original kernel back and restore standard 3.3 before breaking it.
You can voltage-shift your 3.3v adapters to 1.8v. You might only need one side of the "super simple level shifter" circuit I posted in its own thread (see the hardware index). On my K5, I only need a single diode and 22K resistor (plus removing a status LED on the 3.3v adapter because the K5 cannot sink enough current to extinguish the LED). The K4 and K5 have series 1K resistors on the serial Rx and Tx lines, so you must take that into account (which is why I use 22K resistor instead of 1K).

Last edited by geekmaster; 07-07-2012 at 10:58 AM.
geekmaster is offline   Reply With Quote
Old 07-07-2012, 10:48 AM   #48
kraqh3d
Member
kraqh3d began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2012
Device: Kindle
@hawhill:
I can tell you that ATK won't work with Win7 64-bit. It won't allow the drivers to install. I had to build a WinXP vm under Virtualbox. I let it install about a billion updates last night It's up and running today, but my bricked kindle seems to have no power. I have it charging on the ac adapter now.

This brings up a question. I was tailing syslog and noticed that the kindle as "SE Blank Ringo" kept connecting and disconnected from usb. This morning it was completely dead. Am I to assume it didnt have enough charge and that's why it was bouncing? I'm hoping charging it all day on the ac adapter will resolve that.

I looked through yifanlu's custom kernel package, and there's what I assumed was the raw uImage in the src folder. The md5sum is fea58fa8877279a70faa7355d9b28bb5. Does this match what you extracted? What I'm not sure about is if I get this flashed, how do I go about flashing the backup of mmcblk0p1? I'm not sure how that kernel exports the mmc block device. it's a hell of a lot easier to dd the img over than mount the img to copy the files. Alternatively, if I were to flash the 650MB img file thru ATK, what location do I use? (And it'll work even though the backup img is from another kindle, yes? there isn't some unique signature per kindle or the like?)



@geekmaster:
Thanks. I'll take a look at that. I used your extraction shell script to pull out the kernels from a dd copy of the first 32MB of the kindle mmcblk0. I was surprised that it extracted both a main_kernel and a diag_kernel. I thought from the other recovery thread that the K3 didn't have a recovery kernel? or does it simply not have a recovery partition and the recovery done via an embedded initrd in the diag_kernel?
kraqh3d is offline   Reply With Quote
Old 07-07-2012, 11:01 AM   #49
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by kraqh3d View Post
...
@geekmaster:
Thanks. I'll take a look at that. I used your extraction shell script to pull out the kernels from a dd copy of the first 32MB of the kindle mmcblk0. I was surprised that it extracted both a main_kernel and a diag_kernel. I thought from the other recovery thread that the K3 didn't have a recovery kernel? or does it simply not have a recovery partition and the recovery done via an embedded initrd in the diag_kernel?
Hmm... I suspect that the diags kernel is just a copy of the main kernel on a K3 (you could compare length or md5sum to be sure). I will have to revisit the latest script at some point. I sort of "half-remember" posting something about that before (just ignore or delete the diags kernel dump on a K3).

A lot of these raw tools created to assist experienced developers should probably be polished up a bit and made more "noob-friendly" (some day).
geekmaster is offline   Reply With Quote
Old 07-07-2012, 11:22 AM   #50
kraqh3d
Member
kraqh3d began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2012
Device: Kindle
It's not a copy as the extracted diag_kernel is huge. The main_kernel is 2.1MB while diag_kernel is 18.6MB. And file reports main_kernel as a uboot uImage file, but reports diag_kernel as data. I'm curious so I'm running binwalk against it, but that'll take a while.
kraqh3d is offline   Reply With Quote
Old 07-07-2012, 11:43 AM   #51
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by kraqh3d View Post
It's not a copy as the extracted diag_kernel is huge. The main_kernel is 2.1MB while diag_kernel is 18.6MB. And file reports main_kernel as a uboot uImage file, but reports diag_kernel as data. I'm curious so I'm running binwalk against it, but that'll take a while.
An earlier version of the script searched for the kernels (for future possible changes).

For increased speed, the newest version just dumps what it finds at the two kernel offsets in the image, getting the image length from the "header". On the K3 the second header contains garbage, so that long image was the result of a "garbage" image length. Just delete the (false) diags kernel image on a K3. It is just residue that can be safely ignored. Changing the script to detect it is running on a K3 and skip dumping the diags kernel would add to its complexity. Remember, it started out as a "one-liner" linux command anyway...
geekmaster is offline   Reply With Quote
Old 07-07-2012, 02:18 PM   #52
WoenK
Member
WoenK began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jul 2012
Device: Kindle3, Trekstor5
Quote:
Originally Posted by kraqh3d View Post
@hawhill:
I can tell you that ATK won't work with Win7 64-bit. It won't allow the drivers to install. I had to build a WinXP vm under Virtualbox. I let it install about a billion updates last night It's up and running today, but my bricked kindle seems to have no power. I have it charging on the ac adapter now.

This brings up a question. I was tailing syslog and noticed that the kindle as "SE Blank Ringo" kept connecting and disconnected from usb. This morning it was completely dead. Am I to assume it didnt have enough charge and that's why it was bouncing? I'm hoping charging it all day on the ac adapter will resolve that.
The connecting/disconnecting thingy was one of the things I also experienced. Tried to charge it via USB, but seems it did not work. Got the charger last night and it took over 5 hours until the light went out, I think the battery must have been pretty empty (which feels really noobish, because I trusted it to be fully charged via USB).

Is there anywhere a list of what starts at which memory adress ?
Looked through the Wiki but could not find anything
WoenK is offline   Reply With Quote
Old 07-07-2012, 02:22 PM   #53
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by WoenK View Post
The connecting/disconnecting thingy was one of the things I also experienced. Tried to charge it via USB, but seems it did not work. Got the charger last night and it took over 5 hours until the light went out, I think the battery must have been pretty empty (which feels really noobish, because I trusted it to be fully charged via USB).

Is there anywhere a list of what starts at which memory adress ?
Looked through the Wiki but could not find anything
You can look in the getkernels.sh script.
geekmaster is offline   Reply With Quote
Old 07-07-2012, 02:53 PM   #54
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,219
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
As for the offsets, there's a script in /etc, I think it was in /etc/init.d, named "functions" (with .sh suffix?) It contains the "offset wisdom":
Code:
MOVINAND_DEVICE=/dev/mmcblk0
MOVINAND_OFFSET_PARTITION=0 #0x00000000 Partition Map
MOVINAND_OFFSET_HEADER=1024 #0x00000400 DCD Header
MOVINAND_OFFSET_U_BOOT=3072 #0x00000C00 Boot Loader
MOVINAND_OFFSET_KERNEL=266240 #0x00041000 Linux Kernel
MOVINAND_OFFSET_ISISWF=3674112 #0x00381000 ISIS Waveform
MOVINAND_OFFSET_ROOTFS=3936256 #0x003C1000 Root filesystem
For ATK the hexadecimal offsets in the comments apply. Also, it shows the maximum kernel size, (3674112-266240=) 3407872 bytes.

The "root filesystem" offset is also the offset of partition 1.

I've successfully flashed kernels as well as a full root filesystem with ATK, the latter took about 2.5 hours. It can easily be checked if the kernel is running well by dropping into the rescue menu (hold ENTER pressed on boot). That user interface is coming from the initramfs, which is included in the kernel image.

As for charging, I don't really have a clue right now.

I will check the md5sum of yifanlu's kernel's uImage when I'm back home at my developing machine, on monday (CEST).
hawhill is offline   Reply With Quote
Old 07-07-2012, 03:24 PM   #55
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 7,002
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by hawhill View Post
As for the offsets, there's a script in /etc, I think it was in /etc/init.d, named "functions" (with .sh suffix?) It contains the "offset wisdom":
Code:
MOVINAND_DEVICE=/dev/mmcblk0
MOVINAND_OFFSET_PARTITION=0 #0x00000000 Partition Map
MOVINAND_OFFSET_HEADER=1024 #0x00000400 DCD Header
MOVINAND_OFFSET_U_BOOT=3072 #0x00000C00 Boot Loader
MOVINAND_OFFSET_KERNEL=266240 #0x00041000 Linux Kernel
MOVINAND_OFFSET_ISISWF=3674112 #0x00381000 ISIS Waveform
MOVINAND_OFFSET_ROOTFS=3936256 #0x003C1000 Root filesystem
For ATK the hexadecimal offsets in the comments apply. Also, it shows the maximum kernel size, (3674112-266240=) 3407872 bytes.

The "root filesystem" offset is also the offset of partition 1.

I've successfully flashed kernels as well as a full root filesystem with ATK, the latter took about 2.5 hours. It can easily be checked if the kernel is running well by dropping into the rescue menu (hold ENTER pressed on boot). That user interface is coming from the initramfs, which is included in the kernel image.

As for charging, I don't really have a clue right now.

I will check the md5sum of yifanlu's kernel's uImage when I'm back home at my developing machine, on monday (CEST).
Which should be the "map" of the area I mentioned several pages back, at: http://www.mobileread.com/forums/sho...1&postcount=30
knc1 is offline   Reply With Quote
Old 07-07-2012, 03:27 PM   #56
kraqh3d
Member
kraqh3d began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2012
Device: Kindle
@WoenK
I'm charging on AC now. The light keeps going out but when I unplug and reconnect the usb cable, the light comes back on. I've done this twice now but I'm not keeping tabs on how long it takes till the light goes out. When I see the light out, I just disconnect and reconnect again. I'll keep doing this for a while longer.

@knc1
Thanks, that makes sense. The offset in the partition x the block size (512) matches.

Last edited by kraqh3d; 07-07-2012 at 03:33 PM.
kraqh3d is offline   Reply With Quote
Old 07-07-2012, 07:10 PM   #57
kraqh3d
Member
kraqh3d began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2012
Device: Kindle
Hmmm... It's not working for me.

I'm running WinXP in Virtualbox. WinXP can see the usb device for the Kindle (as seen in my syslog)

usb 1-7: new high-speed USB device number 28 using ehci_hcd
usb 1-7: New USB device found, idVendor=15a2, idProduct=0030
usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-7: Product: SE Blank RINGO
usb 1-7: Manufacturer: Freescale SemiConductor Inc

I configure ATK based on the previous screen shots. The loading RAM kernel bar completes. ATK flashes "Waiting for USB Connection...". I'm not sure why. ATK won't even let you continue past the first configuration screen if it doesn't see it on USB. And I definitely see the device in the device manager.

What happens next is the Kindle resets its connection on the USB bus, and then ATK gives me this error: "Failed to initial flash or Do not support this Flash, please reset the target".

I've tried both dump and program. And its always the same error. For giggles, I tried holding down the Vol- knowing that its going to reset, but that didnt help either.

I see two possible things... The mmc might be totally fubar'ed. Or I still don't have enough juice because if I let it sit here, it'll keep reseting on its own about every 90 seconds. With nothing else to loose, I'm off charge it some more.

** edit **
I decided to try with my working kindle. I dumped the first 8MB. It too bounced when ATK connected to it. I ran the dump through getkernels, and successfully diff'ed the output main_kernel.img against the main_kernel.img produced from the dd of the first 32MB from mmc I had earlier. So I know the software works. I hope its a power thing.

Last edited by kraqh3d; 07-07-2012 at 08:59 PM.
kraqh3d is offline   Reply With Quote
Old 07-07-2012, 09:18 PM   #58
arooni
Enthusiast
arooni began at the beginning.
 
Posts: 34
Karma: 26
Join Date: Jul 2012
Device: kindle keyboard (wifi + 3g)
Hi folks:

I'm following this thread with rapt attention as my Kindle 3G Keyboard is bricked; and I'm trying to make it work. See http://www.mobileread.com/forums/sho...44#post2140744 for details.

I downloaded ATK 1.67 on Windows XP 32 bit (I am using VirtualBox for this OS, as I normally run 64 bit Ubuntu 12.04 LTS). I see on VirtualBox: "Freescale Semiconductor Inc. SE Blank RINGO". I went ahead and ran it, selected:
* i.MX35_TO2 (I also tried TO1)
* DDR2
* USB

and made sure to check that vbox could access the USB device I described earlier. I got to the next screen where you choose between Flash Tool and Image Format Convert Tool. I pushed Flash Tool; and then the button depressed; but nothing happened.

I'd love to get my Kindle 3G working again, as the screen is AOK; and I've never had any problems with the motherboard before; and it froze maybe 5 times in its life.

Your advice would be much appreciated!
arooni is offline   Reply With Quote
Old 07-07-2012, 09:34 PM   #59
kraqh3d
Member
kraqh3d began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2012
Device: Kindle
Heh, that confused me too at first. I expected it to do something. You have to choose Flash Tool and then click Go at the bottom of the screen. The Flash Tool window will open. And you want MDDR not DDR2.

Last edited by kraqh3d; 07-07-2012 at 09:41 PM.
kraqh3d is offline   Reply With Quote
Old 07-07-2012, 10:38 PM   #60
arooni
Enthusiast
arooni began at the beginning.
 
Posts: 34
Karma: 26
Join Date: Jul 2012
Device: kindle keyboard (wifi + 3g)
Quote:
Originally Posted by kraqh3d View Post
Heh, that confused me too at first. I expected it to do something. You have to choose Flash Tool and then click Go at the bottom of the screen. The Flash Tool window will open. And you want MDDR not DDR2.
Ok cool; I'll do that now. But then I'm a little lost on how I recover this poor little guy. Can anyone link me to a step by step instructions or tell me what I need to do next?
arooni 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
Kindle emulator on Java CDC toolkit zenob Kindle Developer's Corner 2 09-18-2011 02:52 PM
FINDING FILE PATH IN CALIBRE Berni Calibre 3 02-05-2011 11:10 AM
Freescale Smartbook - it's looking pretty nice Houndx Alternative Devices 2 03-09-2010 06:23 PM
Freescale CPU with E Ink controller wallcraft News 1 03-01-2010 02:20 PM
iLiad FOX gui toolkit for Iliad hansel iRex Developer's Corner 2 09-15-2008 03:26 PM


All times are GMT -4. The time now is 07:25 PM.


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