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 03-31-2012, 11:38 AM   #151
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 TCCPhreak View Post
...
(or serial, though I haven't got a converter for RS232@1.7V yet)
...
As soon as I'm brave enough to open the Kindle and solder to the serial port (very very carefully), I'll watch anything it sends.
...
I kind of hoped that you'd have used a custom mfgboot-profile before (apart form the "switch bootmode"-ones) and could point me in the right direction for trying out writing my own.
...
But without fastboot, I'm way down at the "can never be destroyed" USB-HID mode and need to work upward to fastboot. I'm just lost in the mass of cmd-commands for fastboot and none of them seem to work with the kindle.
...
But without any idea on the magic words for "flash file to kindle" in the xml-file, I'm stuck.
The personal information is only readable by the kernel mode drivers. On the newer kindles (K4 and Touch), they replace all of that with \x00 when you read from /dev/mmcblk0. That is why the idme program READS its idme vars (such as bootmode, serial, etc.) from the /proc files (kernel driver interface files) to read this information. The idme program WRITES these vars directly to /dev/mmcblk0 device though, so some areas of mmcblk0 are WRITE-ONLY to applications. This is why it is a bad idea to write to /dev/mmcblk0 with dd, as suggested in some posts I have read. Because a backup copy has zeroes in the write-only areas, a restore with dd would write zeroes onto your important private idme var data.

I once bricked a K4 when the PCBSN idme var got corrupted (as you can read in my forum posts). I had to modify a custom uboot to hijack idme var reads and replace the values with my own known values. This allowed u-boot to finish booting. On a K4, u-boot needs to know the PCBSN to decide how to initialize the device, and it halts if that is bad. This does not appear to be a problem when using the "smarter" Touch u-boot (even when using it to boot a K4, as my MfgTool custom profiles do).

MfgTool is a big program with a lot of capabilities, designed for Manufactures to flash and test new devices. As I understand it, some things require multiple stages, by sending a running a series of increasingly complicated but capable code blocks to the device. There is much in that system that I have not studied yet.

Regarding the serial port, I have discovered that on the K4 and Touch, the third pin does NOT seem to act as a reliable GND (electrical ground). It works MUCH better to keep the USB cable connected from the kindle to the same host PC that has the USB serial adapter, relying on a "ground loop" connection over the kindle USB cable to supply the serial ground. When connected this way, you can also simplify the "serial port level shifter" circuit that I posted in its own thread. With a USB ground, you can connect a 3.3v or 5v serial adapter TxD directly to the kindle RxD (which has a 1K series protection resistor). Some USB serial adapters will require level shifting to see the low voltage signal on the kindle TxD, but if the serial adapter pulls its RxD line to 3.3v or 5V, you just need a small diode connecting the Kindle TxD to the adapter RxD, such that the diode cathode (end with the stripe painted on it) goes to the kindle. This allows the adapter RxD to float to its supply voltage for a logic 1, and the kindle can pull that RxD down to the voltage drop of the diode (0.7v for silicon) for a logic 0. The only problem is that the kindle internal 1K protection diode becomes part of a voltage divider circuit, increasing the logic 0 voltage seen at that serial adapter if too much current is supplied by the adapter. On my USB adapter, the RxD pin was connected to an LED that got its power from a 1K resistor to supply voltage. I had to change that resistor to about 22K to get the RxD voltage seen from the kindle low enough to work correctly. You can get silicon diodes from the circuit board in a defective CFL (compact fluorescent light).

Did you read the docs supplied with the full MfgTool for the iMX50 from Freescale? Download and read the iMX50 Reference Manual too (or at least the relevant parts). It *is* complicated.

I *was* planning to make large changes to a custom u-boot to read and write mmc for me, converting it into a proxy to allow me to read and modify mmc from a host PC. You may want to explore that path yourself too.

Lately, I have been spending my "free" time (very little available) playing with simple but interesting shell scripts, because I have other extremely complex projects occupying most of my attention, and scripts are a fun and simple diversion that are not overly distracting, unlike working with MfgTool.

Good luck. TTYL. Back to work...

Last edited by geekmaster; 06-02-2012 at 06:50 PM.
geekmaster is offline   Reply With Quote
Old 04-12-2012, 06:45 AM   #152
TCCPhreak
Member
TCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of light
 
Posts: 14
Karma: 12366
Join Date: Mar 2012
Device: Kindle 4GNT
Quote:
Originally Posted by geekmaster View Post
This is why it is a bad idea to write to /dev/mmcblk0 with dd, as suggested in some posts I have read. Because a backup copy has zeroes in the write-only areas, a restore with dd would write zeroes onto your important private idme var data.
Hmm.. seems like a lucky coincidence that I took a photo of the device settings in diag-mode when it still worked..

Quote:
Originally Posted by geekmaster View Post
Regarding the serial port,
I finally got one of those USB-cables for mobile phones and patched it into a generic (PL2303) USB-serial@3.3V.

Btw: I guess it can't hurt to have this information here, too: Kindle 4 Nontouch-serial port is P2 (east on the main board), GND is top one (easily identifyable as it's connected to large ground areas), RxD is middle, TxD is bottom (identifyable by the 1.8V level compared to GND)

As those pads are very fragile, I soldered some small wires to them and to a small adapter piece allowing for easier soldering, later.

http://imgur.com/nkU2o,TMQqe,rfV7n

Connecting the PC-RxD to Kindle-TxD already showed me the boot-messages (without the pullup-resistors). If I ever connect the other direction, I'll use the resistor for voltage dividing but right now it seems like there is no need for that.

Quote:
Originally Posted by geekmaster View Post
Did you read the docs supplied with the full MfgTool for the iMX50 from Freescale? Download and read the iMX50 Reference Manual too (or at least the relevant parts). It *is* complicated.
I read the files available in Document.zip and there were some examples and instructions. Still, those that didn't fail right away gave no positive results.
I found surprisingly few information about the downloader mode and the commands in the reference manual.

It's nice to see the serial output - as it shows that internally, the kindle is still working. Still, it further fundaments my guesses of something really being broken on hardware level:
Bootmode Override is fastboot. There is this "Battery Voltage too low. Please plug in a charger" message and although a charger is connected, the voltage goes down in the next messages.
I've watched it decrease from 3360 to 2952. Still, it's up at 33xx or so when I reboot.

Well.. I guess, I'll attach the resistor and interrupt the boot process - just to see what I can do at that point.

Regards,

TCC

Update:
With a 20k resistor I could stop booting and get into uboot. Unfortunately, the Kindle freezes pretty quick there, too. Sometimes it doesn't even countdown the 3 seconds to starting fastboot.

I guess I'll keep it at the charger for the rest of the day. At least I can see some absolute numbers about voltage on serial output.

Still, this experiment showed me that my main kernels really are broken, that no such error appears with fastboot and that this freezing is very independent from what I boot.
Now I only need to find out how to directly interface the e-ink display so I can get rid of the main board and just use the display..

Last edited by TCCPhreak; 04-12-2012 at 07:09 AM.
TCCPhreak is offline   Reply With Quote
Old 04-12-2012, 07:55 AM   #153
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 TCCPhreak View Post
I guess I'll keep it at the charger for the rest of the day. At least I can see some absolute numbers about voltage on serial output.
When my kindles (k4 and touch) are in fastboot mode and connected to a host PC USB port, the serial port shows voltage levels steadily increasing until they top off at max battery voltage.

If you are not seeing that, perhaps your computer is disconnecting power to your USB port (one of those annoying "green" energy saving things). See if you can disable USB power-save mode in your host PC OS settings or in your BIOS settings.

Or, perhaps you can try a different USB cable...
geekmaster is offline   Reply With Quote
Old 04-12-2012, 08:13 AM   #154
TCCPhreak
Member
TCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of light
 
Posts: 14
Karma: 12366
Join Date: Mar 2012
Device: Kindle 4GNT
Quote:
Originally Posted by geekmaster View Post
If you are not seeing that, perhaps your computer is disconnecting power to your USB port (one of those annoying "green" energy saving things). See if you can disable USB power-save mode in your host PC OS settings or in your BIOS settings.

Or, perhaps you can try a different USB cable...
I've tried a wall-charger and two different PCs. The yellow LED is lit.
I can charge my other kindle with the same cable.
Still, I'll try a different USB cable once I'm at home and the Kindle hasn't charged but (yes, this sounds like "the glass is half empty") I don't believe it will make a difference.
Still thanks for your advice.

Regards,

TCC
TCCPhreak is offline   Reply With Quote
Old 04-12-2012, 11:55 AM   #155
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 TCCPhreak View Post
I've tried a wall-charger and two different PCs. The yellow LED is lit.
I can charge my other kindle with the same cable.
Still, I'll try a different USB cable once I'm at home and the Kindle hasn't charged but (yes, this sounds like "the glass is half empty") I don't believe it will make a difference.
Still thanks for your advice.

Regards,

TCC
You cannot trust the LED color to indicate battery condition on a bricked kindle. The firmware controls the battery charging, so on erased mmc or other serious bricking situation, it may have charging difficulties.

That is why I recommend in other threads to use a wall charger just to get it charged enough so you can use fastboot mode and charge from there. Just because your serial port shows that it WANTS to boot to fastboot mode (the "override") does not mean that it CAN boot to fastboot mode if the firmware in mmc does not contain the fastboot code.

The only way to fix it using tools available here and now is by using the serial port, until somebody figures out how to flash the mmc using MfgTool.
geekmaster is offline   Reply With Quote
Old 04-12-2012, 04:33 PM   #156
TCCPhreak
Member
TCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of light
 
Posts: 14
Karma: 12366
Join Date: Mar 2012
Device: Kindle 4GNT
Quote:
Originally Posted by geekmaster View Post
You cannot trust the LED color to indicate battery condition on a bricked kindle. The firmware controls the battery charging, so on erased mmc or other serious bricking situation, it may have charging difficulties.
I saw the LED as a sign that voltage arrives at the Kindle and it has the option to charge if it wants to. I'm pretty certain that there's something wrong with the part of the firmware controlling the charging.

I can even imagine that this was the part that lead to the original bricking... Freeze due to low battery, then reboot as the charger was detected.. then next freeze.

Quote:
Originally Posted by geekmaster View Post
That is why I recommend in other threads to use a wall charger just to get it charged enough so you can use fastboot mode and charge from there. Just because your serial port shows that it WANTS to boot to fastboot mode (the "override") does not mean that it CAN boot to fastboot mode if the firmware in mmc does not contain the fastboot code.
I know that I brickflashed the main kernel and the diags kernel. This shouldn't have damaged the fastboot "kernel", right..

Quote:
Originally Posted by geekmaster View Post
The only way to fix it using tools available here and now is by using the serial port, until somebody figures out how to flash the mmc using MfgTool.
I can access u-boot from serial (at least until it freezes) but I'm not sure what command will help me flash something.. or boot into a reliable u-boot. none of the commands listed in "help" sounds anything like uploading files.

Regards,

TCC

Update:
I don't know what just happened but *something* just happened.. I told uboot to reset, it then decided to halt.. And somehow this fixed the decreasing-voltage-problem. The voltage number is rising at the moment and I even had access to a prompt names "bist >" and having some commands with "ymodem"... Guess, it's time to prepare the kernel backups for upload..

Later Update:
aaaand... after bist allowed my to change to fastboot and suddenly this fastboot worked, I was able to flash kernel and diags kernel and even boot into diags again. Flashing the main partition was not yet done as I'm back to my "freeze" problem after some seconds.

But this time I can read a message over the serial:
mxc_rtc: saved=0x0 boot=0xca
boot: C def:bcut:batterycut=1,version=000000:

after some time:
BUG: soft lockup - CPU#0 stuck for 61s!
and something that looks like a kernel panic or gdb-bt. PC is stuck in mxc_rtc_set_time+0x60

Spoiler:

Modules linked in: tequila_keypad fiveway mxc_keyb ehci_hcd usbcore mwan ppp_async ppp_generic slhc crc_ccitt fuse g_file_storage arcotg_udc mxc_epdc_fb eink_fb_waveform

Pid: 15, comm: events/0
CPU: 0 Not tainted (2.6.31-rt11-lab126 #1)
PC is at mxc_rtc_set_time+0x60/0xcc
LR is at 0x0
pc : [<c02d6478>] lr : [<00000000>] psr: 60000013
sp : ce053ef8 ip : d0900004 fp : ce053f2c
r10: 00000000 r9 : 00000000 r8 : 00000000
r7 : c0507c30 r6 : 000000ca r5 : 000000ca r4 : d0900000
r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 7e978019 DAC: 00000017
[<c0117364>] (show_regs+0x0/0x50) from [<c0167960>] (softlockup_tick+0x110/0x154)
r4:ce053eb0 r3:c04c48b0
[<c0167850>] (softlockup_tick+0x0/0x154) from [<c01488a0>] (run_local_timers+0x1c/0x20)
r8:2faf0800 r7:ce053eb0 r6:c04c67d0 r5:00000000 r4:ce050cc0
[<c0148884>] (run_local_timers+0x0/0x20) from [<c01488d8>] (update_process_times+0x34/0x5c)
[<c01488a4>] (update_process_times+0x0/0x5c) from [<c015da24>] (tick_sched_timer+0x8c/0xc0)
r5:0000005f r4:2faf282b
[<c015d998>] (tick_sched_timer+0x0/0xc0) from [<c0155424>] (__run_hrtimer+0x4c/0xe8)
r7:2faf1dea r6:00000001 r5:c04c6238 r4:c04c67d0
[<c01553d8>] (__run_hrtimer+0x0/0xe8) from [<c0155d6c>] (hrtimer_interrupt+0x174/0x1ec)
r6:00000001 r5:3b9ac9ff r4:c04c6238 r3:0000005f
[<c0155bf8>] (hrtimer_interrupt+0x0/0x1ec) from [<c012af34>] (mxc_timer_interrupt+0x28/0x38)
[<c012af0c>] (mxc_timer_interrupt+0x0/0x38) from [<c0168194>] (handle_irq_action+0x5c/0x64)
[<c0168138>] (handle_irq_action+0x0/0x64) from [<c01681c4>] (handle_IRQ_event+0x28/0xe4)
[<c016819c>] (handle_IRQ_event+0x0/0xe4) from [<c01699e8>] (handle_level_irq+0x90/0xf4)
r7:c0507c30 r6:00000001 r5:00000027 r4:c04c7694
[<c0169958>] (handle_level_irq+0x0/0xf4) from [<c011506c>] (_text+0x6c/0x88)
r5:00000000 r4:00000027
[<c0115000>] (_text+0x0/0x88) from [<c0115a38>] (__irq_svc+0x38/0xa0)
Exception stack(0xce053eb0 to 0xce053ef8)
3ea0: 00000000 00000000 00000000 00000000
3ec0: d0900000 000000ca 000000ca c0507c30 00000000 00000000 00000000 ce053f2c
3ee0: d0900004 ce053ef8 00000000 c02d6478 60000013 ffffffff
r5:d0800000 r4:ffffffff
[<c02d6418>] (mxc_rtc_set_time+0x0/0xcc) from [<c02d6728>] (do_rtc_work+0x244/0x2c8)
[<c02d64e4>] (do_rtc_work+0x0/0x2c8) from [<c014ec0c>] (worker_thread+0x158/0x1cc)
r7:00000000 r6:c02d64e4 r5:ce052000 r4:ce001b20
[<c014eab4>] (worker_thread+0x0/0x1cc) from [<c01523a0>] (kthread+0x88/0x90)
r6:ce001b20 r5:c014eab4 r4:ce021f28
[<c0152318>] (kthread+0x0/0x90) from [<c0141c30>] (do_exit+0x0/0x5c4)
r6:00000000 r5:00000000 r4:00000000


and - again after some time - the reboot:
Spoiler:

U-Boot 2009.08-lab126 (Sep 22 2011 - 21:33:57)

CPU: Freescale i.MX50 family 1.1V at 800 MHz
mx50 pll1: 800MHz
mx50 pll2: 400MHz
mx50 pll3: 216MHz
ipg clock : 50000000Hz
ipg per clock : 50000000Hz
uart clock : 24000000Hz
ahb clock : 100000000Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
weim_clock : 100000000Hz
ddr clock : 800000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
MMC: FSL_ESDHC: 0, FSL_ESDHC: 1
Board: Tequila
Boot Reason: [POR]
Boot Device: MMC
Board Id: 0YLL3TT0NDLU0HS1
S/N: 0N01T4MR0FN151HT
Initing MDDR memory
ZQ calibration complete: 0x128=0x05090010 0x12C=0x00000408
DRAM: 256 MB
Using default environment

In: serial
Out: logbuff
Err: logbuff
Quick Memory Test 0x70000000, 0x10000000
POST done in 13 ms
BOOTMODE OVERRIDE: DIAGS
Hit any key to stop autoboot: 3  2  1  0
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.31-rt11-lab126
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5122432 Bytes = 4.9 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
mxc_spi mxc_spi.0: can't setup spi1.0, status -22
mxc_spi mxc_spi.2: chipselect 0 already in use
i2c-adapter i2c-1: E mxc_i2c_wait_for_tc:tx_success_fail::ACK not received
wm8962 1-001a: i2c_transfer() returned -121
wm8962 1-001a: Device is not a WM8962, ID 0 != 6243
i2c-adapter i2c-1: E mxc_i2c_wait_for_tc:tx_success_fail::ACK not received
wm8962 1-001a: i2c_transfer() returned -121
i2c-adapter i2c-1: E mxc_i2c_wait_for_tc:tx_success_fail::ACK not received
wm8962 1-001a: Failed to issue reset
2.6.31-rt11-lab126 #1 Fri Sep 2 19:00:58 PDT 2011 armv7l
INFO:Loaded module /lib/modules/eink_fb_waveform.ko (35504 bytes)
INFO:Loaded module /lib/modules/mxc_epdc_fb.ko default_panel_hw_init=1 default_update_mode=1 (43336 bytes)
INFO:eink initialized... (486400 bytes)
INFOIAGS MODE
Press [ENTER] for recovery menu... 0 /INFO:*** Partition table verified for /dev/mmcblk0 ***
INFO:Checking for updates... (auto-pilot mode)
/dev/mmcblk0p4:
CHS=4/16/44480 size=1457520640 bytes
flag type first last lba first lba size
Partition p1:
0x00 0x0b 16 <large> 16 2846704
CHS: 0/1/1 - <large>
Partition p2:
Partition p3:
Partition p4:
INFO:Setup loop device /dev/loop0 for /dev/mmcblk0p4 + 8192
INFO:No update*.bin found; no update needed.
INFO:no updates found.
INFO:Couldn't find localized image at /mnt/wfm/images/splash.png.gz
BOOTING DEFAULT.
argc == 11
argv[0]: "kinit"
argv[1]: "consoleblank=0"
argv[2]: "rootwait"
argv[3]: "ro"
argv[4]: "ip=off"
argv[5]: "root=/dev/mmcblk0p2"
argv[6]: "quiet"
argv[7]: "user_debug=31"
argv[8]: "eink=fslepdc"
argv[9]: "video=mxcepdcfb:E60,bpp=8,x_mem=2M"
argv[10]: "console=ttymxc0,115200"
argc == 4
argv[0]: "IP-Config"
argv[1]: "-i"
argv[2]: "Linux kinit"
argv[3]: "ip=off"
IP-Config: no devices to configure
kinit: do_mounts
kinit: name_to_dev_t(/dev/mmcblk0p2) = dev(179,2)
kinit: root_dev = dev(179,2)
kinit: /dev/root appears to be a ext3 filesystem
kinit: trying to mount /dev/root on /root with type ext3
kinit: Mounted root (ext3 filesystem) readonly.
init started: BusyBox v1.17.1 (2011-09-02 18:46:34 PDT)
starting pid 427, tty '': '/etc/init.d/rcS'
/etc/init.d/rcS: line 85: boot_milestone: not found
system: I rcS:def:starting /etc/rcS.d/S50diags
USER=root
prevlevel=N
HOME=/
runlevel=S
eink=fslepdc
TERM=vt102
PATH=/sbin:/bin:/usr/sbin:/usr/bin
SHELL=/bin/sh
PWD=/
VERBOSE=no
READ_AHEAD=4
USER=root
prevlevel=N
HOME=/
runlevel=S
eink=fslepdc
TERM=vt102
PATH=/sbin:/bin:/usr/sbin:/usr/bin
SHELL=/bin/sh
PWD=/
VERBOSE=no
IO_SCHED=anticipatory
USER=root
prevlevel=N
HOME=/
runlevel=S
eink=fslepdc
TERM=vt102
PATH=/sbin:/bin:/usr/sbin:/usr/bin
SHELL=/bin/sh
PWD=/
VERBOSE=no
TMP_SIZE=32M
info firsttime:mount_rw:time=4010:Mounting root RW for first boot
ln: /usr/share/fonts/X11/misc/cursor.pcf: No such file or directory
info firsttime:mount_ro:time=4040:Mounting root RO
elevator: type not found
info system:start:time=4110:
/etc/rcS.d/S50diags: line 466: f_proto: not found
info system:configlatform=yoshi,board=tequila,rev=21, proto=N,wifi=Y,wan=N:
info system:done:time=4380:
FATAL: Error inserting zforce (/lib/modules/2.6.31-rt11-lab126/kernel/drivers/input/touchscreen/zforce.ko): No such device
/etc/rcS.d/S50diags: line 466: iptables-restore: not found
/opt/ar6k/include/dbglog.h.save: No such file or directory
info userstore:run:time=5080,action=start:
info userstore:found_bootup_flag::Found BOOTUP flag file
dosfsck 2.11 (12 Mar 2005)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Checking we can access the last sector of the filesystem
There are differences between boot sector and its backup.
Differences: (offsetriginal/backup)
65:01/00
Not automatically fixing this.
Boot sector contents:
System ID "mkdosfs"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
8192 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
711168 bytes per FAT (= 1389 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 1438720 (sector 2810)
177743 data clusters (1456070656 bytes)
32 sectors/track, 64 heads
0 hidden sectors
2846704 sectors total
A new long file name starts within an old one.
Not auto-correcting this.
Checking for unused clusters.
Checking free cluster summary.
/dev/loop/0: 110 files, 6312/177743 clusters
mounting waveform filesystem
umounting waveform filesystem
info display:started:time=5710:
/etc/upstart/battery-diags: line 91: f_proto: not found
info battery:charged:cap=91,mV=4127,mAH=820:
USER=root
prevlevel=N
OLDPWD=/
HOME=/
runlevel=S
eink=fslepdc
TERM=vt102
PATH=/sbin:/bin:/usr/sbin:/usr/bin
SHELL=/bin/sh
PWD=/dev
VERBOSE=no
LD_LIBRARY_PATH=/usr/lib/tts/speech/components/common/:/usr/lib/tts
alsactl: load_state:1635: Cannot find soundcard '0'...
/etc/rcS.d/S50diags: line 13: audioServer: not found
/etc/rcS.d/S50diags: line 13: kb: not found
diags : /opt/factory/rootfs_md5_list not found.
Sending: mkdir -p /mnt/base-us/diagnostic_logs/
PostMode len = 6 of 16
Ignoring PostMode
GlobalHalImpl: found DeviceType: 16
Sending cmd: modprobe fiveway
input: fiveway as /devices/virtual/input/input0
Sending cmd: modprobe tequila_keypad
input: tequila-keypad as /devices/platform/tequila-keypad/input/input1
Input driver version is 1.0.0
Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
Input device name: "fiveway"
Supported events:
Input driver version is 1.0.0
Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
Input device name: "tequila-keypad"
Supported events:
failed to open /dev/input/event2
failed to open /dev/input/event3
failed to open /dev/input/event4
failed to open /dev/input/event5
failed to open /dev/input/event6
failed to open /dev/input/event7
Ignoring PostMode
system: I mntroot:def:Making root filesystem writeable
EXT3 FS on mmcblk0p2, internal journal
system: I mntroot:def:Making root filesystem read-only
1000
1000
system_diags[MainTest] 1 INFO : Start test
TEQUILA - System Diags
~~~~~~ 1.0.6.194 ~~~ -1096131704 ~~~~~~~~~~~~
~ S ~ Device Setting
O) Operator test suite
R) Run in Test
G) Gas Gauge
E) 511
T) Power Test
H) Adjust battery
M) MoviNand
N) Misc individual diagnostics
Y) ART 11g factory test
U) USB device mode
D) Exit, Reboot or Disable Diags
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X) Exit - FW RIGHT to exit


Last edited by TCCPhreak; 04-12-2012 at 07:20 PM.
TCCPhreak is offline   Reply With Quote
Old 04-12-2012, 07:14 PM   #157
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 TCCPhreak View Post
I know that I brickflashed the main kernel and the diags kernel. This shouldn't have damaged the fastboot "kernel", right..


I can access u-boot from serial (at least until it freezes) but I'm not sure what command will help me flash something.. or boot into a reliable u-boot. none of the commands listed in "help" sounds anything like uploading files.

Regards,

TCC

Update:
I don't know what just happened but *something* just happened.. I told uboot to reset, it then decided to halt.. And somehow this fixed the decreasing-voltage-problem. The voltage number is rising at the moment and I even had access to a prompt names "bist >" and having some commands with "ymodem"... Guess, it's time to prepare the kernel backups for upload..
fastboot is in the bist u-boot image, which is saved to a different location than the partitions or the kernels. Flashing kernels and partitions does not affect the u-boot images. You need to flash those separately, but I think they get backed up in an mmcblk0 image.

Glad it's charging now, and good luck. You aren't one of those guys who used fastboot to erase the entire mmc, now are you?

Look back in the forums for how Rastik recovered from erasing his mmc by using the serial port. You should be able to do as he did to recover you kindle.
geekmaster is offline   Reply With Quote
Old 04-13-2012, 05:05 AM   #158
TCCPhreak
Member
TCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of light
 
Posts: 14
Karma: 12366
Join Date: Mar 2012
Device: Kindle 4GNT
Quote:
Originally Posted by geekmaster View Post
fastboot is in the bist u-boot image, which is saved to a different location than the partitions or the kernels. Flashing kernels and partitions does not affect the u-boot images. You need to flash those separately, but I think they get backed up in an mmcblk0 image.
If fastboot is in the u-boot-image, shouldn't it be impossible to ever damage it? Kernel and partitions are on the mmc but isn't u-boot somewhere else entirely?

Update:
found the answer in your post
http://www.mobileread.com/forums/sho...30&postcount=8
"uboot is usually stored in a small i2c or spi memory device".. So until I start messing with I²C, fastboot, uboot and bist should be safe..

Quote:
Originally Posted by geekmaster View Post
Glad it's charging now, and good luck. You aren't one of those guys who used fastboot to erase the entire mmc, now are you?
Nope. I guess, if I did that, the diags shouldn't be able to (correctly) tell my MAC, Serial, Board IT etc.

Quote:
Originally Posted by geekmaster View Post
Look back in the forums for how Rastik recovered from erasing his mmc by using the serial port. You should be able to do as he did to recover you kindle.
I'm still tempted to go with "hardware failure". Although main mode and diags use different partitions and different kernel, the error was the same in both of them and the mxc_rtc_set_time "BUG" (as stated in output) with sources in interrupts sound like something that's not software.
Perhaps I could compile a new kernel (or patch some files in the partition) to workaround this stuff (similar to the xbox-linux-kernel preventing pci scans), but if the Kindle boots into a diags without problems, the mmc seems to be fine and simply restoring it shouldn't change anything.

Regards,

TCC

Last edited by TCCPhreak; 04-13-2012 at 05:14 AM.
TCCPhreak is offline   Reply With Quote
Old 04-13-2012, 05:16 AM   #159
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 TCCPhreak View Post
If fastboot is in the u-boot-image, shouldn't it be impossible to ever damage it? Kernel and partitions are on the mmc but isn't u-boot somewhere else entirely?
There are multiple u-boot images. The small u-boot fits in the iMX50 SoC internal RAM, but is missing features like bist and fastboot. The large u-boot must be loaded into SDRAM, but this requires that the memory be initialized first, and that will only happen when it is NOT in low-power (100mA) mode that functions mainly as a battery charger. After SDRAM is initialized, then the large u-boot with bist and fastboot can be loaded into it, using a multi-stage bootloader process.

We *should* be able to build custom u-boot images that contain fastboot, and load them with MfgTool, provided we develop the custom MfgTool profiles to do this. With MfgTool, we can also boot custom linux kernels and totally custom code (perhaps even Android OS) completely over the USB cable (not using mmc).

Anyway, using the fastboot MfgTool profile, the SMALL u-boot is loaded over USB, and it then loads the large u-boot with bist and fastboot from mmc. So if you erased or corrupted the part of your mmc that contains the fastboot code, you either need to use the serial port (like Rastik did), or use MfgTool with a custom profile that has not been created yet.
Quote:
Originally Posted by TCCPhreak View Post
Update:
found the answer in your post
http://www.mobileread.com/forums/sho...30&postcount=8
"uboot is usually stored in a small i2c or spi memory device".. So until I start messing with I²C, fastboot, uboot and bist should be safe..
I post things as I am learning them. That statement was about GENERIC devices that use u-boot -- not the kindles. As it turns out, the kindles has a special mmc device that maps the first 1KB into the CPU memory address space at power on, and this is where the small u-boot lives in the mmc. These CPU SoC chips have a number of places they look for a bootloader, and the first 1KB of mmc is one of them, which is used here.
Quote:
Originally Posted by TCCPhreak View Post
Perhaps I could compile a new kernel (or patch some files in the partition) to workaround this stuff (similar to the xbox-linux-kernel preventing pci scans), but if the Kindle boots into a diags without problems, the mmc seems to be fine and simply restoring it shouldn't change anything.
If you can boot diags, you could probably use dd to copy u-boot and kernel images to the correct SEEK offset in /dev/mmcblk0, but I have not tried that. It is easier with fastboot. You would need the write seek offsets for dd, or you could also corrupt your diags bootloader, making even that go away...

Look up in the forum how Rastik recovered from erasing his entire mmc, by using the serial port. I think it was in the early kindle touch posts.


Last edited by geekmaster; 04-13-2012 at 05:27 AM.
geekmaster is offline   Reply With Quote
Old 04-13-2012, 06:25 AM   #160
TCCPhreak
Member
TCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of light
 
Posts: 14
Karma: 12366
Join Date: Mar 2012
Device: Kindle 4GNT
Quote:
Originally Posted by geekmaster View Post
So if you erased or corrupted the part of your mmc that contains the fastboot code,
I didn't. Once there was enough battery to boot correctly into fastboot, I could flash the kernels via fastboot and boot into diags again.. Unfortunately

Quote:
Originally Posted by geekmaster View Post
If you can boot diags, you could probably use dd to copy u-boot and kernel images to the correct SEEK offset in /dev/mmcblk0, but I have not tried that. It is easier with fastboot. You would need the write seek offsets for dd, or you could also corrupt your diags bootloader, making even that go away...
I am back at my old problem: Some seconds after the system (diags) is booted, it freezes whatever it is doing. Serial output told me something about mxc_rtc and that the reboot is automated 61s after a stuck CPU.

Quote:
Originally Posted by geekmaster View Post
Look up in the forum how Rastik recovered from erasing his entire mmc, by using the serial port. I think it was in the early kindle touch posts.
I already found it and read it (http://www.mobileread.com/forums/sho...d.php?t=164018). This is very interesting for when I should ever get into that situation but at the moment my MMC seems okay (apart from the main partition p0)

I really appreciate your help but I think you're missing my point:
- fastboot works.
- diags boots (so diags kernel is fine and diags partition is fine) but freezes after some time.
- main partition cannot be written by fastboot (size limitation) and not by diags (not enough time before freezing) and even if I was able to re-flash it, I'd bet that it would still freeze with the mxc_rtc-problem on the "Boy reading under tree"-screen.

I've traced the mxc_rtc into the linux-kernel where it's responsible for accessing rtc-functions on the freescape-CPU. As the kernel image is fine (there is a checksum check at booting), this problem should not arise from the filesystem/mmc.

Regards,

TCC
TCCPhreak is offline   Reply With Quote
Old 04-13-2012, 06:34 AM   #161
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 TCCPhreak View Post
I didn't. Once there was enough battery to boot correctly into fastboot, I could flash the kernels via fastboot and boot into diags again.. Unfortunately


I am back at my old problem: Some seconds after the system (diags) is booted, it freezes whatever it is doing. Serial output told me something about mxc_rtc and that the reboot is automated 61s after a stuck CPU.


I already found it and read it (http://www.mobileread.com/forums/sho...d.php?t=164018). This is very interesting for when I should ever get into that situation but at the moment my MMC seems okay (apart from the main partition p0)

I really appreciate your help but I think you're missing my point:
- fastboot works.
- diags boots (so diags kernel is fine and diags partition is fine) but freezes after some time.
- main partition cannot be written by fastboot (size limitation) and not by diags (not enough time before freezing) and even if I was able to re-flash it, I'd bet that it would still freeze with the mxc_rtc-problem on the "Boy reading under tree"-screen.

I've traced the mxc_rtc into the linux-kernel where it's responsible for accessing rtc-functions on the freescape-CPU. As the kernel image is fine (there is a checksum check at booting), this problem should not arise from the filesystem/mmc.

Regards,

TCC
Try erasing /var/local, which contains the boot counter (just to see if it helps):

dd if=/dev/zero of=/dev/mmcblk0p3 bs=4K count=1024

That should be quick, especially if run from RUNME.sh
geekmaster is offline   Reply With Quote
Old 04-13-2012, 07:15 AM   #162
TCCPhreak
Member
TCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of lightTCCPhreak is a glorious beacon of light
 
Posts: 14
Karma: 12366
Join Date: Mar 2012
Device: Kindle 4GNT
Quote:
Originally Posted by geekmaster View Post
Try erasing /var/local, which contains the boot counter (just to see if it helps):

That should be quick, especially if run from RUNME.sh
I don't quite see how the boot counter should affect problems with the RTC, especially as the problem arises "long after" diag has booted. dosfsck reports problems (see bootlog) but nothing critical.

Also, setting up the network and sshing to the kindle takes too much time. It crashes before I can run dd or copy the runme.sh.

Battery is low again - it seems like one night without charger really drains it in the wrong mode. I'll have to try again, later.

Regards,

TCC
TCCPhreak is offline   Reply With Quote
Old 04-20-2012, 08:29 PM   #163
vlamark
Junior Senior Member
vlamark began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Aug 2010
Location: Serbia, Šabac
Device: K2 & K5
*****

Last edited by vlamark; 04-21-2012 at 04:05 AM. Reason: wrong post, sry
vlamark is offline   Reply With Quote
Old 04-24-2012, 04:29 AM   #164
hawk72
Junior Member
hawk72 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: KINDLE4
xx谢谢分享
hawk72 is offline   Reply With Quote
Old 05-01-2012, 08:54 AM   #165
xueyou2
Connoisseur
xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.xueyou2 can eat soup with a fork.
 
Posts: 58
Karma: 9096
Join Date: Apr 2012
Device: none
I do not understand this thread exactly.
I have a brick kindle keyboard 3g.I can access diagnos mode and usb mode.
Is that mean i can ssh to kindle and debrick k3 via usb?
Because i do not want to Pry open the back cover.And the serial port is not easy to solder.
Thank you!
xueyou2 is offline   Reply With Quote
Reply

Tags
debricking, kindle mx50 select boot

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bricked Kindle Touch; Won't boot into diags/fastboot kerotan Kindle Developer's Corner 3 05-19-2012 10:58 AM
Kindle Touch does not boot marmomr Kindle Developer's Corner 38 05-16-2012 01:19 PM
Kindle Touch select text, copy paste? Zimmy Amazon Kindle 3 02-18-2012 08:45 AM
Kindle Touch Won't Boot teekay Kindle Developer's Corner 3 12-10-2011 12:51 AM
Opus cannot boot, stuck on boot screen baloma Bookeen 35 11-13-2010 04:20 AM


All times are GMT -4. The time now is 12:19 AM.


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