06-19-2012, 07:41 AM | #46 |
Wizard
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
I think that's the ATK, yes. I didn't check if it's the i.MX35 version, but you will notice when it's installed. It works using the USB connection, you've got to bring your Kindle into bootloader mode to connect. Nobody had success with any step further, however - hacking adventures before you. Since you are asking proficient questions it might not be fully out of scope for you, though. But you would need a good understanding on how a modern CPU/SoC works, what the exact role of a boot loader is and how to compile (for example) the Linux kernel for different targets.
Indeed, Yifanlu provided a great description on how to load a rescue kernel via serial console. It would work just the same on the K3, I think. Thanks for the link, I didn't stumble over that text yet. It's probably the easiest way out, since you know how to get to Uboot already. Also, this is an approach common to many embedded devices using uboot. AFAIK, if the exporting would work, it should present you _all_ partitions of the Kindles flash storage. The basic layout (I don't have my K3 here right now) is as follows: - partition 1: root file system, which is mounted read-only on normal Kindle use. Thus it should only break if you forget to bring it back into read-only mode... - another partition for the user store, which is mounted to /mnt/base-us in normal use which is again mounted as /mnt/us (using a passthrough filesystem that's able to "cut" the bounds to the underlying file system when it needs to be accessed via USB) - another partition for the kernel, I think - another partition for bootloader "environment", i.e. configuration variables. The latter don't carry filesystems. The root file system is ext2, I think, might also been ext3. The user store is VFAT. |
06-19-2012, 09:29 AM | #47 | |||
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Quote:
Quote:
If unable to put an update*.bin file on the user store to fix the main system image, then the next thing to try is to load over the serial port a kernel+initramfs that can run memory resident and re-load mmcblk0p1 with the root file system for you. I am not sure if anyone has made such a serial port loadable image for the K3 - it will take YOU some research to learn if it exists. Last edited by knc1; 06-19-2012 at 09:43 AM. |
|||
Advert | |
|
06-19-2012, 12:21 PM | #48 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Note on above messages
As shown, that is a kernel+initramfs running memory resident.
We may have to tweak (or completely re-write) the initramfs scripting - - We may have to add a MR_Dev public key for the "auto-pilot" mode update*.bin files - - But there is the memory resident (rescue) kernel+initramfs that is known to run on the K3 talking to us. |
06-19-2012, 12:55 PM | #49 |
Wizard
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
Ah, thank you for highlighting the relevant parts. That explains a lot. Yifanlu also created a "rescue kernel" before, I think he might have customized the initramfs in that case. The "update*.bin" path sounds great, but as you mentioned, it is blocked by being not affected by the jailbreak, so custom update*.bin files won't work. As you said, the MR_Dev public key would have to be added.
Good thing however is that this reminded me: - Yifanlu already went through the creation of a custom rescue kernel. - Such a kernel probably can be loaded via serial interface to uboot. It's published here: http://yifan.lu/2011/06/25/one-more-...-for-kindle-3/ Also, Seaniko7 has also created such a kernel (that also has kexec support, which is irrelevant for the problem at hand): https://www.mobileread.com/forums/sho...75602&langid=2 |
06-19-2012, 01:00 PM | #50 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
I am taking the week off from wiki-editing, but will bookmark your post above and add those links to the index system next time around.
Unless someone else beats me to it. |
Advert | |
|
06-19-2012, 01:20 PM | #51 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Today's workaround
For the purposes of this thread (with a working u-boot and a working kernel+initramfs) ....
In u-boot, add: rdinit=/bin/sh (or /bin/ash if that doesn't work) and then tell u-boot to continue the boot process. That will give you a busybox ash shell rather than run the initramfs shell scripting. Then you can "rescue and bring up" the system from the memory resident system that is known to run "by hand". Ref: http://www.linuxtopia.org/online_boo...tion/re63.html |
06-19-2012, 01:56 PM | #52 |
Connoisseur
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
|
I have a K3G on firmware 3.3. I can provide a simple dd img backup if you would like.
Last edited by dasmoover; 06-19-2012 at 01:58 PM. |
06-19-2012, 02:34 PM | #53 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Here is a write-up (for RealTek media players) that you can adapt for the Kindle messages. http://minimodding.com/tiki-index.php?page=SystemRescue That one is windows, there is also a *nix version on the site using expect. Dig around a bit in the "HowTo" sections. |
|
06-19-2012, 02:53 PM | #54 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
If this doesn't help (as u-boot entries in the kernel command line variables):
http://www.linuxtopia.org/online_boo...tion/ch10.html Maybe this will help: Last edited by knc1; 06-19-2012 at 03:15 PM. |
06-19-2012, 06:02 PM | #55 | ||
Enthusiast
Posts: 44
Karma: 40820
Join Date: Jun 2012
Device: Kindle 3 WIFI
|
Quote:
Btw, I found this page, that has great information about Kindle 3. The title of the post is: "Kindle 3 Discovery Tour: Kernel Config, Processes, Programs, Modules, /proc, cpuinfo, dmesg, meminfo, mounts, fstab and other Inside Information (Firmware 3.1)" http://linux-tipps.blogspot.com/2011...el-config.html Quote:
Last edited by wlaf; 06-19-2012 at 06:04 PM. |
||
06-19-2012, 07:01 PM | #56 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
If the rdinit=/bin/sh on the kernel command line (gotten there by adding it to one of the u-boot, command line variables) gets you a sh command shell... The first thing you will need to do is: mount -t proc proc /proc mount -t sysfs sysfs /sys Those two will need to be mounted because many commands/utilities need to be able to reference them. You will also need /dev but that may be handled by your kernel internally, we can look around and see what is needed after doing the above. Note: It is getting late in the day, early in the evening, in my time zone - this may have to wait until tomorrow (say 12 hours from now). |
|
06-20-2012, 04:05 PM | #57 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
|
06-23-2012, 09:20 AM | #58 |
Enthusiast
Posts: 44
Karma: 40820
Join Date: Jun 2012
Device: Kindle 3 WIFI
|
The last time I was working with the kindle, I got kernel panic and I didn't have enough time to work on it until today. I didn't know if it consumes battery when getting "kernel panic" or not, so I attached the USB cable hoping that it will chare! After a while, at last, today I found a time to work on my kindle. Now I see that the device actually "consumes" battery when in the state of kernel panic. This is what I see:
Code:
[Critical Battery Lock-out Menu] 1. Skip R. reboot Choose: \ INFO:luigi_gadget_is_charging: read '1' Charge: 2% [##::::::::::::::::::::::::::::::::::::::::::::::::::::::::] Code:
[Critical Battery Lock-out Menu] 1. Skip R. reboot Choose: \ INFO:luigi_gadget_is_charging: read '1' Charge: 3% [##::::::::::::::::::::::::::::::::::::::::::::::::::::::::] Code:
[Critical Battery Lock-out Menu] 1. Skip R. reboot Choose: \ INFO:luigi_gadget_is_charging: read '1' === BATTERY HAS SUFFICIENT CHARGE (4%) === INFO:Partition table verified for /dev/mmcblk0 INFO:Checking for updates... (auto-pilot mode) Last edited by wlaf; 06-23-2012 at 09:23 AM. |
06-23-2012, 09:35 AM | #59 | |
Enthusiast
Posts: 44
Karma: 40820
Join Date: Jun 2012
Device: Kindle 3 WIFI
|
Quote:
Code:
uboot> setenv rdinit /bin/sh uboot> boot Code:
Checking for init: /sbin/init Checking for init: /bin/init Checking for init: /etc/init Checking for init: /sbin/init.sysvinit Checking for init: /bin/sh kinit: init not found! Kernel panic - not syncing: Attempted to kill init! Code:
INFO:Checking for updates... (auto-pilot mode) /dev/mmcblk0p4: CHS=4/16/100167 size=3282272256 bytes flag type first last lba first lba size Partition p1: 0x00 0x0b 24072 <large> 7688 6403000 CHS: 376/0/9 - <large> Partition p2: Partition p3: Partition p4: INFO:Setup loop device /dev/loop0 for /dev/mmcblk0p4 + 3936256 INFO:No update*.bin found; no update needed. INFO:no updates found. BOOTING DEFAULT. argc == 9 argv[0]: "kinit" argv[1]: "console=ttymxc0,115200" argv[2]: "mem=256M" argv[3]: "panic=10" argv[4]: "root=/dev/mmcblk0p1" argv[5]: "ro" argv[6]: "ip=none" argv[7]: "quiet" argv[8]: "lpj=2555904" Running ipconfig argc == 4 argv[0]: "IP-Config" argv[1]: "-i" argv[2]: "Linux kinit" argv[3]: "ip=none" IP-Config: no devices to configure kinit: do_mounts kinit: name_to_dev_t(/dev/mmcblk0p1) = dev(179,1) kinit: root_dev = dev(179,1) kinit: failed to identify filesystem /dev/root, trying all kinit: trying to mount /dev/root on /root with type ext3 kinit: trying to mount /dev/root on /root with type ext2 kinit: trying to mount /dev/root on /root with type cramfs kinit: trying to mount /dev/root on /root with type msdos kinit: trying to mount /dev/root on /root with type vfat kinit: Unable to mount root fs on device dev(179,1) Checking for init: /sbin/init Checking for init: /bin/init Checking for init: /etc/init Checking for init: /sbin/init.sysvinit Checking for init: /bin/sh kinit: init not found! Kernel panic - not syncing: Attempted to kill init! |
|
06-23-2012, 09:55 AM | #60 | |
Enthusiast
Posts: 44
Karma: 40820
Join Date: Jun 2012
Device: Kindle 3 WIFI
|
I also could be able to connect via ATK:
Image Convert: Flash tool: But it don't work when the kindle is in kernel panic state. It says: Quote:
Last edited by wlaf; 06-23-2012 at 09:59 AM. |
|
Tags |
boot, reboot, shell |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Damn you Amazon... | apastuszak | Amazon Kindle | 37 | 05-03-2012 07:42 PM |
What's with all the damn vampires? | Jack Silkstone | General Discussions | 99 | 11-23-2011 10:23 AM |
PRS-600 well...damn. | Zerhackermann | Sony Reader | 11 | 01-23-2010 08:50 AM |