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-15-2012, 10:23 AM   #211
zeb
Connoisseur
zeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with others
 
Posts: 73
Karma: 2634
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by geekmaster View Post
There is NOT an MfgTool for linux. It is a large comprehensive tool for manufacturer installation and testing of new kindles, and it is very Win32-specific (many winapi calls). It would be VERY difficult to port.

As I suggested, sb_loader provides the small part that we need, but I was not able to successfully run a custom linux kernel (uImage) using it (but yifanlu reported success). There is a much simpler version of sbloader for linux, in the RockBox project, which I partially ported for kindle use (not finished yet, like MANY projects that I started). I get projects like that working just enough to PROVE that I *CAN* finish it (when I need it enough to suck time away from other projects).
Thanks a lot. So you would use sb_loader under Linux to activate fastboot on your Kindle? I am looking forward to seeing this. Many thanks for your valuable contributions.
zeb is offline   Reply With Quote
Old 06-15-2012, 10:25 AM   #212
zeb
Connoisseur
zeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with others
 
Posts: 73
Karma: 2634
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by knc1 View Post
Yes.
If this is the answer to my question: "is it possible to select fastboot from a Linux environment (with no access to Windows)?", it would be great if you could share a bit more
zeb is offline   Reply With Quote
Old 06-15-2012, 10:28 AM   #213
knc1
Embedded Cheerleader
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: 6,341
Karma: 5840124
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by zeb View Post
If this is the answer to my question: "is it possible to select fastboot from a Linux environment (with no access to Windows)?", it would be great if you could share a bit more
Have you checked the information available in the forum top sticky on the topic of de-bricking? That is where the tool is most used.

Have you yet voted in the "Help Me Poll" ?
knc1 is offline   Reply With Quote
Old 06-15-2012, 10:32 AM   #214
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,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by zeb View Post
Thanks a lot. So you would use sb_loader under Linux to activate fastboot on your Kindle? I am looking forward to seeing this. Many thanks for your valuable contributions.
After "win32 fastboot" came out so you can do it all in windows, I stopped work on "sbloader for linux" (less need for it). It would still be nice to do it all from linux and not need windows.

I did provide the unfinished source for my rockbox sbloader port to kindle for somebody that requested it. That was quite some time ago -- apparently they did not complete it either. It runs enough to talk to the kindle in USB Downloader mode and dump out status messages, but cannot upload and run a uboot image yet.

I wanted to do a custom uboot image that can export the serial port and the mmc contents over USB, and expand sbloader to become an SSH-like "USB Downloader" terminal program (so you do not need a serial port to use u-boot bist functions). Too many projects, and too little time...
geekmaster is offline   Reply With Quote
Old 06-15-2012, 10:51 AM   #215
zeb
Connoisseur
zeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with others
 
Posts: 73
Karma: 2634
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by knc1 View Post
Have you checked the information available in the forum top sticky on the topic of de-bricking? That is where the tool is most used.

Have you yet voted in the "Help Me Poll" ?
Well yes, I read the sticky debricking thread (several times), and I do not see a way to activate fastboot without Windows/MfgTool. The "Select Boot" instructions use MfgTool for win too. Am I wrong?
zeb is offline   Reply With Quote
Old 06-15-2012, 11:09 AM   #216
knc1
Embedded Cheerleader
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: 6,341
Karma: 5840124
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by zeb View Post
Well yes, I read the sticky debricking thread (several times), and I do not see a way to activate fastboot without Windows/MfgTool. The "Select Boot" instructions use MfgTool for win too. Am I wrong?
fastboot is the name of a program and of a boot mode.
The fastboot program is available for Linux/Mac/Win.
knc1 is offline   Reply With Quote
Old 06-15-2012, 11:13 AM   #217
zeb
Connoisseur
zeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with others
 
Posts: 73
Karma: 2634
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by knc1 View Post
fastboot is the name of a program and of a boot mode.
The fastboot program is available for Linux/Mac/Win.
Yes, I found the program there: http://www.mobileread.com/forums/sho...d.php?t=174923, using the sudoforlunch link.

However, for activating the mode, I understand there is no public tool under Linux, except in the future the sbloader program that geekmaster is working on. The only way is to use MfgTool under Win. Am I correct?
zeb is offline   Reply With Quote
Old 06-15-2012, 11:22 AM   #218
knc1
Embedded Cheerleader
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: 6,341
Karma: 5840124
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by zeb View Post
However, for activating the mode, I understand there is no public tool under Linux, except in the future the sbloader program that geekmaster is working on. The only way is to use MfgTool under Win. Am I correct?
How I follow your question, I was a bit lost earlier.

I think I just that read that in a GM post made today.
But that might have been in a different thread.

Pull up the list of GM posts for today, see if it is in there.
knc1 is offline   Reply With Quote
Old 06-15-2012, 11:34 AM   #219
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,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by zeb View Post
Yes, I found the program there: http://www.mobileread.com/forums/sho...d.php?t=174923, using the sudoforlunch link.

However, for activating the mode, I understand there is no public tool under Linux, except in the future the sbloader program that geekmaster is working on. The only way is to use MfgTool under Win. Am I correct?
There is no linux sbloader program for the kindle. There are sbloader tools for other freescale i.MX devices (such as the RockBox project that I mentioned). Different devices use different VID/PID and may have other USB protocol differences. That is why I am in the (currently stalled) progress of porting RockBox sbloader to the kindle.

We only use a small part of MfgTool (for windows), and that part is also supplied by sb_loader (and sbloader).
geekmaster is offline   Reply With Quote
Old 06-15-2012, 12:49 PM   #220
zeb
Connoisseur
zeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with otherszeb plays well with others
 
Posts: 73
Karma: 2634
Join Date: Sep 2010
Device: none
Thank you to you both for these explanations. That is very clear now.
zeb is offline   Reply With Quote
Old 06-15-2012, 01:38 PM   #221
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,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Here is the original RockBox sbloader.c that I used when I started my port:
http://git.rockbox.org/?p=rockbox.gi...ols/sbloader.c

I have made a lot of (debugging) changes to my copy of it, including changing the USB VID/PID to what K4 and K5 USB Downloader mode uses.

EDIT: I fixed the URL. My VM has occasional copy/paste problems.

Last edited by geekmaster; 06-15-2012 at 01:42 PM.
geekmaster is offline   Reply With Quote
Old 06-23-2012, 09:31 AM   #222
kirokko
Member
kirokko began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Mar 2012
Device: Kindle 4
Hello.

Does the data.tar.gz and runme.sh work on Kindle 4 with FW 4.1.0?
kirokko is offline   Reply With Quote
Old 06-23-2012, 09:23 PM   #223
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,771
Karma: 4461927
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
@kirokko: Not on main, no. There shouldn't be any issues on diags, though .
NiLuJe is offline   Reply With Quote
Old 06-24-2012, 07:59 AM   #224
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,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by NiLuJe View Post
@kirokko: Not on main, no. There shouldn't be any issues on diags, though .
Also, be sure that any RUNME.sh scripts designed to run from main get MODIFIED to mount main and make changes relative to the mount point.

For example, to access /etc/shadow in main, do this:

mount /dev/mmcblk0p1 /mnt/mmc
cat /mnt/mmc/etc/shadow
geekmaster is offline   Reply With Quote
Old 08-15-2012, 04:32 AM   #225
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 711
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Linux zealots, rejoice (as I do)! There is cross-platform, small command-line utility to load and run binary code or program images over USB Downloader serial protocol. I.e. tool, which is sufficient to replace MfgTool for forced booting into various boot modes.

It's imx_usb_loader, made and open-sourced by nice guys from Boundary Devices. It depends only on libusb and consists of single .c file. Clone repository, make the tool and follow to my guide of it's work.

Note: imx_usb_loader does NOT work on recent Mac OS X, because libusb doesn't support USB HID devices on this OS! Read Kindle 5.3.2 stuck at reboot thread for details.

There is the only (and incomplete) official description of tool, I recommend to read it first.

imx_usb relies on one main configuration file, containing mapping of VID/PID of supported devices to device configuration files, and, obviously, device configuration file(s).

Main configuration file is named imx_usb.conf. This file in repository already contains VID/PID of i.MX508 (Kindle Touch's processor) in USB Downloader mode, however, it's mapped to missed device configuration file mx50_usb_work.conf. So, create missed file with following content:
Code:
KindleTouch
hid,1024,0x70000000,256M,0xF8000000,128K
Format of device configuration file is partially described in existing device configuration files (*_usb_work.conf), so I summarize here these descriptions and my findings after digging into source (at the recent commit 2430416c96).

Empty lines and lines starting from # character are skipped.

First line should contain name of device. It's arbitrary string displayed by tool when appropriate device is found. If line contains spaces, only part before first space is displayed by tool.

Next line should contain device characteristics separated by comma in following sequence:
  • USB protocol for communicating with device (hid or bulk)
  • optionally -- string old_header, if device requires old format of program image header (I believe, it's valid only for i.MX51 processors)
  • maximum packet size in bytes
  • start address and size of [first] memory area available for writing. Values should be separated by comma. Values begiining from 0x are recognized as hex numbers. Size value could be suffixed with one of k/K/m/M/g/G characters (it's multipliers standing for kilo/mega/giga)
  • optionally -- start address and size of next memory area(s) available for writing
As you've seen, Kindle Touch in USB downloader mode supports HID protocol with maximum packet size of 1024 bytes. I've set two memory areas as available for writing: first (with size of 256M) is DRAM area, second (with size of 128K) -- is OCRAM area. I've took these values from Reference Manual: I hope, I wasn't wrong in interpretation of table with memory map.

Every next [meaningful] line is optional. It should contain path to file to operate with, then colon, then directives, separated by comma. Directives are:
  • dcd -- load device configuration data (DCD) from program image into device
  • clear_dcd -- set DCD address field in IVT header of program image to NULL (0)
  • plug -- without jump uses header, but clears plugin flag to stop after plugin execution (??? / description copied straight from example configuration file, even after looking into sources, it's hard to say something more clear)
  • load N -- load file to device at address N (values beginning from 0x are recognized as hexidecimal numbers)
  • jump N -- jump to address N and start executing (values beginning from 0x are recognized as hexadecimal numbers)
  • jump header -- use load address and data length from first found IVT header of program image and exit with error if header wasn't found. Plugin flag in Boot Data Structure will be cleared. After loading, jump to load address.
  • jump header2 -- use load address and data length from second found IVT header of program image and exit with error if header wasn't found. Plugin flag in Boot Data Structure will be cleared. After loading, jump to load address. (Note: though this directive is recognized by tool as valid, I didn't found any specific code for processing it's case.)
So, these optional lines pointed to any files could be used for automating of loading/executing specific binary code or program images. Look into stock *_usb_work.conf files for examples.

(For definitions of "program image", "DCD", "IVT", "Boot Data Structure", refer to i.MX50 Reference Manual.)

Anyway, if path to some file is given as command line argument, these optional lines are skipped (if they were found) and tool loads given file with automatical applying of following directives: dcd, plug, jump header.

U-Boot built from Amazon sources is the program image, so it is suited for loading through passing of command-line argument.

TL;DR:
  • clone repository
  • build tool
  • create file mx50_usb_work.conf with content from code block somewhere upper in text
  • connect KT in USB downloader mode to computer
  • run tool with passing path to U-Boot binary as command-line argument
I've succesfuly booted into diagnostic mode through loading of specific U-Boot with this tool.

Last edited by eureka; 01-12-2013 at 11:18 AM. Reason: imx_usb_loader doesn't work on MacOS X
eureka 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 08:09 AM.


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