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 06-27-2017, 12:41 AM   #31
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Your comparing generation 7 devices vs. generation 8 devices.
Amazon/Lab126 as a general rule does not backport firmware developments.

Although we probably could.
You willing to possibly sacrifice that bare PW-3 board?
Try installing a generation 8 u-boot build on it.

If you can't figure out how to do that, PM me.
We can search the forum threads together for the bit and pieces of information necessary.

OR

It should be possible to run u-boot under qemu emulation if all you want is a listing of its built-in commands.
Your favorite web search tool should be able to find you directions for doing that.

This is the set of instructions I was going to try first (when, if ever, I get the time):
http://www.elinux.org/Virtual_Development_Board

Oh...
You'll need access to a Linux based system for most of these things recently discussed.
A decent VM of a full Linux distribution should be enough, you shouldn't have to make your Windows machine dual boot.

Last edited by knc1; 06-27-2017 at 12:57 AM.
knc1 is offline   Reply With Quote
Old 06-27-2017, 01:42 AM   #32
cxg2014
Member
cxg2014 began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jun 2017
Device: kindle 8th
I know nothing about where is kindle 8 find kernel at first, so I don't know where should I write uImage, but, I found some interesting log in the first start log:

Code:
Hit any key to stop autoboot:  0 
mmc1(part 0) is current device
FRED::: EXTCSD177=0, 179=48BOOTing from mmc ...
mmc1(part 0) is current device

MMC read: dev # 1, block # 720, count 28672 ... 28672 blocks read in 320 msec: OK

MMC read: dev # 1, block # 520, count 256 ... 256 blocks read in 6 msec: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
uboot >
MMC read: dev # 1, block # 720, count 28672 ... 28672 blocks read in 320 msec: OK

MMC read: dev # 1, block # 520, count 256 ... 256 blocks read in 6 msec: OK


I think, it must find system in dev # 1, block # 720, count 28672, kernel in dev # 1, block # 520, count 256, so, block 520address=0x208, That is!
%^_^%

Last edited by cxg2014; 06-27-2017 at 01:46 AM.
cxg2014 is offline   Reply With Quote
Old 06-27-2017, 01:44 AM   #33
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
read the 'get kernels' script by geekmaster
knc1 is offline   Reply With Quote
Old 06-27-2017, 01:59 AM   #34
cxg2014
Member
cxg2014 began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jun 2017
Device: kindle 8th
I saw that, but in uboot mmcinfo it seems like KT3 block size is 512?
cxg2014 is offline   Reply With Quote
Old 06-27-2017, 02:55 AM   #35
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by cxg2014 View Post
I saw that, but in uboot mmcinfo it seems like KT3 block size is 512?
Nope.
Search for 'erase block size' not logical size.
Your forcing the device to erase and program 8 blocks for every 1 recorded.
that script gives the starting address of both kernels, which is what you asked for.
knc1 is offline   Reply With Quote
Old 06-27-2017, 03:34 AM   #36
cxg2014
Member
cxg2014 began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jun 2017
Device: kindle 8th
Oh, I see, thanks for your help.
cxg2014 is offline   Reply With Quote
Old 06-27-2017, 09:58 AM   #37
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
You reported that you had the kernel running (used the 'Recovery Menu' to restore it).
What are you trying to do now?
Break it again?
I think you did just that.

Last edited by knc1; 06-27-2017 at 10:04 AM.
knc1 is offline   Reply With Quote
Old 06-27-2017, 10:45 AM   #38
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 629
Karma: 1512718
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by knc1 View Post
You reported that you had the kernel running (used the 'Recovery Menu' to restore it).
What are you trying to do now?
Break it again?
I think you did just that.
It looks like he was answering my questions about how he found offset x208, which he used to flash the uImage.

I thought it would be good for anyone else needing to repair their KT3 to know how .
OP identified that offset.

His log shows it trying to read only 256 blocks from that address, so I wonder if he didn't lay it out correctly, but it still happens to work.

Last edited by coplate; 06-27-2017 at 10:49 AM.
coplate is offline   Reply With Quote
Old 06-27-2017, 10:52 AM   #39
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by coplate View Post
It looks like he was answering my questions about how he found offset x208, which he used to flash the uImage.

I thought it would be good for anyone else needing to repair their KT3 to know how .
OP identified that offset.
I think we should confirm that before making general recommendations.

I still do not understand where he is getting this 512 byte block size from.
The eMMC uses 4096 byte erase blocks as its programming size.

a howto on the u-boot serial port loader commands:
https://blackfin.uclinux.org/doku.ph..._loading_files

After breakfast, I'll dig out a link for the mmc command set.
(Unless someone else beats me to it.)

Edit:
Maybe I already have it (attached) and I just haven't had the time to RTFM.
Attached Files
File Type: pdf uboot_reference.pdf (181.3 KB, 156 views)

Last edited by knc1; 06-27-2017 at 11:06 AM.
knc1 is offline   Reply With Quote
Old 06-27-2017, 11:06 AM   #40
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 629
Karma: 1512718
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
He might be basing it off a thread like this, where 'mmc info' gives some things that say 512.

https://community.nxp.com/thread/377766

Yeah, I would have expected the write address to have needed to be at 0x41000, that's why I'd love to know how his device is working now, or if there were any Other steps he took.

I suppose i should ask of we are certain those addresses are still correct for 8th gen devices, I haven't looked at that.
coplate is offline   Reply With Quote
Old 06-27-2017, 11:32 AM   #41
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by coplate View Post
He might be basing it off a thread like this, where 'mmc info' gives some things that say 512.

https://community.nxp.com/thread/377766

Yeah, I would have expected the write address to have needed to be at 0x41000, that's why I'd love to know how his device is working now, or if there were any Other steps he took.

I suppose i should ask of we are certain those addresses are still correct for 8th gen devices, I haven't looked at that.
The memory start address of the main and diag kernels have not changed with Gen8 devices.
Each are allocated 4Mbytes, although only a small part of it is used.

Note:
Everything in the eMMC is intended by lab126 to be on 4Mbyte boundaries.
They just do, I am not sure the reasoning they give is valid.

= = = =

The command is:
mmc write {?optional device?} {source in ram, offset: bytes} {destination eMMC, offset: bytes} {length bytes/512 expressed in hex}

Ref:
http://processors.wiki.ti.com/index....ith_RAW_writes

And answer #1 of:
https://unix.stackexchange.com/quest...-mmc-partition

Note:
Second reference includes a howto setup for an NFS mounted main filesystem.
It is a lot easier to change a PC mounted filesystem contents that bricks the Kindle, just don't mount it again until you fix it.
The person who wants to install Alpine Linux needs the above information also.

Last edited by knc1; 06-27-2017 at 12:39 PM.
knc1 is offline   Reply With Quote
Old 06-27-2017, 12:31 PM   #42
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 629
Karma: 1512718
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
@cxg2014

These lines 'MMC read: dev # 1, block # 720, count 28672'

Come from a source code file named
Kindle_src_5.8.5_3048340064\gplrelease\uboot_2014. 04\drivers\net\fm\fm.c

This does not appear to be part of the normal boot process, but is some sort of hardware driver, and you may have just gotten really lucky with the way things work.

Did you save off the log files of when you ran that mmc write command or when you restarted it?

I'd love to try to figure out how that worked, because it really doesn't look like it should have

It is really nice to know that the 'loady' command works on U-Boot 2014 that is on your 8th generation device, at least that part will help people in the future if they do the same as you did.

You didn't say if you ran the 'fastboot' command on the kindle at the same time you were running it on your PC. Do you remember if that was an option along with 'loady'?

It would be bad news to learn that loady works, but fastboot doesn't



Edit: Interesting news for the Kindle 8th generation, only 'Kindle_src_5.8.5_3048340064 has "uboot_2014.04", but all of the newer builds have gone back to "uboot_2009.08", I assume they only accidentally included that more fully featured uboot in that version, or they needed it for some upgrade reasons. So you got really lucky that you had this U-boot available.

Last edited by coplate; 06-27-2017 at 05:24 PM.
coplate is offline   Reply With Quote
Old 06-27-2017, 12:40 PM   #43
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Ninja'd - see above

Just because he got the eMMC to store it somewhere (and later boot that somewhere) does not mean he put it where Lab126 intended it to go.
Our longstanding offset address for the main and the diag kernels is correct.

He had it in RAM before he clobbered something in the eMMC layout with it.
He should have just booted that kernel from RAM, then used the recovery menu to let the OTA updater re-initialize the eMMC and re-install the 'main' update image.

He got into this mess by wanting to reformat the USB user storage.
The normal boot-up process would have done that for him if he had just zeroed the first 16 sectors of the USB storage device as seen over (a linux) USB cable connection.

Note:
His device still does not have a 'diags' (the secondary system) installed.

He used loady because he could not make fastboot work.
That would need independent verification also.

The only Gen8 device with a (known) serial port connection is the KT3.
I have one, I use it every night, I do not want to take it apart to install a serial port connection on it.
Other volunteers are welcome to contribute that work on theirs.

Last edited by knc1; 06-27-2017 at 03:00 PM.
knc1 is offline   Reply With Quote
Old 06-27-2017, 08:41 PM   #44
cxg2014
Member
cxg2014 began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jun 2017
Device: kindle 8th
Smile

Quote:
Originally Posted by coplate View Post
@cxg2014

These lines 'MMC read: dev # 1, block # 720, count 28672'

Come from a source code file named
Kindle_src_5.8.5_3048340064\gplrelease\uboot_2014. 04\drivers\net\fm\fm.c

This does not appear to be part of the normal boot process, but is some sort of hardware driver, and you may have just gotten really lucky with the way things work.

Did you save off the log files of when you ran that mmc write command or when you restarted it?

I'd love to try to figure out how that worked, because it really doesn't look like it should have

It is really nice to know that the 'loady' command works on U-Boot 2014 that is on your 8th generation device, at least that part will help people in the future if they do the same as you did.

You didn't say if you ran the 'fastboot' command on the kindle at the same time you were running it on your PC. Do you remember if that was an option along with 'loady'?

It would be bad news to learn that loady works, but fastboot doesn't



Edit: Interesting news for the Kindle 8th generation, only 'Kindle_src_5.8.5_3048340064 has "uboot_2014.04", but all of the newer builds have gone back to "uboot_2009.08", I assume they only accidentally included that more fully featured uboot in that version, or they needed it for some upgrade reasons. So you got really lucky that you had this U-boot available.
sorry...I forget start record for the log, when I want save it, it already lost..

Now it is used up or looks like a new kindle like, I'm very happy it back to my life.
cxg2014 is offline   Reply With Quote
Old 06-27-2017, 09:09 PM   #45
knc1
On Holiday
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: 16,363
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by coplate View Post
- - - -
Edit: Interesting news for the Kindle 8th generation, only 'Kindle_src_5.8.5_3048340064 has "uboot_2014.04", but all of the newer builds have gone back to "uboot_2009.08", I assume they only accidentally included that more fully featured uboot in that version, or they needed it for some upgrade reasons. So you got really lucky that you had this U-boot available.
That was a stroke of luck.

I am going to make a point to save a copy of those 5.8.5 sources somewhere special.
There must be a reason for their having that build available (to fall into the customer device production) -

Maybe they leaked shipped us a "pre-release preview"

Similar to the "factory production line firmware images" -
We didn't have a clue what they might be good for, we just kept them when we found them.

It could be, we can find a good use for this special version of u-boot someday.

= = = =

Edit:
This explains where the two u-boot loaders are stored:
Code:
make ARRCH=arm CROSS_COMPILE=arm-linux-gnueabi- mx6sleanab_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
rm -f u-boot.prod.bin
dd if=u-boot.imx of=u-boot.prod.bin bs=1024 seek=1

make ARRCH=arm CROSS_COMPILE=arm-linux-gnueabi- mx6sleanab_mfgtool_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
rm -f u-boot.mfgtool.bin
dd if=u-boot.imx of=u-boot.mfgtool.bin


make ARRCH=arm CROSS_COMPILE=arm-linux-gnueabi- mx6sleanab_bist_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
rm -r u-boot.bist.bin
dd if=u-boot.bin of=u-boot.bist.bin

dd if=u-boot.prod.bin of=u-boot.bin bs=1024
dd if=u-boot.bist.bin of=u-boot.bin bs=1024 seek=192
They are appended together into a single file.
Hmm...
And can be taken apart with the same tool.
Just in case we want to replace 'bist' with 'kboot' (from mobile read)

Note just how much error checking that build script has in it.
At least Lab126 hasn't abandoned their coding standards that makes finding a jailbreak possible.

- - - - -

Edit:
And the answer is:
That build of u-boot-bist is for the Freescale heisenberg development board. *
Which does not exist in the 2009 u-boot sources.

Translation:
The board configuration file for the Lab126 development model Kindle board slipped into the production firmware build system.

Maybe we should adopt it also.

* Well, somebody's development board with that code name in the Freescale repo.

Last edited by knc1; 06-28-2017 at 10:32 AM.
knc1 is offline   Reply With Quote
Reply

Tags
recover

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Frozen screen - Recovery menu nicole ridgway Kindle Developer's Corner 27 03-09-2015 06:04 AM
occasionally losing the select menu bounce Marvin 3 12-16-2013 04:30 PM
WAF and select menu silver18 Kindle Developer's Corner 4 05-06-2012 01:19 PM
Kindle 3 Recovery Menu scenox Kindle Developer's Corner 6 03-11-2011 01:23 AM
Update from recovery menu simekadam Kindle Developer's Corner 1 02-14-2011 12:40 AM


All times are GMT -4. The time now is 11:22 PM.


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