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 08-15-2012, 08:52 AM   #226
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 eureka View Post
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.
...
Excellent! I am anxious to test it. I was not able to make the windows sbloader program from freescale work, and I did not finish porting the linux sbloader program from the RockBox project to the kindles, so this is great news. It will save a lot of time if it works properly (unlike the version from freescale).

We do not need all the extra "manufacturer" support built into MfgTool. We only need the small subset built into usb_downloader.

Last edited by geekmaster; 09-24-2012 at 07:52 PM.
geekmaster is offline   Reply With Quote
Old 08-15-2012, 08:54 AM   #227
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 eureka View Post
... [*] run tool with passing path to U-Boot binary as command-line argument[/list]I've succesfuly booted into diagnostic mode through loading of specific U-Boot with this tool.
You should be able to use the custom u-boot images I built that are in the MfgTool Profiles folder, to select which bootmode to use when using this tool instead of MfgTool.

Last edited by geekmaster; 09-24-2012 at 07:54 PM.
geekmaster is offline   Reply With Quote
Old 09-25-2012, 08:19 PM   #228
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Confirmed working

This is great! Thanks a lot, eureka - finally we don't need to jump through all those Windoze hoops anymore.

I just tried it, and it works smoothly. Just for reference again, here's what I did:
  1. Clone repository: cd /tmp; git clone https://github.com/boundarydevices/imx_usb_loader.git
  2. Compile: cd imx_usb_loader; make
  3. Create mx50_usb_work.conf as explained in eureka's post
  4. Copy main.bin, diags.bin, and fastboot.bin from the MfgTool profiles folders
  5. Boot K5 into USB recovery mode, and execute sudo ./imx_usb diags.bin

Spoiler:

$ sudo ./imx_usb diags.bin
parse mx50_usb_work.conf
15a2:0052(KindleTouch) bConfigurationValue =1
Interface 0 claimed
report 1, wrote 16 bytes, err=0
report 3, read 4 bytes, err=0
read=56 78 78 56
diags.bin
No dcd table, barker=402000d1
dcd_ptr=0x00000000

loading binary file(diags.bin) to f8006000, skip=0, fsize=800 type=aa

<<<2048, 2048 bytes>>>
jumping to 0xf8006400
report 1, wrote 16 bytes, err=0
report 3, read 4 bytes, err=0
read=56 78 78 56
jump_mode 2 plug=1 err=0
diags.bin
header_max=1000

loading binary file(diags.bin) to f8007000, skip=0, fsize=fed0 type=aa

<<<65232, 65232 bytes>>>
jumping to 0xf800742c


Now here's the $ 10⁶ question: How will one be able to boot the KPW into USB recovery mode, if there's no physical "magic" button on the device?

Of course I know it's all gonna be speculation because nobody has the device yet - just wondering how it could work in principle. Need to open the device? Or, maybe, a "really long press" of the power button? Morse codes with the power button? ... ?

EDIT:
For some reason, if you want to run it entirely through the configuration file (instead of giving a file from the command line), you need two lines for it to complete:
Code:
KindleTouch
hid,1024,0x70000000,256M,0xF8000000,128K
img/main.bin:dcd,plug
img/main.bin:jumpheader
"dcd,plug,jumpheader" in just a single line doesn't work. BTW, you can write "jumpheader" or "jump header" - with or without space seems to be ok

Last edited by ixtab; 09-25-2012 at 09:56 PM.
ixtab is offline   Reply With Quote
Old 09-25-2012, 09:22 PM   #229
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,339
Karma: 5840124
Join Date: Feb 2012
Device: Too many.
The magnet in the cover puts the device to sleep when closed, wakes it when open.

Hold magnet over that area of the device, wait for it to go to sleep, turn off power, turn on and hold power switch on - - **while** the magnet is still in-place.

The above is speculation.

Based on:
Since the cover with the magnet is a "zipper close" case - -
It would normally be unusual for someone to diddle with the power switch while the case was closed.

At the moment, those are the only two known hardwired inputs (power switch and magnetic switch).
knc1 is offline   Reply With Quote
Old 09-25-2012, 10:33 PM   #230
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 knc1 View Post
...
At the moment, those are the only two known hardwired inputs (power switch and magnetic switch).
It could also be rotation sensitive, using accelerometer events. The "waitforkey" function returns keycodes when you rotate up/down/left/right.

I did try rotations when I was searching for a DX magic key -- unsuccessfully.

On kindles with sound, there is also headphone insertions/removal events (and keycodes).

And because the Paperwhite uses low power consumption capacitive sensing, a screen touch may also be part of the "magic key" sequence.

(More speculation)...
geekmaster is offline   Reply With Quote
Old 09-25-2012, 10:35 PM   #231
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 ixtab View Post
This is great! Thanks a lot, eureka - finally we don't need to jump through all those Windoze hoops anymore.

I just tried it, and it works smoothly. ...
The thing that has been holding us back from adding this to our debricking guides (and even using it), is the lack of cross-platform executables.

We need to add the executables to the simple debricking sticky thread download links, and we need to make new versions of the guides (keeping the old ones) to use the new tools.

We should allow doing it the old way (MfgTool) or the new way with the new tool.

And again, thanks eureka! Things take awhile to gain momentum (more than a month, in this case).
geekmaster is offline   Reply With Quote
Old 09-26-2012, 03:40 AM   #232
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
A few more thoughts on the imx_usb tool:

I can't for the life of me figure out why I can't access the DRAM. I looked at the Reference Manual (for convenience, the Memory map is on page 150, while the USB mode is on page 471).

I have tried to fiddle around a bit with modifying some memory, the rationale being: if it's possible to upload an initrd in addition to a custom u-boot image (which would load that initrd), then we'd essentially be able to control the entire boot process, without having to write to the "disk" at all. So the first step was to simply try and upload something to the RAM - but it fails consistently. In fact, I seem to be able to access pretty much every memory location - with the exception of the DRAM

I checked and double-checked it: the data going over the line is correct (you can simply #define DEBUG in the source file, and it'll dump reads and writes, so I could cross-check with the reference manual), but as soon as I even try to read 0x70000000, the result is libusb error -4 (LIBUSB_ERROR_NO_DEVICE).

Does anyone have an explanation for this? Could it be that the DRAM isn't initialized yet? And if so... which options do we have? For now, it seems like the only region that we can really access is the 128kB of OCRAM starting at F8000000. That's obviously enough for putting u-boot in there, but not much more.

Thinking aloud: maybe a custom u-boot that downloads a kernel using tftp could do...
ixtab is offline   Reply With Quote
Old 09-26-2012, 03:45 AM   #233
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,339
Karma: 5840124
Join Date: Feb 2012
Device: Too many.
@ixtab: See the part where the DCD is set to null so that the built-in DCD is used from i.ROM?
You most likely have to download the DCD and perhaps the CSF needed to enable the DRAM before downloading and executing the "client" part of the communications code.
(or, a U-Boot configured to init the DRAM when it starts up - - what you have found sounds like your downloading U-Boot into the SoC i.RAM).

Sign-for and download the application note: AN3996.pdf from the Freescale site.
Its one of their free documents that you have to sign-for (limited distribution).
You might also want the source code to the R170_ATK_STD bundle; that plus the part number of the DRAM chip should let you find the "magic numbers"

Last edited by knc1; 09-26-2012 at 03:51 AM.
knc1 is offline   Reply With Quote
Old 09-26-2012, 04:02 AM   #234
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
Quote:
Originally Posted by ixtab View Post
Does anyone have an explanation for this? Could it be that the DRAM isn't initialized yet?
Yes.
Quote:
Originally Posted by ixtab View Post
And if so... which options do we have? For now, it seems like the only region that we can really access is the 128kB of OCRAM starting at F8000000. That's obviously enough for putting u-boot in there, but not much more.

Thinking aloud: maybe a custom u-boot that downloads a kernel using tftp could do...
To initialize DRAM one must setup a bunch of registers. The exact initialization sequence could be found in Amazon's U-Boot source.

Initialization (writing to registers) could be made with the help of ordinary code or through DCD.

And remember, just a part of 128kb of OCRAM is free for arbitrary use (refer to Reference Manual for details).
eureka is offline   Reply With Quote
Old 09-26-2012, 04:19 AM   #235
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by eureka View Post
Yes.
To initialize DRAM one must setup a bunch of registers. The exact initialization sequence could be found in Amazon's U-Boot source.

Initialization (writing to registers) could be made with the help of ordinary code or through DCD.
Could you give me a hint as to which file I should start looking at?

At the moment, I'm completely overwhelmed by hundreds of new acronyms and completely confused by the structure of the u-boot source. The only thing I found so far is the include/configs/imx50_yoshi.h file (heck, I'm not even sure if that is the right one!), which seems to include the "scripts" (actually environment definitions) that are run on startup, and a bunch of #defines. But there isn't any actual code in there... so where is it?


Quote:
Originally Posted by eureka View Post
And remember, just a part of 128kb of OCRAM is free for arbitrary use (refer to Reference Manual for details).
Hehe, nope. I got at least that one right - only 128k out of 128M are usable, but I knew that. Edit: duh... only 72k, actually (page 425). It seems like I really have to read almost all of the 3000 pages to (try to) understand this beast.

Edit: I just realized that it's probably largely irrelevant, because there's none of our code being run - after all, the device is in USB Downloader mode, so that's *before* u-boot is even launched. And if the DRAM isn't accessible, then there's nothing we can do about it.

Which means that the magic will have to be done from u-boot, so we're probably back to the tftp idea. But any hints about u-boot (or in particular, where to look for in the code if I want to enable that tftp stuff) are still welcome!

Last edited by ixtab; 09-26-2012 at 04:52 AM.
ixtab is offline   Reply With Quote
Old 09-26-2012, 04:57 AM   #236
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,339
Karma: 5840124
Join Date: Feb 2012
Device: Too many.
@ixtab: Sort of: The 128K you find usable is internal to the SoC.
The i.ROM code burned into the SoC only deals with things that are present on the SoC.
(With a slight bending of that rule if using external USB device instead of the on-chip one.)

I think (not actually confirmed by myself) that the i.ROM code has enabled the SPI controller, so that you have the choice of reading the SPI rom from the DRAM to get the DRAM setup specifics.

If you haven't yet read AN3996.pdf, you will probably find that a better starting point than the U-Boot source. At least after reading AN3996.pdf you will recognize the CSF defines when you stumble across them (where ever they may be - I don't know).

Brain Fart: Since the Java bytecode engine is in hardware, you might be able to do this all in Java at the "client" (Kindle) end of the communications link. Just don't forget to service the watchdog.

Note: The K3Flasher is also a cross-platform application based on libusb - -
It might be a better starting point than the application that is being discussed here.
At least the original author is available at this site.
knc1 is offline   Reply With Quote
Old 09-26-2012, 05:50 AM   #237
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
Quote:
Originally Posted by ixtab View Post
Could you give me a hint as to which file I should start looking at?
Not now, but later today (or tomorrow). Right now, I can just point to relevant part of Yifan Lu's code (which is in fact copied straight from Amazon's U-Boot)

Quote:
Originally Posted by ixtab View Post
At the moment, I'm completely overwhelmed by hundreds of new acronyms and completely confused by the structure of the u-boot source. The only thing I found so far is the include/configs/imx50_yoshi.h file (heck, I'm not even sure if that is the right one!), which seems to include the "scripts" (actually environment definitions) that are run on startup, and a bunch of #defines. But there isn't any actual code in there... so where is it?
Yeah, not very easy task... AFAIR, DDR initialization is defined as sequence of DCD commands... So look for keywords DCD, LPDDR, init in source and DCD section in Reference Manual. I have no access to U-Boot source right now, sorry.

Quote:
Originally Posted by ixtab View Post
Edit: I just realized that it's probably largely irrelevant, because there's none of our code being run - after all, the device is in USB Downloader mode, so that's *before* u-boot is even launched. And if the DRAM isn't accessible, then there's nothing we can do about it.

Which means that the magic will have to be done from u-boot, so we're probably back to the tftp idea. But any hints about u-boot (or in particular, where to look for in the code if I want to enable that tftp stuff) are still welcome!
Most ARM registers, including DRAM registers, are memory-mapped and USB downloader protocol has command to write data in memory. So long sequence of these commands with right values will initialize DRAM. In fact, this method (of using of write memory commands) is implemented in imx_usb_loader for executing DCD block of given Program Image.

TFTP is OK, but you should fit whole U-Boot in that 72k. And what size is it now?

I was planning to create Program Image including DCD for DRAM initialization and made of prepended small code for relocating initramfs and booting Linux kernel (no need for U-Boot, requirements for booting kernel on ARM are not easy but also not hard, they are doable in pretty small chunk of code), the Linux kernel itself and initramfs.
eureka is offline   Reply With Quote
Old 09-26-2012, 08:49 AM   #238
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: *.*
My custom u-boot images for Select Boot initialize the DRAM using the newer K5 u-boot code, which also supports the K4 (and other models). The K4 u-boot was stripped down, and did not have K4 support, so I did not use it.

Any app you upload would need to borrow the DRAM init code from the u-boot code in the amazon GPL. I recommend using the K5 u-boot code.

There are actually two u-boots, the one used by Select Boot is the small one (not bist, no fastboot)) that does not use DRAM (but does initialize it for later use AFTER determining what init method to use after examining the idme SERIAL and PCBSN. Then it loads the larger u-boot bist from mmc into DRAM, so that fastboot can work, or the linux kernel can be loaded from mmc. So it is multi-stage (u-boot, then u-boot bist, then linux kernel).

Any app that runs directly in DRAM would also need a small "bootstrap" (a very stripped down u-boot) to first load in internal SoC RAM, then init DRAM, then load the larger DRAM part of the app. You can see that u-boot also uses some self-relocating code, so it can start in internal RAM and move to DRAM after it is initialized.

So, "bare hardware" native apps designed to run from USB Downloader mode need to init the hardware (and DRAM) themselves, in stages, before they can use it.

At least that is my understanding of how this works when I was making the custom u-boot changes...

EDIT: I see that yifanlu did exactly that. His code contains the "DRAM init" portion of u-boot. All "USB Downloader mode" apps need to do this too, as part of a multi-stage boot sequence, if they need to use DRAM. Tiny apps that fit in SoC RAM do not need DRAM, but that is very constrained. Perhaps a tiny remote debugger?

Last edited by geekmaster; 09-26-2012 at 08:53 AM.
geekmaster is offline   Reply With Quote
Old 09-26-2012, 02:55 PM   #239
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
Quote:
Originally Posted by ixtab View Post
Could you give me a hint as to which file I should start looking at?
Starting point for your task is board/imx50_yoshi/flash_header.S. Search for comment string:
Code:
/*=============================================================================
 *init script for codex LPDDR1-200MHz CPU board
 *===========================================================================*/
It's where Yifan Lu copied his code from. At first it's necessary to apply workaround for PLL meta-stability issue. It's an official bug (with no fix scheduled) and it's related to DDR. It's described in i.MX50 chip errata (search in Google for IMX50CE.pdf and then take a look at section ENGcm12051 at this document).

Then, there is Enable all clocks code, but, I believe, all clocks are already enabled in boot process (BTW, PLL1 is set up at 800 MHz automatically too). It's according to chapters 6.4.3, 6.4.4 and tables 6-5 and 6-6 from Reference Manual. But I can be deadly wrong.

And then there is a jump to DDR init code. Code is located at board/imx50_yoshi/ram_init.S. Search for label lpddr2_init: label mddr_init: at that source file (why mddr_init?).

(Well, I was wrong. DDR intialization is expressed through code, not DCD commands. But anyway, process of writing to registers is perfectly mapped to DCD capabilities. If you're interested, look at chapter 6.6.2 of Reference Manual).

Also, just to be clear, I was speaking about U-Boot from 5.1.2 sources.

Last edited by eureka; 09-26-2012 at 06:10 PM. Reason: it's mddr_init, not lpddr2_init
eureka is offline   Reply With Quote
Old 09-26-2012, 03:49 PM   #240
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
And here are links about booting Linux kernel on ARM:
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 03:02 AM.


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