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-05-2012, 07:43 AM   #1
Frenko
Member
Frenko began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
[Kindle3] cat:can't open '/sys/devices/platform/charger/globals': No such file or dir

Hello guys!

Quite some time ago I bricked my Kindle 3 EU (not US) wi-fi only.
Spoiler:


Now that I'm trying to repair it, I got my serial connection going (kudos to knc1 without whom I would still be looking at a blank screen ) but in hyperterminal's console I get this error
Code:
cat: can't open '/sys/devices/platform/charger/globals': No such file or directory
that keeps looping over and over again (and I don't know how to send a break command)

If I press enter it returns
Code:
Welcome to Kindle!

kindle login:
immediately followed by the ever looping error
Spoiler:

as so
Code:
cat: can't open '/sys/devices/platform/charger/globals': No such file or directo
ry
cat: can't open '/sys/devices/platform/charger/globals': No such file or directo
ry



Welcome to Kindle!

kindle login: cat: can't open '/sys/devices/platform/charger/globals': No such f
ile or directory
cat: can't open '/sys/devices/platform/charger/globals': No such file or directo
ry


What to do?

Cheers,

f
Frenko is offline   Reply With Quote
Old 03-05-2012, 08:20 AM   #2
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Frenko View Post
If I press enter it returns
Code:
Welcome to Kindle!

kindle login:
immediately followed by the ever looping error
Just close your eyes and keep on typing whatever is expected for the login response.
It is a full duplex serial line, it is listening to your key strokes even while outputting other messages.

Then, once you log in, we just need to find and stop what is sending the error messages. Not to fix the overall problem, but just so the serial line can be used without a bunch of distracting chatter from something failing.

Hints:
Turn on the 'capture' feature of your terminal and save the capture file. It may be neccessary to use a text editor on the capture file to sort out the input/output from the error message chatter.

If your terminal has a provision to define 'keystroke macros' (strings sent in response to a specific key combination), it may be neccessary to use that for the various things to be sent to the kindle (like the login strings).

And/Or - check if your terminal has a 'hand off' feature (many do) it may be neccessary to use that to turn the serial line over to an 'expect' or 'chat' script.

Some terminal emulators have such a 'chat' feature included, left over from dealing with modems and dial-up connections. It may be neccessary to use that to get past the chatter.

Eventually we will get to the point where we can get a process list of what is running (using either 'ps aux' or 'top -bn1') -
It is one of those things which:
Is a script;
Is calling 'cat';
Does not have stderr redirected;
And not checking the error return from the 'cat' command.
(And from the content of the message, wants to know if the charger is connected and the state of the battery charge but is doing it Before the software charger controls are loaded. I.E: a start-up script without the proper dependences set.)

Notes:
Linux (any *nix) starts up with only an "operator's console line" (/dev/console) to communicate with the outside world. Everything else is add-ons by other programs.
Something (which shouldn't be by design) is still talking to /dev/console.

Linux (any *nix) is a single, stand-alone, program that only runs one other program when it is ready to run anything at all.

The usual default is a special program that starts, controls and stops multiple other programs but it does not have to be. A common debugging setting is to set either: 'init=/bin/sh' or 'rdinit=/bin/sh' on the kernel command line.

That leaves the system as just you, the kernel, and the command shell talking on /dev/console. No chance for anything else to start up (and fail) while locating the source of the original problem.

Changing the kernel command line arguments in an embedded system is done from the boot loader (here: u-boot) with commands to 'setenv', 'getenv', etc.

Translation: This is good progress, just a bit messy with all of the chatter going on.

O.P. first complains his machine will not talk to him. Now complains that it says too much. What will make him happy?

Last edited by knc1; 03-05-2012 at 08:43 AM.
knc1 is offline   Reply With Quote
Advert
Old 03-05-2012, 12:11 PM   #3
geekmaster
Carpe diem, c'est la vie.
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: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
When I debricked my touch using the serial port, it would halt at the repair needed screen within 10 to 30 seconds after I logged in, which terminated my serial port session. I successfully "uploaded" and ran a few scripts to debug and repair it by copying the script contents to the clipboard and pasting it to my serial terminal immediately after logging in. And yes, you need to ignore a LOT of status messages interleaved with your desired output.

It took a few passes, after I pasted some "scripts" to snoop around and display output (which I later analyzed in my terminal scrollback buffer). Then finally, I pasted script contents into my serial login session that fixed the problem (a broken startup script).

Even if you have access for only 10 seconds per reboot, you CAN investigate and repair your kindle like I did.

Last edited by geekmaster; 03-05-2012 at 12:17 PM.
geekmaster is offline   Reply With Quote
Old 03-05-2012, 12:18 PM   #4
geekmaster
Carpe diem, c'est la vie.
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: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by knc1 View Post
O.P. first complains his machine will not talk to him. Now complains that it says too much. What will make him happy?
He just needs to activate the kindle's voice recognition, and shout "Kindle, heal thyself!", while seated in a lotus position with his kindle cradled lovingly in his lap (although I hear that the results obtained by this method depend on the phase of the moon and the alignment of the planets).
geekmaster is offline   Reply With Quote
Old 03-05-2012, 01:59 PM   #5
Frenko
Member
Frenko began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Thank you both!

In the last episode I managed (with some help) to connect the kindle to the pc... but my brain must have gotten disconnected in the process

What we were looking at was the output after a "normal boot"

I just had to keep holding the power switch a little longer (I got fooled by the blinking led) and this is the output after a "hard reset"

Code:
U-Boot 1.3.0-rc3-lab126 (Feb  5 2011 - 19:03:59)

CPU:   Freescale i.MX35 at 532 MHz
Board: MX35 Luigi [ POR]
WDOG_WCR = 0xff31
WDOG_WMCR = 0x0
Board Id: SP1B000000000000
S/N: B008XXXXXXXXXXXX
DRAM:  256 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
No ethernet found.
i.MX35 CPU board version 2.0
Net:   No ethernet found.
Hit any key to stop autoboot:  0
## Booting image at 87f40400 ...
   Image Name:   Linux-2.6.26-rt-lab126
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2166568 Bytes =  2.1 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux.............................................................
............................................................. done, booting the
kernel.
boot: C def:bcut:batterycut=1:
2.6.26-rt-lab126 #5 Sat Feb 5 19:05:05 PST 2011 armv6l
INFO:Using default keypad setting. (not passing "kb_rev" to module)
INFO:Loaded module /lib/modules/mxc_keyb.ko  (22508 bytes)
Press [ENTER] for recovery menu...       0 /
INFO:Partition table verified for /dev/mmcblk0
INFO:Loaded module /lib/modules/eink_fb_hal.ko  (73284 bytes)
[...]
Now if I understand correctly I should hit enter to access the recovery menu then select 3 and then enter my fiona password (that should be obtainable with md5sum -s=S/N and cutting off 3 or 4 digits Wrong! Working on it.), etc.
Ok, one step at a time... back to studying and experimenting and let's hope my brain is connected this time around (finger crossed )

All jokes aside I'm really sorry to have wasted your time.

Quote:
Originally Posted by knc1 View Post
O.P. first complains his machine will not talk to him. Now complains that it says too much. What will make him happy?
Nothing. That is called "being human" I guess?

Cheers,
f

EDIT:

Quote:
Originally Posted by geekmaster View Post
He just needs to activate the kindle's voice recognition, and shout "Kindle, heal thyself!", while seated in a lotus position with his kindle cradled lovingly in his lap (although I hear that the results obtained by this method depend on the phase of the moon and the alignment of the planets).
That sounds cool but... happy? I'm not sure
...and, might I add, the most unlikely part of what you've written is me sitting in a lotus position I'm so rigid sometimes I think I'm dead and I didn't noticed yet

Last edited by Frenko; 03-06-2012 at 09:33 AM.
Frenko is offline   Reply With Quote
Advert
Old 03-05-2012, 02:05 PM   #6
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
A way for making the statement go away could be a
touch /sys/devices/platform/charger/globals
that would create the missing file. I don't know if it would work but it's worth a try
giorgio130 is offline   Reply With Quote
Old 03-05-2012, 02:11 PM   #7
Frenko
Member
Frenko began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Quote:
Originally Posted by giorgio130 View Post
A way for making the statement go away could be a
touch /sys/devices/platform/charger/globals
Grazie Giorgio

But to be fair I was thinking of ignoring the error and go on with the unbricking attempt just for now.

Cheers,
f
Frenko is offline   Reply With Quote
Old 03-05-2012, 02:34 PM   #8
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by giorgio130 View Post
A way for making the statement go away could be a
touch /sys/devices/platform/charger/globals
that would create the missing file. I don't know if it would work but it's worth a try
The /sys file tree is dynamically created and maintained by the kernel.
You can't create directories there, and only very rarely, write to anything.
knc1 is offline   Reply With Quote
Reply

Tags
bricked, console error, kindle3, serial output

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Good Charger for Multiple Devices? taming General Discussions 16 11-05-2011 06:53 AM
Cannot open book or news in Kindle3 donvan Devices 10 05-05-2011 01:27 AM
Ended FREE: 505 Purple M-Edge Platform Jacket & Wall Charger daffy4u Flea Market 4 12-31-2010 11:01 PM
New post on Kobo blog about open platform taming Kobo Reader 7 10-24-2010 12:24 AM
Google announces Android open mobile phone platform Bob Russell Alternative Devices 18 02-06-2008 11:36 AM


All times are GMT -4. The time now is 05:52 AM.


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