MTKRomloader » History » Version 6
craig_comstock, 02/16/2018 04:15 AM
1 | 4 | steve-m | {{>toc}} |
---|---|---|---|
2 | 1 | steve-m | |
3 | |||
4 | 4 | steve-m | h1. [[MediaTek]] Romloader |
5 | |||
6 | |||
7 | 5 | laforge | Just like the [[CalypsoRomloader]], the the MTK romloader is a serial bootstrap-loader inside the Digital Baseband Processors manufactured by [[MediaTek]]. |
8 | 2 | steve-m | It is executed when the power button of the phone is pressed, and listens on the UART for an 0xa0 activation byte. |
9 | 1 | steve-m | |
10 | The loader can read/write from/to all registers and memory addresses of the DBB, which is used extensively by the host software. |
||
11 | Most of the initialization logic is therefore in the application on the host, which uploads the code to the phone. |
||
12 | |||
13 | 3 | steve-m | It is stored in a ROM which is always mapped to 0x48000000 of the ARM memory space in the MT622x. Therefore, only one instruction is mapped to the reset vector at 0x0 when powering on: |
14 | |||
15 | 4 | steve-m | <pre> |
16 | 3 | steve-m | ROM:00000000 LDR PC, =0x48000000 |
17 | 4 | steve-m | </pre> |
18 | 3 | steve-m | |
19 | Osmocon has working support for it (-m mtk), but it uses the default 19200 baud for uploading the image to the SRAM. |
||
20 | For higher loading baudrates the proprietary MTK windows flashing tool uses several register writes to enable the UART Autobaud mode, and sends an autobaud-sample. |
||
21 | 4 | steve-m | Just setting the baudrate the normal way would result in a deadlock, since when setting LCRr7 to 1 maps the baud divider registers to the RX and TX holding registers. |
22 | 6 | craig_comstock | |
23 | h2. Other Bootloader Tools |
||
24 | |||
25 | "fernly":https://github.com/xobs/fernly/ can load firmware into RAM and execute on [[MT6260]]. The main difference from [[MT6235]] is address space and baud rate. [[MT6260]] devices like [[Fernvale]] and [[SIM800]] use 115200 baud. Fernly loads code into RAM at 0x7000c000. |
||
26 | |||
27 | "mtk-open-tools":https://github.com/mtek-hack-hack/mtk-open-tools |