Booting chain

Revision as of 08:27, 9 August 2010 by Wikiadmin (Talk | contribs)

Jump to: navigation, search
Boot Chain

Graphical view

This is the boot chain of the Motorola Milestone, as far as we know((see [1] and [2] for examples of the OMAP boot process, which differs from the Milestone's as we've found in our mbmloader analysis. X-Loader and U-Boot are missing in this diagram because they have been replaced by Motorola's mbmloader. The OMAP architecture permits that the bootstrap code be located in an SD-Card, provided that the NAND Flash is unable to boot and that the SD-Card contains a proper FAT32 filesystem and a .IFT file signed as required by the HS mode. If the processor had been in GP mode, we could've followed steps to boot from the SD-Card; unfortunately that's not the case. Some innards of similar Boot ROMs are described [3] and [4] and [5]. The 34xx TRM is the final reference for the platform.)):

Stage 0      +-----------------------+
(Supervisor) |  TWL5030 Boot Prepare |--------------------------------------------------------\
             +-----------------------+                                                        |
                         |                                                                    |
                         V                                                                    |
             +-----------------------+                                                        |
Stage 1      |  OMAP Core Boot ROM   |<--------\ data loading...                              |
(bootrom)    |     (on chip)         |         |                                              |
             +-----------------------+         |     +---------------+                        |
                         |                     \-----|    CH table   |                        |
                         |                     /-----|(in NAND flash)|//signed//              |
                         V                     |     +---------------+                        |
             +-----------------------+         |                 +--------------+             |
Stage 2      | ISW Code - mbmloader  |<--------/                 |   mbmbackup  |//signed//   |
(bootstrap)  |   (in NAND Flash)     | //signed//                +--------------+             |
             +-----------------------+                                   :                    |
                      |   ^                                              |                    |
                      |   |  checking to prevent downgrade...            |                    |
                      |   \----------------------------------------------/                    |
                   /--/                                                                       |
                   |                                                                          |
                   V                                                                          |
             +-----------+                                                                    |
Stage 3      |    mbm    | //signed//               Stage 3a                                  |
(bootloader) +-----------+                          (TI Wrigley 3G booting chain)             |
                   |     sending bploader...        +--------------+                          |
                   +-------------------------\      | BP Boot ROMs |<-------------------------/
                   |                         |      +--------------+
                   v                         |              |
             +-----------+                   \------------->|
             |    lbl    | //signed//                       |
             +-----------+                                  v
                  |:                                +--------------+
                  |\-------------\                  |   bploader   | //signed//
                  |              |                  +--------------+
                  v              v                          |
            +-----------+  +-----------+                    v
Stage 4     |    boot   |  |  recovery | //signed// +--------------+
(OS)        +-----------+  +-----------+            | BP  RTXC  OS | //signed//
                  |                                 +--------------+ 
 Stage 5          |   uploading main and nvs firmware...      +--------------+
 (Peripheral)     +------------------------------------------>|  WL1271 ROM  |
                  |                                           +--------------+
                  |    only start, ROM already flashed        +------------------+   can be reflashed via SPI
                  \------------------------------------------>|  Touchpanel ROM  |..--------------------------
Boot part Processor Arch Dump Disassembly/Decompilation
OMAP boot ROM OMAP core armv7-a Boot:omap 3430.bin.gz, Boot:omap 3630.bin.gz Rom3.idb.gz
mbmloader OMAP3430 core armv7-a none Boot:mbmloader.idb.gz
mbm OMAP3430 core armv7-a none Boot:mbm-3.idb.gz
lbl OMAP3430 core armv7-a none none
[[BP_Boot_ROM Wrigley arm boot ROM]] Wrigley3G ARM core arm9 none none
Wrigley dsp boot ROM Wrigley3G TMS320c55x+ c55x+ Boot:f00000.gz((this is partial dump of wrigley3g dsp memory (addressess: 0xF00000-0xFFFFFF). boot rom is only very small part of it.)) none
Wrigley3G RTXC OS loader Wrigley3G ARM core arm? none Boot:bploader.idb.gz
Wrigley RTXC OS Wrigley3G TMS320c55x+ c55x+ none none
Main DSP boot ROM TMS320C6454 MIPS (c64x+ edition) none none
Main DSP firmware TMS320C6454 MIPS (c64x+ edition) Boot:baseimage.dof.gz none
WiLink firmware WiLink 6.0 TPS656905 arm Wl1271.bin.gz and Fw wlan1271.bin.gz none
Power Manager Boot ROM TWL5030 MIPS? none none
Touch Panel Controller boot ROM AVR ATmega324P AVR 8-bit none none
Linux kernel OMAP3430 core arm none none

This is a dump of Milestone (also and Droid, and Palm Pre) OMAP3430 boot ROM - Rom-2.tar.gz

All recent IDA databases of bootloaders can be found here [6]

(!) the CH table can be signed with CSST along with the Initial Software image. Whether Motorola did include it in the signed image or left it unsigned is unknown (and risky to test!). ((Citation needed)) After kokone has found that the origin mbmloader contained bit errors, the correct mbmloader binary image has been obtained again. That he has been able to validate all the signatures in mbmloader and the CH table is not part of any signed content.

(!!) in fact mbm and mbmbackup are binary identical, so mbmbackup DOES contain certificates. But its certificates are not referenced in the cdt table because it is used directly by the mbmloader (and the mbmloader doesn't use the cdt table, as discovered by yakk). In the Droid mbm and mbmbackup are binary identical, just like in the Milestone (but with a different code version). One Droid user (Orgg) had an incident with his phone in which his mbm partition became corrupt, and the phone wouldn't boot at all after that. This would suggest that the mbmbackup partition is not used for automatic recovery. User [mbm] reports that his Droid originally came with different mbm and mbmbackup, but after an update pushed by Verizon they became identical. In light of this, the mbm_backup_attack was proposed but then found to be flawed and discarded.