github

MediaTek Details: Little Kernel

NOTE: The information was gathered through reverse engineering.

After the Preloader finishes initalizing the hardware, it loads the LK image of the eMMC/NAND flash into the SDRAM and starts executing it. This would be the main bootloader but on MediaTek devices, the Preloader has to load it first. This is response for loading the Linux Kernel to load Android and offers some features such as entering Fastboot Mode, entering Meta Mode if supported, entering Factory Mode if supported, unlocking the Bootloader to load a custom Kernel if supported and read/write parts of the flash via USB.

The overview

Usually when MediaTek ships a source package to a manufacturer, it also contains the entire source code for the Little Kernel bootloader. It is not easy to come up with a generic description of what the bootloader does because the manufacturer can modify it, so it does different things on different SoCs and Devices.

Based on the lightning72_wet_l source code for the MT6572 SoC, the bootloader is made up of the following parts:

● SoC-specific stuff in mediatek/platform/${platform}/lk, this contains the core and init code.

● Device-specific stuff in mediatek/custom/${device}/lk, this contains the Device-specific code.

Now it's time to dive deeper!

Blog post is W.I.P, come back later!