PDA

View Full Version : Bootloader and flash basics?


dgktkr
09-15-2009, 10:56 AM
Hi,

I'm trying to understand how the traditional boot process works for Motorola phones. If there is an extensive guide or thread for this, please post a link. http://wiki.howardforums.com/index.php/SHX_File_Modding_Guide is is a good start, but after reading it, some things are still not clear to me.

It appears that to prepare for normal flashing, an appropriate loader with extension "ldr" is sent from your computer to phone RAM. It also seems that the ldr file is flashed to the beginning of the EEPROM address space, and that at the end of the flash process, the code from the ldr file is erased from EEPROM.

What's the point of doing that? Why not just leave the code in EEPROM? Or, if there is enough RAM, why flash it to the EEPROM in the first place?

And, if it's not erased, why do you need to upload loader code at the beginning of each session?

In the source code I've seen for an old flash loader, there is a DUMP routine that is commented out. Did early phones and associated loaders have this capability? Is there something in newer phones that blocks this functionality? Could this be the dump algorithm that was used in various ramldr* programs that used to be popular about 2 years ago (I know, ancient history!)?

Posts I have read in various forums indicate that if anomalies are encountered in flash code during startup, the phone can go into blank mode. It seems that this can also be entered on command (eg Dual Boot flash loaders). It appears that, again, some sort of loader must be sent to the phone to proceed. Does this one differ from the one that gets uploaded at the beginning of a flash-mode session? How does it differ? Does it respond to the same commands that are in the normal flash loaders?

Also, is code in the flash chip executed directly, or is it first loaded into RAM and then executed?

Any enlightenment is much appreciated.

Glenn

PS I know people get annoyed at my penchant for discussing semantics, but wouldn't a better term for *.ldr files be "phone loader" files or just "loader" files with "up- and down-" understood? In normal use (no usb connection) is any of this code used?

Danation
09-15-2009, 12:25 PM
Well, to be honest, that's delving a lot deeper into the process than most of us know about. So unfortunately, I don't know the answers to your questions. But I would very much like to, so post what you find please :)

I think I may have some insight to part of your question:

Posts I have read in various forums indicate that if anomalies are encountered in flash code during startup, the phone can go into blank mode. It seems that this can also be entered on command (eg Dual Boot flash loaders). It appears that, again, some sort of loader must be sent to the phone to proceed. Does this one differ from the one that gets uploaded at the beginning of a flash-mode session? How does it differ? Does it respond to the same commands that are in the normal flash loaders?

If you are in blank mode, you can flash as normal. i.e you send the same loader to the phone. Of this I am sure.

However, I believe a different loader is needed when writing to the locations known as the Bootloader and the PDS. I'm not 100% on that, though.

Btw, thanks for the link. I wish that guy had continued to mod e398, since RSA has been hacked.

MakiOka
01-06-2010, 07:57 PM
Hey. Can anyone help me?

I was modding my phone lately. I was downloading skins for my V3xxR using P2kCommander. After I installed them, I restarted my phone. As I was waiting, I noticed that it took forever loading the screen (it shows the first image). I don't know what to do now. I don't have and idea about Bootloader or Flash(ing). Please help me.

Everytime I turn on the phone, the screen loads but that's it, it never starts. Do I have to reformat it or something? Thank you for the help.

By the way, I tried pressing * and # keys simultaneously while putting the battery back.

"Bootloader
06.24
SW Version
R27231_U_97.04
.2BR

Battery OK
OK to Program
Connect USB
Data Cable"


Can anyone help me how to do it step by step?

jocelyn02
01-07-2010, 07:15 AM
i would like unlock motorola w376 tracfone

thetuxracer
01-09-2010, 05:52 AM
thanks for the link! too much information, but its never a waste!